Posting a single record

From DreamFactory
Jump to: navigation, search
DreamFactoryTutorialsPosting a single record
Line 11: Line 11:
 
[[File:Swagger-post-record.png|1000px]]
 
[[File:Swagger-post-record.png|1000px]]
  
### Example - Post a single contact record with ID 106
+
### Example - POST a single contact record with ID 106
  
 
* Table name: contact
 
* Table name: contact

Revision as of 17:14, 15 October 2015

      1. Tutorial

POST a single record by ID to a SQL or NoSQL database. Try these examples in the 'API Docs' tab of the DreamFactory Admin Console or from the command line with cURL.

      1. API Endpoint
POST https://{url}/api/v2/{api_name}/_table/{table_name}/{id}
      1. API Docs Screenshot

Swagger-post-record.png

      1. Example - POST a single contact record with ID 106
  • Table name: contact
  • ID parameter is API call:
    106
  • Body parameter in API call:
    {
"resource": [ { "first_name": "Alice", "last_name": "Jones" } ] }
  • Request URL:
    https://foo.com/api/v2/db/_table/contact/1