Changes between Version 32 and Version 33 of api_v1


Ignore:
Timestamp:
2012-11-06T21:34:28Z (11 years ago)
Author:
Pan Luo
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • api_v1

    v32 v33  
    2121  In JSON, it will be "[]".
    2222
     23Whenever iPeer responses a result with successful status code 2xx, the response body will always one of the following:
     241. An JSON object that requested by client
     251. A collection (array) of JSON objects requested by client
     261. An empty array "[]"
     27
     28If there is an error occurred on the iPeer server side, an corresponding error status code will be returned along with the error message in the response body encoded in JSON.
     29{{{
     30{"code": 999, "message":"This is an error message"}
     31}}}
    2332
    2433= Resources =
     
    3746
    3847=== Create a User ===
    39 POST /v1/users
    40 ||parameter||none||
    41 ||input||{"role_id":"ROLE_ID","username":"USERNAME","last_name":"LAST_NAME","first_name":"FIRST_NAME"}||
    42 ||status (success)||HTTP/1.1 201 CREATED||
     48POST /v1/users\\
     49POST Boby
     50{{{
     51{"role_id":"ROLE_ID","username":"USERNAME","last_name":"LAST_NAME","first_name":"FIRST_NAME"}
     52}}}
     53||parameter||none||
    4354||output (success)||{"id":"USER_ID","role_id":"ROLE_ID","username":"USERNAME","last_name":"LAST_NAME","first_name":"FIRST_NAME"}||
    44 ||status (failure)||HTTP/1.1 500 Internal Server Error||
    45 ||output (failure)||none||
    4655
    4756=== Create Users ===