Changes

stoney core: REST API

910 bytes added, 10:51, 13 November 2013
/* RESTful URLs and HTTP methods */
TBD.
=== RESTful URLs Resources and HTTP methods ===Resources are always nouns, and specified in plural (such as resellers, customers, users etc.).The manipulation of resources happends via the HTTP request methods such as <code>GET</Code>, <code>POST</code>, <code>PUT</code>, <code>DELETE</code> and <code>PATCH</code>.The following example illustrates the concept with a fictive user ressource:{| class="wikitable sortable"|-! HTTP request! Description |-| <code>GET /users</code>| Retrieves a list of users |-| <code>GET /users/12345678</code>| Retrieves a specific user with user ID 12345678 |-| <code>POST /users</code>| Creates a new user |-| <code>PUT /users/12345678</code>| Updates a user with user ID 12345678 |-| <code>PATCH /users/12345678</code>| Partly updates a user with user ID 12345678 |-| <code>DELETE /users/12345678</code>| Deletes the user with user ID 12345678 |-| <code>DELETE /users</code>| Deletes all users |}
[[Category:Development]]
SLB
385
edits