Updating records

From DreamFactory
Jump to: navigation, search
DreamFactoryTutorialsUpdating records
m (Code black was malformed, fixed)
Line 14: Line 14:
  
 
* Table name: contact
 
* Table name: contact
* Body parameter in API call: <pre>{
+
* Body parameter in API call:  
 +
<pre>{
 
  "resource": [
 
  "resource": [
 
   {
 
   {
Line 27: Line 28:
 
   }
 
   }
 
  ]
 
  ]
}</pre>
+
}
* Request URL: <pre>https://foo.com/api/v2/db/_table/contact</pre>
+
</pre>
 +
* Request URL:  
 +
<pre>https://foo.com/api/v2/db/_table/contact</pre>

Revision as of 23:12, 5 May 2016

Tutorial

Update (PUT) multiple records in 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.

API Endpoint

POST https://{url}/api/v2/{api_name}/_table/{table_name}

API Docs Screenshot

Swagger-update-records.png

Example - PUT (update) multiple contact records

  • Table name: contact
  • Body parameter in API call:
{
 "resource": [
   {
     "id": 107,
     "first_name": "Alice",
     "last_name": "Jones"
   },
   {
     "id": 108,
     "first_name": "Bob",
     "last_name": "Simpson"
   }
 ]
}
  • Request URL:
https://foo.com/api/v2/db/_table/contact