Posting a single record

From DreamFactory
Jump to: navigation, search
DreamFactoryTutorialsPosting a single record
(Created page with "The writer's name is Donald Goudy. My family stays in Guam yet my spouse desires us to relocate. To climb is the only pastime her other half does not approve of. Interviewi...")
 
(Created page with "### 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 c...")
Line 1: Line 1:
The writer's name is Donald Goudy.  My family stays in Guam yet my spouse desires us to relocate. To climb is the only pastime her other half does not approve of. Interviewing has been her day job for some time but she intends on changing it.  See exactly what's new on my site here: http://4jrz077.tumblr.com<br><br>Also visit my weblog ... [http://4jrz077.tumblr.com http://4jrz077.tumblr.com/]
+
### 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.
 +
 
 +
### API Endpoint
 +
 
 +
<pre>POST https://{url}/api/v2/{api_name}/_table/{table_name}</pre>
 +
 
 +
### 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"
 +
  }
 +
]
 +
}</pre>
 +
* Request URL: <pre>https://foo.com/api/v2/db/_table/contact</pre>

Revision as of 18:36, 13 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}
      1. API Docs Screenshot

Swagger-post-records.png

      1. Example - Post multiple contact records
  • Table name: contact
  • Body parameter in API call:
    {
"resource": [ { "first_name": "Alice", "last_name": "Jones" }, { "first_name": "Bob", "last_name": "Simpson" } ] }
  • Request URL:
    https://foo.com/api/v2/db/_table/contact