List of log requests

Returns a list of log requests The response returns a list of all the logs for a tag that were requested from any username with access to the tag. To get compressed data, include the Accept-Encoding: gzip HTTP header in the request.

Request

GET

https://api-metrica.yandex.net/management/v1/counter/{counterId}/logrequests

Path parameters

Name

Description

counterId*

Type: integer<int32>

Tag ID.
Example: 2215573

Responses

200 OK

OK

Body

application/json
{
    "requests": [
        {
            "request_id": 0,
            "counter_id": 0,
            "source": [
                "string"
            ],
            "date1": "string",
            "date2": "string",
            "fields": [
                "string"
            ],
            "status": "string",
            "size": 0,
            "parts": [
                {
                    "part_number": 0,
                    "size": 0
                }
            ],
            "attribution": "string"
        }
    ]
}

Name

Description

requests

Type: LogRequest[]

Log request.

LogRequest

Log request.

Name

Description

attribution

Type: string

Attribution model. Possible values:

  • FIRST: First click.
  • LAST: Last click.
  • LASTSIGN: Last non-direct click.
  • LAST_YANDEX_DIRECT_CLICK: Last click from Yandex Direct.
  • CROSS_DEVICE_LAST_SIGNIFICANT: Last non-direct click (cross-device), including sessions from all the user's devices.
  • CROSS_DEVICE_FIRST: First non-direct click (cross-device), including sessions from all the user's devices.
  • CROSS_DEVICE_LAST_YANDEX_DIRECT_CLICK: Last click from Yandex Direct (cross-device), including sessions from all the user's devices.
  • CROSS_DEVICE_LAST: Last click (cross-device), including sessions from all the user's devices.
  • AUTOMATIC: Automatic attribution.

counter_id

Type: integer<int32>

Tag ID.

date1

Type: string

First day.

date2

Type: string

Last day.

fields

Type: string[]

List of fields.

parts

Type: LogRequestPart[]

Response parts.

request_id

Type: integer<int32>

Log request ID.

size

Type: integer

Size of logs in the request in bytes.

source

Type: string[]

Log source. Possible values:

  • hits: Events.
  • visits: Sessions.

Note

The ym:s:&lt;attribution&gt;RecommendationSystem and ym:s:&lt;attribution&gt;Messenger session parameters may return arrays with some data omitted:

  • There will be [] in the response if all pageview sources are unknown.
  • If an array contains multiple sources, some of which are known, while others are not, they will be comma-separated in the response.
  • An unknown source will be returned as an empty string. For example, [,,,telegram].

status

Type: string

Request status:

  • created: Created.
  • canceled: Canceled.
  • processed: Processed.
  • cleaned_by_user: Cleared by user.
  • cleaned_automatically_as_too_old: Cleared automatically.
  • processing_failed: Processing error.
  • awaiting_retry: To be restarted.

LogRequestPart

Response parts.

Name

Description

part_number

Type: integer<int32>

Part number.

size

Type: integer<int64>

Size in bytes.