The dispatch server will accept basic authentication for requests.
Responses must return a JSON object with status, code, and message fields and an optional errors in the case failure.
status
code
message
errors
{ "status": "SUCCESS", "code": 200, "message": [] } A successful response will normally return a code of 200
{ "status": "SUCCESS", "code": 200, "message": [] }
{ "status": "FAIL", "code": 400, "message": [] } A failure response will have a code value greater than or equal to 400.
{ "status": "FAIL", "code": 400, "message": [] }
All resources will accept GET, POST, and PUT request methods. DELETE methods are not available. Objects should be updated as ‘voided’ instead. The only exception is the session resource which accepts POST and DELETE only.
The UUID value is optional in the url path for GET and PUT requests and not allowed for POST requests.
Note: POST calls allow for inclusion of the uuid field in the request body. This will override the value uuid value generated by the server.
POST and PUT requests for object fields where the field represents the related object will accept either the uuid string value or the object representation. Related field objects must be sent in POST requests prior to the object request.
POST requests will accept the following as the request body
Requests can be sent to the server using any REST client, either as a browser plugin or from a command line.
Example GET to localhost:
curl --basic admin:Sanamobile1 -H "Accept: application/json" http://127.0.0.1:8000/core/concept/
Example POST to localhost:
curl -H "Accept: application/json" -H "Content-Type: application/json; charset=UTF-8" -X POST -d '{"username":"admin","password":"Sanamobile1"}' http://127.0.0.1:8000/core/session/ #### Browser Based Client Most major browsers have a REST client plugin. For the Google Chrome browser, we recommend using the [Postman REST Client](https://chrome.google.com/webstore/detail/postman-rest-client/fdmmgilgnpjigdojojpjoooidkmcomcm?hl=en), available in the Chrome web store. If using Postman, a sample collection may be downloaded here:<br/>
mds-current postman
The example collection will require setting up an environment with following parameters utilized in the request urls as
{{scheme}}://{{host}}{{port}}/{{path_prefix}}