---
metadata:
  - name: generator
    content: Diplodoc Platform v5.52.0
alternate:
  - https://yandex.ru/dev/metrika/en/logs/openapi/clean.md
  - https://yandex.ru/dev/metrika/ru/logs/openapi/clean.md
  - href: ru/logs/openapi/clean.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/ru/llms.txt

<div class="openapi">

# Очистка подготовленных для загрузки логов обработанного запроса

<!-- markdownlint-disable-file -->

Очищает подготовленные для загрузки логи обработанного запроса.

## Request

<div class="openapi__requests">

<div class="openapi__request__wrapper" style="--method: var(--dc-openapi-methods-post);margin-bottom: 12px">

<div class="openapi__request">

POST {.openapi__method}
```text translate=no
https://api-metrika.yandex.net/management/v1/counter/{counterId}/logrequest/{requestId}/clean
```

</div>

</div>

</div>

### Path parameters

#|
|| **Name** | **Description** ||
||

_counterId_{.json-schema-reset .json-schema-property .json-schema-required}
{.table-cell}|
**Type**: integer

Идентификатор счетчика.
{.table-cell}
||
||

_requestId_{.json-schema-reset .json-schema-property .json-schema-required}
{.table-cell}|
**Type**: integer

Идентификатор запроса логов.
{.table-cell}
||
|#{.json-schema-properties}

## Responses

<div class="openapi__response__code__200">

## 200 OK

OK

<div class="openapi-entity">

### Body

{% cut "application/json" %}

```json translate=no
{
  "log_request": {
    "request_id": 0,
    "counter_id": 0,
    "source": [
      "example"
    ],
    "date1": "example",
    "date2": "example",
    "fields": [
      "example"
    ],
    "status": "example",
    "size": 0,
    "parts": [
      {
        "part_number": 0,
        "size": 0
      }
    ],
    "attribution": "example"
  }
}
```

{% endcut %}

#|
|| **Name** | **Description** ||
||

_log_request_{.json-schema-reset .json-schema-property}
{.table-cell}|
**Type**: [LogRequest](#entity-LogRequest)

Запрос логов.

{% cut "**Example**" %}{.json-schema-example}

```json translate=no
{
  "request_id": 0,
  "counter_id": 0,
  "source": [
    "example"
  ],
  "date1": "example",
  "date2": "example",
  "fields": [
    "example"
  ],
  "status": "example",
  "size": 0,
  "parts": [
    {
      "part_number": 0,
      "size": 0
    }
  ],
  "attribution": "example"
}
```

{% endcut %}
{.table-cell}
||
|#{.json-schema-properties}

</div>

<div class="openapi-entity">

### LogRequestPart {#entity-LogRequestPart}

Часть ответа

#|
|| **Name** | **Description** ||
||

_part_number_{.json-schema-reset .json-schema-property}
{.table-cell}|
**Type**: integer

Номер части.
{.table-cell}
||
||

_size_{.json-schema-reset .json-schema-property}
{.table-cell}|
**Type**: integer

Размер в байтах.
{.table-cell}
||
|#{.json-schema-properties}

{% cut "**Example**" %}{.json-schema-example}

```json translate=no
{
  "part_number": 0,
  "size": 0
}
```

{% endcut %}

</div>

<div class="openapi-entity">

### LogRequest {#entity-LogRequest}

Запрос логов.

#|
|| **Name** | **Description** ||
||

_attribution_{.json-schema-reset .json-schema-property}
{.table-cell}|
**Type**: string

Модель атрибуции. Возможные значения:
- `FIRST` — первый переход.
- `LAST` — последний переход.
- `LASTSIGN` — последний значимый переход.
- `LAST_YANDEX_DIRECT_CLICK` — последний переход из Директа.
- `CROSS_DEVICE_LAST_SIGNIFICANT` — последний значимый переход (кросс-девайс) с учетом визитов со всех устройств посетителя.
- `CROSS_DEVICE_FIRST` — первый переход (кросс-девайс) с учетом визитов со всех устройств посетителя.
- `CROSS_DEVICE_LAST_YANDEX_DIRECT_CLICK` — последний переход из Директа (кросс-девайс) с учетом визитов со всех устройств посетителя.
- `CROSS_DEVICE_LAST` — последний переход (кросс-девайс) с учетом визитов со всех устройств посетителя.
- `AUTOMATIC` — автоматическая атрибуция.


_Example:_{.json-schema-reset .json-schema-example} `example`
{.table-cell}
||
||

_counter_id_{.json-schema-reset .json-schema-property}
{.table-cell}|
**Type**: integer

Идентификатор счётчика.
{.table-cell}
||
||

_date1_{.json-schema-reset .json-schema-property}
{.table-cell}|
**Type**: string

Первый день.

_Example:_{.json-schema-reset .json-schema-example} `example`
{.table-cell}
||
||

_date2_{.json-schema-reset .json-schema-property}
{.table-cell}|
**Type**: string

Последний день.

_Example:_{.json-schema-reset .json-schema-example} `example`
{.table-cell}
||
||

_fields_{.json-schema-reset .json-schema-property}
{.table-cell}|
**Type**: string[]

{% cut "**Example**" %}{.json-schema-example}

```json translate=no
[
  "example"
]
```

{% endcut %}
{.table-cell}
||
||

_parts_{.json-schema-reset .json-schema-property}
{.table-cell}|
**Type**: [LogRequestPart](#entity-LogRequestPart)[]

{% cut "**Example**" %}{.json-schema-example}

```json translate=no
[
  {
    "part_number": 0,
    "size": 0
  }
]
```

{% endcut %}
{.table-cell}
||
||

_request_id_{.json-schema-reset .json-schema-property}
{.table-cell}|
**Type**: integer

Идентификатор запроса логов.
{.table-cell}
||
||

_size_{.json-schema-reset .json-schema-property}
{.table-cell}|
**Type**: integer

Размер логов запроса в байтах.
{.table-cell}
||
||

_source_{.json-schema-reset .json-schema-property}
{.table-cell}|
**Type**: string[]

{% cut "**Example**" %}{.json-schema-example}

```json translate=no
[
  "example"
]
```

{% endcut %}
{.table-cell}
||
||

_status_{.json-schema-reset .json-schema-property}
{.table-cell}|
**Type**: string

Статус запроса:
- `created` — создан.
- `canceled` — отменён.
- `processed` — обработан.
- `cleaned_by_user` — очищен пользователем.
- `cleaned_automatically_as_too_old` — очищен автоматически.
- `processing_failed` — ошибка при обработке.
- `awaiting_retry` — ожидает перезапуска.


_Example:_{.json-schema-reset .json-schema-example} `example`
{.table-cell}
||
|#{.json-schema-properties}

{% cut "**Example**" %}{.json-schema-example}

```json translate=no
{
  "request_id": 0,
  "counter_id": 0,
  "source": [
    "example"
  ],
  "date1": "example",
  "date2": "example",
  "fields": [
    "example"
  ],
  "status": "example",
  "size": 0,
  "parts": [
    {
      "part_number": 0,
      "size": 0
    }
  ],
  "attribution": "example"
}
```

{% endcut %}

</div>

</div>

</div>

[*Deprecated]: No longer supported, please use an alternative and newer version.