| Anchor |
|---|
| _Toc315972301 |
|---|
| _Toc315972301 |
|---|
|
| Anchor |
|---|
| _Toc341972272 |
|---|
| _Toc341972272 |
|---|
|
Request| Anchor |
|---|
| _Toc315972302 |
|---|
| _Toc315972302 |
|---|
|
| Anchor |
|---|
| _Toc341972273 |
|---|
| _Toc341972273 |
|---|
|
Request URL[https://server
Image Removedaddress/das5/rest/object/method
where object is the name of an object method is the name of the API method to be called. For instance, to create a user object, the request URL is:
[https://server
Image Removedaddress/das5/rest/user/create
| Anchor |
|---|
| _Toc315972303 |
|---|
| _Toc315972303 |
|---|
|
| Anchor |
|---|
| _Toc341972274 |
|---|
| _Toc341972274 |
|---|
|
Request ParametersThe request parameters are expressed as a single JSON object. Its content is entirely defined by the method. For instances:
{"username":"John Smith", "email":"john.smith@acme.com"}
The request parameters MUST be posted to the request URL.
| Anchor |
|---|
| _Toc315972304 |
|---|
| _Toc315972304 |
|---|
|
| Anchor |
|---|
| _Toc341972275 |
|---|
| _Toc341972275 |
|---|
|
ResponseThe Response is also expressed as a single JSON object, with the following members:
| property | remark |
|---|
| error | A Number that indicates the return code, a return code of zero means a successful operation, and non-zero means some errors occurred. This MUST be an integer. |
| message | A String providing a short description of the error. The message SHOULD be limited to a concise single sentence. |
| result | The value returned by the method. Its contents is entirely defined by the method.This member may be entirely omitted if there was an error invoking the procedure. |
When a method call fails, this value contains additional information, may be omitted. Its content is entirely defined by the application (e.g. detailed error information, nested errors etc.).
Examples
Failure:
{"error":101, "message":"user not found."}
Success with no result:
{"error":0}
Success with result:
{
"error":0,
"result":{"username":"john.smith", "email":"john.smith@acme.com"}
}