Changes between Version 32 and Version 33 of api_v1
- Timestamp:
- 2012-11-06T21:34:28Z (12 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
api_v1
v32 v33 21 21 In JSON, it will be "[]". 22 22 23 Whenever iPeer responses a result with successful status code 2xx, the response body will always one of the following: 24 1. An JSON object that requested by client 25 1. A collection (array) of JSON objects requested by client 26 1. An empty array "[]" 27 28 If 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 }}} 23 32 24 33 = Resources = … … 37 46 38 47 === 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|| 48 POST /v1/users\\ 49 POST Boby 50 {{{ 51 {"role_id":"ROLE_ID","username":"USERNAME","last_name":"LAST_NAME","first_name":"FIRST_NAME"} 52 }}} 53 ||parameter||none|| 43 54 ||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||46 55 47 56 === Create Users ===