Information about the current user's permissions

Returns information about the authorized user's permissions to manage the counter and view statistics.

Request

GET

https://api-metrika.yandex.net/management/v1/counter/{counterId}/my_grant

Path parameters

Name

Description

counterId

Type: integer

Counter ID.

Responses

200 OK

OK

Body

application/json
{
  "grant": {
    "user_login": "example",
    "user_uid": 0,
    "perm": "example",
    "created_at": "2025-01-01T00:00:00Z",
    "comment": "example",
    "email": "example",
    "partner_data_access": true
  }
}

Name

Description

grant

One of 2 types
  • Type: CounterGrantE

    List of structures with information on access rights to the counter.

    Example
    {
      "user_login": "example",
      "user_uid": 0,
      "perm": "example",
      "created_at": "2025-01-01T00:00:00Z",
      "comment": "example",
      "email": "example",
      "partner_data_access": true
    }
    
  • Type: AccessFiltersGrantE

    Example
    {
      "user_login": "example",
      "user_uid": 0,
      "perm": "example",
      "created_at": "2025-01-01T00:00:00Z",
      "comment": "example",
      "email": "example",
      "partner_data_access": true,
      "access_filters": [
        {
          "id": 0,
          "name": "example"
        }
      ]
    }
    
Example
{
  "user_login": "example",
  "user_uid": 0,
  "perm": "example",
  "created_at": "2025-01-01T00:00:00Z",
  "comment": "example",
  "email": "example",
  "partner_data_access": true
}

CounterGrantE

List of structures with information on access rights to the counter.

Name

Description

perm

Type: string

Access level:

  • public_stat: Public access to statistics.
  • view: Read only.
  • edit: Full access.
  • analyst: Analyst.
  • analyst_access_filter: Data analyst with filter-based access.

Example: example

comment

Type: string

Custom comment. The maximum number of characters is 255.

Min length: 0

Max length: 255

Example: example

created_at

Type: string<date-time>

Date when the permission was granted in YYYY-MM-DD'T'hh:mm:ssZ format.

Example: 2025-01-01T00:00:00Z

partner_data_access

Type: boolean

Access to the Monetization report group. The user can view reports and add dimensions and metrics from the Monetization group to other reports. Users with edit permissions already have access to the reports within the "Monetization" group. Possible values:

  • true: Access granted.
  • false: Access denied.

user_login

Type: string

Login of a user with counter management rights. This parameter contains an empty string if counter statistics are in public access (perm = public_stat).

Example: example

Example
{
  "user_login": "example",
  "perm": "example",
  "created_at": "2025-01-01T00:00:00Z",
  "comment": "example",
  "partner_data_access": true
}

AccessFiltersShortE

List of access filters granted to the user.

Name

Description

id

Type: integer

Access filter ID.

name

Type: string

Access filter name.

Example: example

Example
{
  "id": 0,
  "name": "example"
}

AccessFiltersGrantE

All of 2 types
  • Type: CounterGrantE

    List of structures with information on access rights to the counter.

    Example
    {
      "user_login": "example",
      "user_uid": 0,
      "perm": "example",
      "created_at": "2025-01-01T00:00:00Z",
      "comment": "example",
      "email": "example",
      "partner_data_access": true
    }
    
  • Type: object

    access_filters

    Type: AccessFiltersShortE[]

    Min items: 1

    Max items: 1

    Example
    [
      {
        "id": 0,
        "name": "example"
      }
    ]
    
    Example
    {
      "access_filters": [
        {
          "id": 0,
          "name": "example"
        }
      ]
    }
    
Example
{
  "user_login": "example",
  "user_uid": 0,
  "perm": "example",
  "created_at": "2025-01-01T00:00:00Z",
  "comment": "example",
  "email": "example",
  "partner_data_access": true,
  "access_filters": [
    {
      "id": 0,
      "name": "example"
    }
  ]
}

No longer supported, please use an alternative and newer version.