---
metadata:
  - name: generator
    content: Diplodoc Platform v5.48.2
alternate:
  - https://yandex.com/dev/metrika/en/management/openapi/grant/myGrant.md
  - https://yandex.com/dev/metrika/ru/management/openapi/grant/myGrant.md
---
> **Documentation Index:** Fetch the complete configuration index at https://yandex.com/dev/metrika/ru/llms.txt

<!-- source: ru/management-src/Upravlenie-dostupami/myGrant.md -->
<div class="openapi">

# Информация о разрешении текущего пользователя

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

Возвращает информацию о разрешениях на управление счетчиком и просмотр статистики для авторизированного пользователя.

## Request

<div class="openapi__requests">

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

<div class="openapi__request">

GET {.openapi__method}
```text translate=no
https://api-metrika.yandex.net/management/v1/counter/{counterId}/my_grant
```

</div>

</div>

</div>

### Path parameters

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

_counterId_{.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
{
  "grant": {
    "user_login": "example",
    "perm": "example",
    "created_at": "2025-01-01T00:00:00Z",
    "comment": "example",
    "partner_data_access": true
  }
}
```

{% endcut %}

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

_grant_{.json-schema-reset .json-schema-property .json-schema-required}
{.table-cell}|
{% cut "**One of 2 types**" %}{.json-schema-combinators data-marker=or}

- **Type**: [CounterGrantE](#entity-CounterGrantE)

  Список структур с информацией о правах доступа к счетчику.

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

  ```json translate=no
  {
    "user_login": "example",
    "perm": "example",
    "created_at": "2025-01-01T00:00:00Z",
    "comment": "example",
    "partner_data_access": true
  }
  ```

  {% endcut %}

- **Type**: [AccessFiltersGrantE](#entity-AccessFiltersGrantE)

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

  ```json translate=no
  {
    "user_login": "example",
    "perm": "example",
    "created_at": "2025-01-01T00:00:00Z",
    "comment": "example",
    "partner_data_access": true,
    "access_filters": [
      {
        "id": 0,
        "name": "example"
      }
    ]
  }
  ```

  {% endcut %}

{% endcut %}

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

```json translate=no
{
  "user_login": "example",
  "perm": "example",
  "created_at": "2025-01-01T00:00:00Z",
  "comment": "example",
  "partner_data_access": true
}
```

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

</div>

<div class="openapi-entity">

### CounterGrantE {#entity-CounterGrantE}

Список структур с информацией о правах доступа к счетчику.

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

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

Уровень доступа:
- `public_stat` — публичный доступ к статистике.
- `view` — только просмотр.
- `edit` — полный доступ.
- `analyst` — аналитик.
- `analyst_access_filter` — аналитик данных через фильтр.


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

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

Произвольный комментарий. Количество символов не должно превышать 255.

_Min length:_{.json-schema-reset .json-schema-assertion} `0`

_Max length:_{.json-schema-reset .json-schema-assertion} `255`

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

_created_at_{.json-schema-reset .json-schema-property}
{.table-cell}|
**Type**: string&lt;date-time&gt;

Дата предоставления доступа в формате YYYY-MM-DD'T'hh:mm:ssZ.

_Example:_{.json-schema-reset .json-schema-example} `2025-01-01T00:00:00Z`
{.table-cell}
||
||

_partner_data_access_{.json-schema-reset .json-schema-property}
{.table-cell}|
**Type**: boolean

Доступ к группе отчетов «Монетизация». Пользователь сможет просматривать отчеты, добавлять группировки и метрики из группы «Монетизация» в другие отчеты.
Если у пользователя есть доступ на редактирование, то ему уже доступны отчеты группы «Монетизация».
Возможные значения:
- `true` — доступ разрешен;
- `false` — доступ не разрешен.
{.table-cell}
||
||

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

Логин пользователя, которому выдано разрешение на управление счетчиком. Параметр содержит пустую строку, если к статистике счетчика предоставлен публичный доступ (`perm = public_stat`).

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

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

```json translate=no
{
  "user_login": "example",
  "perm": "example",
  "created_at": "2025-01-01T00:00:00Z",
  "comment": "example",
  "partner_data_access": true
}
```

{% endcut %}

</div>

<div class="openapi-entity">

### AccessFiltersShortE {#entity-AccessFiltersShortE}

Список фильтров доступа, к которым выдано разрешение.

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

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

id фильтра доступа.
{.table-cell}
||
||

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

Название фильтра доступа.

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

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

```json translate=no
{
  "id": 0,
  "name": "example"
}
```

{% endcut %}

</div>

<div class="openapi-entity">

### AccessFiltersGrantE {#entity-AccessFiltersGrantE}

{% cut "**All of 2 types**" %}{.json-schema-combinators data-marker=and}

- **Type**: [CounterGrantE](#entity-CounterGrantE)

  Список структур с информацией о правах доступа к счетчику.

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

  ```json translate=no
  {
    "user_login": "example",
    "perm": "example",
    "created_at": "2025-01-01T00:00:00Z",
    "comment": "example",
    "partner_data_access": true
  }
  ```

  {% endcut %}

- {% cut "**Type**: object" %}

  #|
  ||

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

  _Min items:_{.json-schema-reset .json-schema-assertion} `1`

  _Max items:_{.json-schema-reset .json-schema-assertion} `1`

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

  ```json translate=no
  [
    {
      "id": 0,
      "name": "example"
    }
  ]
  ```

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

  {% endcut %}

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

  ```json translate=no
  {
    "access_filters": [
      {
        "id": 0,
        "name": "example"
      }
    ]
  }
  ```

  {% endcut %}

{% endcut %}

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

```json translate=no
{
  "user_login": "example",
  "perm": "example",
  "created_at": "2025-01-01T00:00:00Z",
  "comment": "example",
  "partner_data_access": true,
  "access_filters": [
    {
      "id": 0,
      "name": "example"
    }
  ]
}
```

{% endcut %}

</div>

</div>

</div>
<!-- endsource: ru/management-src/Upravlenie-dostupami/myGrant.md -->

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