Changing permissions
Changes the setting for managing a tag and viewing statistics for the specified permission.
Request
PUT
https://api-metrika.yandex.net/management/v1/counter/{counterId}/grant
Path parameters
|
Name |
Description |
|
counterId |
Type: integer Tag ID. |
Body
application/json
{
"grant": {
"user_login": "example",
"perm": "example",
"created_at": "2025-01-01T00:00:00Z",
"comment": "example",
"partner_data_access": true
}
}
|
Name |
Description |
|
grant |
One of 2 types
Example
|
CounterGrantE
List of structures with information on access rights to the tag.
|
Name |
Description |
|
perm |
Type: string Access level:
Example: |
|
comment |
Type: string Arbitrary comment. The maximum number of characters is 255. Min length: Max length: Example: |
|
created_at |
Type: string<date-time> Date when the permission was granted in YYYY-MM-DD'T'hh:mm:ssZ format. Example: |
|
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 tag management rights. This parameter contains an empty string if tag statistics are in public access ( 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
{
"id": 0,
"name": "example"
}
AccessFiltersGrantE
All of 2 types
-
Type: CounterGrantE
List of structures with information on access rights to the tag.
Example
{ "user_login": "example", "perm": "example", "created_at": "2025-01-01T00:00:00Z", "comment": "example", "partner_data_access": true } -
Type: object
access_filters
Type: AccessFiltersShortE[]
Min items:
1Max items:
1Example
[ { "id": 0, "name": "example" } ]Example
{ "access_filters": [ { "id": 0, "name": "example" } ] }
Example
{
"user_login": "example",
"perm": "example",
"created_at": "2025-01-01T00:00:00Z",
"comment": "example",
"partner_data_access": true,
"access_filters": [
{
"id": 0,
"name": "example"
}
]
}
Responses
200 OK
OK
Body
application/json
{
"grant": {
"user_login": "example",
"perm": "example",
"created_at": "2025-01-01T00:00:00Z",
"comment": "example",
"partner_data_access": true
}
}
|
Name |
Description |
|
grant |
One of 2 types
Example
|