Changing permissions

Changes the setting for managing a tag and viewing statistics for the specified permission.

  1. Request syntax
  2. In the request body
  3. Response format

Request syntax

counterId: Tag ID

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

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 (perm = public_stat)

user_uid

uid of a user with tag management rights.

Parameter is 0 if tag statistics are in public access (perm = public_stat)

perm Permission level.

Possible values:

  • public_stat: Public access to statistics.
  • view: Read only.
  • edit: Full access.
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:

  • true: Access granted.
  • false: Access denied.
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 (perm = public_stat)

user_uid

uid of a user with tag management rights.

Parameter is 0 if tag statistics are in public access (perm = public_stat)

perm Permission level.

Possible values:

  • public_stat: Public access to statistics.
  • view: Read only.
  • edit: Full access.
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:

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

Sample request

PUT https://api-metrika.yandex.net/management/v1/counter/{counterId}/grant?

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 (perm = public_stat)

user_uid

uid of a user with tag management rights.

Parameter is 0 if tag statistics are in public access (perm = public_stat)

perm Permission level.

Possible values:

  • public_stat: Public access to statistics.
  • view: Read only.
  • edit: Full access.
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:

  • true: Access granted.
  • false: Access denied.
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 (perm = public_stat)

user_uid

uid of a user with tag management rights.

Parameter is 0 if tag statistics are in public access (perm = public_stat)

perm Permission level.

Possible values:

  • public_stat: Public access to statistics.
  • view: Read only.
  • edit: Full access.
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:

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