Posting records
From DreamFactory
(Created page with "### Tutorial POST multiple records 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....") |
|||
Line 14: | Line 14: | ||
* Table name: contact | * Table name: contact | ||
− | * Request URL: <pre>https://foo.com/api/v2/db/_table/contact | + | * Body parameter in API call: <pre>{ |
+ | "resource": [ | ||
+ | { | ||
+ | "first_name": "Alice", | ||
+ | "last_name": "Jones" | ||
+ | }, | ||
+ | { | ||
+ | "first_name": "Bob", | ||
+ | "last_name": "Simpson" | ||
+ | } | ||
+ | ] | ||
+ | }</pre> | ||
+ | * Request URL: <pre>https://foo.com/api/v2/db/_table/contact</pre> |
Revision as of 17:12, 13 October 2015
- Tutorial
POST multiple records 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.
- API Endpoint
POST https://{url}/api/v2/{api_name}/_table/{table_name} ### API Docs Screenshot [[File:Swagger-post-records.png|1000px]] ### Example - Post multiple contact records * Table name: contact * Body parameter in API call: <pre>{ "resource": [ { "first_name": "Alice", "last_name": "Jones" }, { "first_name": "Bob", "last_name": "Simpson" } ] }
- Request URL:
https://foo.com/api/v2/db/_table/contact