Specifying fields

From DreamFactory
Jump to: navigation, search
DreamFactoryTutorialsSpecifying fields
(Created page with "### Tutorial Select which fields to return in a SQL or NoSQL query. Try these examples in the 'API Docs' tab of the DreamFactory Admin Console or from the command line with c...")
Line 11: Line 11:
 
[[File:Swagger-fields.png|1000px]]
 
[[File:Swagger-fields.png|1000px]]
  
### Example - Query the first names and last names from contact table
+
### Example - GET the first names and last names from contact table
  
 
* Table name: contact
 
* Table name: contact
 
* Fields parameter in API call: <pre>first_name, last_name</pre>
 
* Fields parameter in API call: <pre>first_name, last_name</pre>
 
* Request URL: <pre>https://foo.com/api/v2/db/_table/contact?fields=first_name%2C%20last_name</pre>
 
* Request URL: <pre>https://foo.com/api/v2/db/_table/contact?fields=first_name%2C%20last_name</pre>

Revision as of 17:17, 15 October 2015

      1. Tutorial

Select which fields to return in a SQL or NoSQL query. Try these examples in the 'API Docs' tab of the DreamFactory Admin Console or from the command line with cURL.

      1. API Endpoint
GET https://{url}/api/v2/{api_name}/_table/{table_name}?fields={field_list}
      1. API Docs Screenshot

Swagger-fields.png

      1. Example - GET the first names and last names from contact table
  • Table name: contact
  • Fields parameter in API call:
    first_name, last_name
  • Request URL:
    https://foo.com/api/v2/db/_table/contact?fields=first_name%2C%20last_name