Changes

stoney core: REST API

650 bytes added, 15:40, 13 November 2013
/* Resources and HTTP methods */
|}
 
==== POST ====
 
On successful creation of an object, the service must return an URI string to the newly created element.
 
'''Example''':
 
Request:
<pre>
POST /v1/tokens/ HTTP 1.1
HOST: api.example.com
</pre>
<pre>
Accept: application/json
Content-Type: application/json
</pre>
<source lang='javascript'>
{
"customerName": "Mueller",
"customerType": "reseller",
}
</source>
 
Answer:
<pre>
HTTP/1.1 201 Created
</pre>
<pre>
Content-Type: application/json; charset=UTF-8
Location: https://api.example.com/v1/customers/67890
</pre>
<source lang='javascript'>
{
"id": 67890,
"location": "https://api.example.com/v1/customers/67890",
}
</source>
=== Relations ===
Bureaucrat, administrator
425
edits