Skip to main content

RESTful APIs

The RESTful APIs require the following components:

  • Unique resourse identifier (URI): It is the request endpoint that specificies the client action
  • HTTP Method: It is instructs ths server what to do at the URI given
    • GET: Request data from the API.
    • POST: Send data in the request body to the API to create a data object.
    • PUT: Send data in the request body to the API to create or update a data object.
    • PATCH: Send data in the request body to the API to update a data object.

The API requests are managed through a HTTPS connection with content body in JSON format.

HTTP status code

Status codes are embedded in the response HTTP header. It indicates if the request is fulfilled.

The MSL Edge API makes use of the following:

  • 2xx: Success – Indicates the client’s request was accepted successfully.
  • 4xx: Client Error – This status codes points issues at the clients side.
  • 5xx: Server Error – It points to an error on the server side.

Response Body

The response body will contain the data that the API returned for the request make. Different endpoints return different data which can be split into different properties. There will be instances where the developer documentation states that that endpoints return a number of endpoints, but in reality, it returned less endpoints than the once specified. This is because there was no data to be returned for those properties, and therefore these will not be returned and should be considered as NULL values.