Querying records with an ID list

From DreamFactory
Jump to: navigation, search
DreamFactoryTutorialsQuerying records with an ID list
Line 1: Line 1:
### Tutorial
+
=== Tutorial ===
  
 
GET records in a SQL or NoSQL database with an ID list. Try these examples in the 'API Docs' tab of the DreamFactory Admin Console or from the command line with cURL.
 
GET records in a SQL or NoSQL database with an ID list. Try these examples in the 'API Docs' tab of the DreamFactory Admin Console or from the command line with cURL.
  
### API Endpoint
+
=== API Endpoint ===
  
 
<pre>GET https://{url}/api/v2/{api_name}/_table/{table_name}?ids={id_list}</pre>
 
<pre>GET https://{url}/api/v2/{api_name}/_table/{table_name}?ids={id_list}</pre>
  
### API Docs Screenshot
+
=== API Docs Screenshot ===
  
 
[[File:Swagger-ids.png|1000px]]
 
[[File:Swagger-ids.png|1000px]]
  
### Example - GET contact records with IDs 1, 2, and 3
+
=== Example - GET contact records with IDs 1, 2, and 3 ===
  
 
* Table name: contact
 
* Table name: contact
 
* IDs parameter in API call: <pre>1, 2, 3</pre>
 
* IDs parameter in API call: <pre>1, 2, 3</pre>
 
* Request URL: <pre>https://foo.com/api/v2/db/_table/contact?ids=1%2C%202%2C%203</pre>
 
* Request URL: <pre>https://foo.com/api/v2/db/_table/contact?ids=1%2C%202%2C%203</pre>

Revision as of 17:45, 3 February 2016

Tutorial

GET records in a SQL or NoSQL database with an ID list. Try these examples in the 'API Docs' tab of the DreamFactory Admin Console or from the command line with cURL.

API Endpoint

GET https://{url}/api/v2/{api_name}/_table/{table_name}?ids={id_list}

API Docs Screenshot

Swagger-ids.png

Example - GET contact records with IDs 1, 2, and 3

  • Table name: contact
  • IDs parameter in API call:
    1, 2, 3
  • Request URL:
    https://foo.com/api/v2/db/_table/contact?ids=1%2C%202%2C%203