Changes

stoney core: REST API

849 bytes added, 11:01, 14 November 2013
/* REST API documentation */
===== Reseller collection retrieval (GET) example =====
To retrieve existing resellers, the client needs to send a HTTP <code>GET</code> request on the reseller's collection resource URI <code>https://api.example.com/v1/resellers</code>.
The service responds with a HTTP status code 200 (OK) on success and returns the various resellers.
 
'''Request''':
<pre>
===== Reseller element retrieval (GET) example =====
To retrieve an existing reseller and fetch the informations associated with it, the client needs to send a HTTP <code>GET</code> request on the reseller's element resource URI (such as <code>https://api.example.com//v1/resellers/4000001</code>.
The service responds with a HTTP status code 200 (OK) on success and returns the associated reseller informations.
==== Reseller update (PUT) ====
Updates To updates an existing Resellerreseller, the client needs to send a HTTP <code>PUT</code> request on the reseller's element resource URI (such as, <code>https://api.example.com//v1/resellers/4000001</code>). The <code>PUT</code> method requires one to sent the complete record, thus the work-flow is normally as follows:
# A [[#Reseller_retrieval_.28GET.29|GET]] request on the Reseller element URI will be made to fetch the whole document.
# Update the fields which content has changed
==== Reseller partly update (PATCH) ====
Updates To update fields of an existing Resellerreseller, in the client needs to send a HTTP <code>PATCH</code> request on the reseller's element resource URI (such as, <code>https://api.example.com//v1/resellers/4000001</code>).In contrast to the [[#Reseller_update_.28PUT.29|<code>PUT</code>]] method, only the changed fields are to be included in the request. 
'''Request''':
==== Reseller deletion (DELETE) ====
To delete an existing reseller, the client needs to send a HTTP <code>DELETE</code> request on the reseller's element resource URI (such as, <code>https://api.example.com//v1/resellers/4000001</code>).
[[Category:Development]]
SLB
385
edits