---
metadata:
  - name: generator
    content: Diplodoc Platform v5.52.0
alternate:
  - https://yandex.ru/dev/metrika/en/logs/practice/quick-start.md
  - https://yandex.ru/dev/metrika/ru/logs/practice/quick-start.md
  - href: en/logs/practice/quick-start.md
    type: text/markdown
    title: Markdown version
  - href: ../../llms.txt
    type: text/markdown
    title: llms.txt
---
> **Documentation Index:** Fetch the complete configuration index at https://yandex.ru/dev/metrika/en/llms.txt

# Logs API use scenarios

1. To create logs, use the request [POST https://api-metrika.yandex.net/management/v1/counter/{counterId}/logrequests](https://yandex.ru/dev/metrika/en/logs/openapi/createLogRequest.md).

    If you're not sure you'll be able to export the data, send the request [GET https://api-metrika.yandex.net/management/v1/counter/{counterId}/logrequests/evaluate](https://yandex.ru/dev/metrika/en/logs/openapi/evaluate.md) to see if it's possible.

    {% note info "Restriction" %}

    You can request data for a period of no more than 1 year per request. For more information, see [Restrictions](https://yandex.ru/dev/metrika/en/logs/index.md#restrictions).

    {% endnote %}

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}](https://yandex.ru/dev/metrika/en/logs/openapi/getLogRequest.md).

3. Logs with a `processed` status are ready for export. Export the logs using the request [GET https://api-metrika.yandex.net/management/v1/counter/{counterId}/logrequest/{requestId}/part/{partNumber}/download](https://yandex.ru/dev/metrika/en/logs/openapi/download.md).

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](https://yandex.ru/dev/metrika/en/logs/openapi/clean.md).

Server load may vary throughout the day. If you're unable to export your data, please 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 has a `created` status, wait for it to complete.
