List of permissions

Returns information about permissions to manage the counter and view statistics. This data can be retrieved by the counter owner or a user with counter edit rights. If you don't have the edit permission , ask the counter owner to grant it to you.

Request

GET

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

Path parameters

Name

Description

counterId*

Type: integer<int32>

ID of the counter for which you want to view the list of permissions.
Example: 2215573

Query parameters

Name

Description

callback

Type: string

Callback function that processes the API response.

Responses

200 OK

OK

Body

application/json
{
    "grants": [
        {
            "user_login": "string",
            "perm": "string",
            "created_at": "2022-12-29T18:02:01Z",
            "comment": "string",
            "partner_data_access": false
        },
        {
            "user_login": "string",
            "perm": "string",
            "created_at": "2022-12-29T18:02:01Z",
            "comment": "string",
            "partner_data_access": false,
            "access_filters": [
                {
                    "id": 0,
                    "name": "string"
                }
            ]
        }
    ]
}

Name

Description

grants

Type: (CounterGrantE or AccessFiltersGrantE)[]

Permission to manage the counter and view statistics.

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.

comment

Type: string

Custom comment. The maximum number of characters is 255.

Min length: 0

Max length: 255

created_at

Type: string<date-time>

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

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).

AccessFiltersGrantE

Name

Description

access_filters*

Type: AccessFiltersShortE[]

List of access filters granted to the user.

Min items: 1

Max items: 1

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.

comment

Type: string

Custom comment. The maximum number of characters is 255.

Min length: 0

Max length: 255

created_at

Type: string<date-time>

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

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).

AccessFiltersShortE

List of access filters granted to the user.

Name

Description

id

Type: integer<int32>

Access filter ID.

name

Type: string

Access filter name.

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