Retrieving generated logs

  1. To create logs, use the request POST https://api-metrika.yandex.net/management/v1/counter/{counterId}/logrequests.

    If you're not sure you'll be able to export data, send the request GET https://api-metrika.yandex.net/management/v1/counter/{counterId}/logrequests/evaluate to gage this possibility.

  2. Once your request to generate logs is successful, save your request_id and wait for the log preparation to finish. You can check the log processing status with the request GET https://api-metrika.yandex.net/management/v1/counter/{counterId}/logrequest/{requestId}.

  3. A log with the processed status is ready for export. Export the log using the request GET https://api-metrika.yandex.net/management/v1/counter/{counterId}/logrequest/{requestId}/part/{partNumber}/download.

  4. After exporting, clear the logs prepared for download to free up space for subsequent requests. To do this, send the request POST https://api-metrika.yandex.net/management/v1/counter/{counterId}/logrequest/{requestId}/clean.

The service load can vary at different times. If you're unable to download the data, try again later or at a different time of day. All requests are processed in the order they're received, with each new request going to the end of the queue. If your request is in the created status, wait for it to complete.