Create permission

Creates public permission for viewing statistics.

  1. Request syntax
  2. Response format

Request syntax

counterId — counter ID. for which you want to create permission.

POST https://api-metrika.yandex.net/management/v1/counter/{counterId}/public_grant

Request example

POST https://api-metrica.yandex.net/management/v1/counter/{counterId}/public_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.

Parameter contains empty string, if public access is provided to the statistics of the counter (perm = public_stat)

perm Access level.

Possible values:

  • public_stat — public access to statistics;
created_at

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

comment

Any comment. 255 characters maximum.