# Data in VDS as API endpoint in JSON format

**URL:** <https://community.dremio.com/t/data-in-vds-as-api-endpoint-in-json-format/10923>\
**Category:** Uncategorized\
**Created:** [August 24, 2023, 6:51pm UTC](https://community.dremio.com/t/data-in-vds-as-api-endpoint-in-json-format/10923 "2023-08-24T18:51:20Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![jeeshandas](https://avatars.discourse-cdn.com/v4/letter/j/8e8cbc/32.png) [@jeeshandas](https://community.dremio.com/u/jeeshandas)\
**Post date:** [August 24, 2023, 6:51pm UTC](https://community.dremio.com/t/data-in-vds-as-api-endpoint-in-json-format/10923/1 "2023-08-24T18:51:20Z")

</div>

Hi,  
I have created a VDS ( say v1 ) under space ( say s1 ) consisting of a view which has n fields from a database table ( from Hive ).  
How can I get an API endpoint URL that will have the data from v1 in JSON format?  
I intend to use the endpoint URL as the data source for downstream reporting tool.  
Thanks

eg.  
sample data  
c1 c2  
k1 val1  
k2 val2

When I go to the endpoint URL, it should give me -  
[  
{c1:k1,c2:val1}  
,{c1:k2,c2:val2}  
]

---

<div class="post-metadata">

**Author:** ![isha](https://sea2.discourse-cdn.com/flex020/user_avatar/community.dremio.com/isha/32/2883_2.png) [@isha](https://community.dremio.com/u/isha)\
**Post date:** [August 25, 2023, 12:09pm UTC](https://community.dremio.com/t/data-in-vds-as-api-endpoint-in-json-format/10923/2 "2023-08-25T12:09:03Z")

</div>

You can use the [SQL endpoint](https://docs.dremio.com/current/reference/api/sql/) to submit a `SELECT * FROM v1;` or any SQL query.  
You can use the [Jobs endpoint](https://docs.dremio.com/current/reference/api/job/#retrieving-a-job) to retrieve the results of that query run.

---

<div class="post-metadata">

**Author:** ![jeeshandas](https://avatars.discourse-cdn.com/v4/letter/j/8e8cbc/32.png) [@jeeshandas](https://community.dremio.com/u/jeeshandas)\
**Post date:** [August 28, 2023, 7:41pm UTC](https://community.dremio.com/t/data-in-vds-as-api-endpoint-in-json-format/10923/3 "2023-08-28T19:41:11Z")

</div>

@isha - thank you so much for your response.

Following the documentations you’ve provided, I could execute the REST API call on the SQL endpoint ( which gave me the Job ID ) and passed the Job ID in the 2nd API call on the Job results endpoint successfully.

However, since I need to configure the REST API as a data source for downstream reporting tool,  
is there a way I can use just one single API call ( ie combine the 2 calls of getting the Job ID and then passing the Job ID to get the results into one ) ?

Thanks
