Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Anchor
_Toc315972301
_Toc315972301
Anchor
_Toc341972272
_Toc341972272
Request

Anchor
_Toc315972302
_Toc315972302
Anchor
_Toc341972273
_Toc341972273
Request URL

[https://serverImage 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://serverImage Removedaddress/das5/rest/user/create

Anchor
_Toc315972303
_Toc315972303
Anchor
_Toc341972274
_Toc341972274
Request Parameters

The 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
Response

The Response is also expressed as a single JSON object, with the following members:

propertyremark
errorA 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.
messageA String providing a short description of the error. The message SHOULD be limited to a concise single sentence.
resultThe 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"}
}