Querying for a single record by ID

From DreamFactory
Jump to: navigation, search
DreamFactoryTutorialsQuerying for a single record by ID
Line 1: Line 1:
### Tutorial
+
=== Tutorial ===
  
 
GET a single record in a SQL or NoSQL database by ID. Try these examples in the 'API Docs' tab of the DreamFactory Admin Console or from the command line with cURL.
 
GET a single record in a SQL or NoSQL database by ID. 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}/id</pre>
 
<pre>GET https://{url}/api/v2/{api_name}/_table/{table_name}/id</pre>
  
### API Docs Screenshot
+
=== API Docs Screenshot ===
  
 
[[File:Swagger-id.png|1000px]]
 
[[File:Swagger-id.png|1000px]]
  
### Example - GET contact record with ID 1
+
=== Example - GET contact record with ID 1 ===
  
 
* Table name: contact
 
* Table name: contact
 
* IDs parameter in API call: <pre>1</pre>
 
* IDs parameter in API call: <pre>1</pre>
 
* Request URL: <pre>https://foo.com/api/v2/db/_table/contact/1</pre>
 
* Request URL: <pre>https://foo.com/api/v2/db/_table/contact/1</pre>

Revision as of 17:45, 3 February 2016

Tutorial

GET a single record in a SQL or NoSQL database by ID. 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}/id

API Docs Screenshot

Swagger-id.png

Example - GET contact record with ID 1

  • Table name: contact
  • IDs parameter in API call:
    1
  • Request URL:
    https://foo.com/api/v2/db/_table/contact/1