Changing permission

Changes setting of specified permission for managing counter and viewing statistics.

  1. Request syntax
  2. Request message body
  3. Response format

Request syntax

counterId — counter ID

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

Request message body


{
    "grant" : {
        "user_login" :  < string > ,
        "perm" :  < grant_type > ,
        "comment" :  < string > 
    }
}
Parameters Description
grant Permission to manage counter and view statistics.
grant
user_login

Login of user, which has been granted permission to manage counter.

perm Access level.

Possible values:

  • view — page views only;
  • edit — full access.
comment

Any comment. 255 characters maximum.

Request example

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

Response format


{
    "grant" : {
        "user_login" :  < string > ,
        "perm" :  < grant_type > ,
        "created_at" :  < date > ,
        "comment" :  < string > 
    }
}
Parameters Description
grant Permission to manage counter and view statistics.
grant
user_login

Login of user, which has been granted permission to manage counter.

perm Access level.

Possible values:

  • view — page views only;
  • edit — full access.
created_at

Date of granting access in the format YYYY-MM-DD'T'hh:mm:ssZ.

comment

Any comment. 255 characters maximum.