Creating permissions
Creates permissions to manage a counter and view statistics.
Request
POST
https://api-metrica.yandex.net/management/v1/counter/{counterId}/grants
Path parameters
Name |
Description |
counterId* |
Type: integer<int32> ID of the counter for which you want to create permissions. |
Body
application/json
{
"grant": {
"user_login": "string",
"user_uid": 0,
"perm": "string",
"created_at": "2022-12-29T18:02:01Z",
"comment": "string",
"partner_data_access": false
}
}
Name |
Description |
grant* |
Type: CounterGrantE or AccessFiltersGrantE |
CounterGrantE
List of structures with information on access rights to the counter.
Name |
Description |
perm* |
Type: string Access level:
|
comment |
Type: string Arbitrary comment. The maximum number of characters is 255. Min length: Max length: |
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. If the user has edit rights, reports from the Monetization group are already available to them. Possible values:
|
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 ( |
user_uid |
Type: integer<int64> uid (Yandex ID) of a user with counter management rights. Parameter is 0 if counter statistics are in public access ( Note Optional request parameter. |
AccessFiltersGrantE
Name |
Description |
access_filters* |
Type: AccessFiltersShortE[] List of access filters granted to the user. Min items: Max items: |
perm* |
Type: string Access level:
|
comment |
Type: string Arbitrary comment. The maximum number of characters is 255. Min length: Max length: |
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. If the user has edit rights, reports from the Monetization group are already available to them. Possible values:
|
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 ( |
user_uid |
Type: integer<int64> uid (Yandex ID) of a user with counter management rights. Parameter is 0 if counter statistics are in public access ( Note Optional request parameter. |
AccessFiltersShortE
List of access filters granted to the user.
Name |
Description |
id |
Type: integer<int32> Access filter ID. |
name |
Type: string Access filter name. |
Responses
200 OK
OK
Body
application/json
{
"grant": {
"user_login": "string",
"user_uid": 0,
"perm": "string",
"created_at": "2022-12-29T18:02:01Z",
"comment": "string",
"partner_data_access": false
}
}
Name |
Description |
grant* |
Type: CounterGrantE List of structures with information on access rights to the counter. |
No longer supported, please use an alternative and newer version.