CTC API Convention

REST over HTTP

General

The CalAmp Telematics Cloud API is a REST over HTTP implementation. As such, you can make requests to the API via any HTTP client with TLS 1.1 or higher.

This section covers REST basics, as well as CTC-specific items such as the data exchange format, required HTTP headers, and several supported HTTP request parameters.

HTTP Verbs

VerbDescription
GETTo read a resource.
POSTTo create a new resource.
PUTTo update an existing resource. Requires the full resource to be sent in the request body as it completely replaces the old with the new.
DELETETo delete a resource.
HEADSimilar to making a GET call on the URL, except it has no response body.
OPTIONSTo request information about the communication options supported by the API endpoint.

HTTP Status Codes in Responses

CTC follows the standard HTTP status codes. In general, the meaning of the status codes is as defined by RFC2616, but there might be some semantic differences.

StatusDescription
200The request completed as expected. In the case of a GET or PUT request, the latest state of the resource acted on is returned in the response body. In the case of a HEAD or OPTIONS request, only the metadata is returned in headers.
201The request to create a new resource completed as expected. The new resource is returned in the response body.
202The request was received, but the task has not completed yet. Usually in response to a request to perform an asynchronous task.
400Bad request. Generally because of missing required parameters or invalid supplied values.
401Not authenticated.
403Forbidden. The authenticated user is not authorized to perform the requested action on the specified resource.
404Either the specified resource or an associated resource was not found.
405The requested action is not supported on the specified resource.
409The resource state is in conflict. Generally in response to a PUT request where the supplied state of the resource is not the latest state in the system.
417The expectations specified in the request could not be fulfilled (for example, in the case of link expansion or some expectation defined in the Expect header).
422The server understands the request content, and valid values are supplied, but it is unable to fulfill the request (for example, "username already exists" constraint).
500The API encountered an unexpected error and cannot complete the request.

CTC Data Exchange Formats

The API uses JSON as the data exchange format and UTF-8 encoding, for both requests and responses. In order of precedence, the format can be specified via the following:

    <