Specifying fields

From DreamFactory
Jump to: navigation, search
DreamFactoryTutorialsSpecifying fields
Line 1: Line 1:
 
### Tutorial
 
### 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.
+
Select which fields to return in a SQL or NoSQL GET request. Try these examples in the 'API Docs' tab of the DreamFactory Admin Console or from the command line with cURL.
  
 
### API Endpoint
 
### API Endpoint

Revision as of 19:32, 15 October 2015

      1. Tutorial

Select which fields to return in a SQL or NoSQL GET request. 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