Skip to content

Message encoding

HTTP Methods

MiaRec API supports the following HTTP methods:

HTTP Method Description
GET

Retrieve details about resource or a list of resources (users, groups, calls etc).

Examples:

https://miarec.example.com/api/v2/users.json
http://miarec.example.com:8080/api/v2/users/e00f043e-f288-11e4-aa29-e03f497dbdff.json
POST Create new resource object
PUT Modify the existing resource object
DELETE Delete the resource object

HTTP Headers

  • HTTP Basic Authentication header

    Each request should contain HTTP Basic Authentication header with a valid user name and password. The user should exist in MiaRec and have permission to access API. * Accept header

    Each request should contain Accept: application/json header because it is supposed that MiaRec API sends response in JSON format. Response from MiaRec API may contain text/plain response in case of error. * Content-Type header

    On PUT and POST operations the client application should supply header Content-Type: application/json and format the submitted data in JSON.

HTTP Body

The body of API request or response can optionally carry data in JSON format. The body can be sent by the client on a PUT or POST, or returned to the client on a GET.

Character Sets

Submitted JSON data should be always encoded with UTF-8 character set.

Format of date/time values with timezone

All date/time values are returned in ISO8601 format with timezone (like 2014-06-10T13:45:51+0800). It is responsibility of client application to convert time to appropriate timezone before displaying to user.

The default timezone is configured on system level, although each API user account may have unique timezone settings.