Formats for input data and results

Format for input data

Input data structures for POST and PUT methods are passed in the request body. Input structures match the output structures of the GET methods of the corresponding resources.

Tip. To properly form the input structure for a POST or PUT method, call the GET method for a resource that already exists. Copy the resulting structure and define all the necessary field values.

The API POST and PUT methods accept input data in JSON format.

The format of input data is specified in the HTTP Content-Type header.

Acceptable header values: application/x-yametrika+json or application/json.

Format of results

The Management API returns responses in UTF-8 encoding. Responses are in JSON format.

For example, the following request returns information about the app with the 1111 ID:

GET /management/v1/application/1111 HTTP/1.1
Authorization: OAuth 05dd3dd84ff948fdae2bc4fb91f13e22bb1f289ceef0037

Response example:

    "application": {
        "name": "Examples",
        "time_zone_name": "Europe/Moscow",
        "hide_address": false,
        "gdpr_agreement_accepted": false,
        "use_universal_links": false,
        "id": 1111,