# Quick base api to json

**URL:** <https://community.postman.com/t/quick-base-api-to-json/15059>\
**Category:** Help Hub\
**Tags:** tests\
**Created:** [August 16, 2020, 3:53pm UTC](https://community.postman.com/t/quick-base-api-to-json/15059 "2020-08-16T15:53:44Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![cgreene](https://avatars.discourse-cdn.com/v4/letter/c/ccd318/32.png) [@cgreene](https://community.postman.com/u/cgreene)\
**Post date:** [August 16, 2020, 3:53pm UTC](https://community.postman.com/t/quick-base-api-to-json/15059/1 "2020-08-16T15:53:44Z")

</div>

Hi  
New to Postman and wish to use Quick Base API\_DoQuery and pull the results in as JSON. I only get xml. I’m using Quick Base API\_DoQuery in a query string after our QB domain name URL with parameters to get certain fields and limit that to about 100 records. QB delivers the payload as xml. Is it possible to coax Postman to convert that payload to JSON? If so, can you please provide guidance?  
Thank you,  
Chris

---

<div class="post-metadata">

**Author:** ![odanylewycz](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/odanylewycz/32/3240_2.png) [@odanylewycz](https://community.postman.com/u/odanylewycz)\
**Post date:** [August 16, 2020, 4:02pm UTC](https://community.postman.com/t/quick-base-api-to-json/15059/2 "2020-08-16T16:02:14Z")

</div>

Hi @cgreene!

Welcome to the community 👏

So in regards to this problem, you wont have too many options. First, do you know if the Quick Base API web server supports responses in JSON? If not, that will be your biggest limitation. However, if it follows standard web protocols, add in the following header to your request to see if JSON is returned.

`Accept: application/json`

If that doesnt work, you can use the xml2js library in your “Tests” script section to convert the xml to json. This may not turn out exactly how you want it, but it can create a somewhat equivalent JSON response from your XML.

Best,  
Orest

---

<div class="post-metadata">

**Author:** ![cgreene](https://avatars.discourse-cdn.com/v4/letter/c/ccd318/32.png) [@cgreene](https://community.postman.com/u/cgreene)\
**Post date:** [August 16, 2020, 4:51pm UTC](https://community.postman.com/t/quick-base-api-to-json/15059/3 "2020-08-16T16:51:31Z")

</div>

Hi @odanylewycz,  
Do I import the xml2js library from somewhere?

---

<div class="post-metadata">

**Author:** ![odanylewycz](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/odanylewycz/32/3240_2.png) [@odanylewycz](https://community.postman.com/u/odanylewycz)\
**Post date:** [August 16, 2020, 4:56pm UTC](https://community.postman.com/t/quick-base-api-to-json/15059/4 "2020-08-16T16:56:50Z")

</div>

Hi @cgreene,

Nope it should be readily available for you to use in your Tests and PreRequest Script

As a reference, these are the libraries loaded by default in PreRequest Script and Tests sections:  
[https://learning.postman.com/docs/writing-scripts/script-references/postman-sandbox-api-reference/](https://learning.postman.com/docs/writing-scripts/script-references/postman-sandbox-api-reference/)
