Creating permissions
Creates permissions to manage a tag and view statistics.
Request syntax
counterId
: ID of the tag for which you want to create a permission.
https://api-metrika.yandex.net/management/v1/counter/{counterId}/grants
?
In the request body
{
"grant" : {
"user_login" : < string > ,
"user_uid" : < long > ,
"perm" : < grant_type > ,
"comment" : < string > ,
"partner_data_access" : < boolean >
}
}
Parameters | Description |
---|---|
grant | Permission to manage the tag and view statistics. |
grant | |
user_login | Login of a user with tag management rights. This parameter contains an empty string if tag statistics are in public access ( |
user_uid | uid of a user with tag management rights. Parameter is 0 if tag statistics are in public access ( |
perm | Permission level. Possible values:
|
comment | Arbitrary comment. The maximum number of characters is 255. |
partner_data_access | 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:
|
Parameters | Description |
---|---|
grant | Permission to manage the tag and view statistics. |
grant | |
user_login | Login of a user with tag management rights. This parameter contains an empty string if tag statistics are in public access ( |
user_uid | uid of a user with tag management rights. Parameter is 0 if tag statistics are in public access ( |
perm | Permission level. Possible values:
|
comment | Arbitrary comment. The maximum number of characters is 255. |
partner_data_access | 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:
|
Sample request
POST https://api-metrika.yandex.net/management/v1/counter/{counterId}/grants?
Response format
{
"grant" : {
"user_login" : < string > ,
"user_uid" : < long > ,
"perm" : < grant_type > ,
"created_at" : < date > ,
"comment" : < string > ,
"partner_data_access" : < boolean >
}
}
Parameters | Description |
---|---|
grant | Permission to manage the tag and view statistics. |
grant | |
user_login | Login of a user with tag management rights. This parameter contains an empty string if tag statistics are in public access ( |
user_uid | uid of a user with tag management rights. Parameter is 0 if tag statistics are in public access ( |
perm | Permission level. Possible values:
|
created_at | Date when the permission was granted in YYYY-MM-DD'T'hh:mm:ssZ format. |
comment | Arbitrary comment. The maximum number of characters is 255. |
partner_data_access | 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:
|
Parameters | Description |
---|---|
grant | Permission to manage the tag and view statistics. |
grant | |
user_login | Login of a user with tag management rights. This parameter contains an empty string if tag statistics are in public access ( |
user_uid | uid of a user with tag management rights. Parameter is 0 if tag statistics are in public access ( |
perm | Permission level. Possible values:
|
created_at | Date when the permission was granted in YYYY-MM-DD'T'hh:mm:ssZ format. |
comment | Arbitrary comment. The maximum number of characters is 255. |
partner_data_access | 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:
|