Granting access
Grants access to statistics to a specific user or agency.
Request format
POST https://api.appmetrica.yandex.ru/management/v1/application/{id}/grants
|
App ID |
Request body
{
"grant": {
"user_login": "string",
"perm": "string",
"partners": [ int, int ],
"event_labels": ["string", "string"]
}
}
|
Yandex email address (login) of the user who is granted access. |
|
Access level. Possible values:
To learn more about access levels, see Managing app access. |
|
IDs of advertising partners that are granted access. To get a list of all partners, use the Partner list method. This is a required field when granting Note If you're granting agency-level access, be sure to specify at least one advertising partner ID. |
|
Target events for which agencies can view statistics. This is an additional field when granting |
Response format
{
"grant" : {
"user_login" : "string",
"user_uid" : int,
"perm" : "string",
"comment" : "string",
"partners" : [ int, int ],
"event_labels" : [ "string", "string" ]
}
|
Yandex email address (login) of the user who is granted access. |
|
ID of the user who is granted access. |
|
Access level. Possible values:
To learn more about access levels, see Managing app access. |
|
A comment. |
|
IDs of advertising partners that are granted access. To get a list of all partners, use the Partner list method. |
|
Target events for which agencies can view statistics. |
Example
curl -X POST \
'https://api.appmetrica.yandex.ru/management/v1/application/1111/grants' \
-H 'Content-Type: application/json' \
-H 'Authorization: OAuth 05dd3dd84ff948fdae2bc4fb91f13e22bb1f289ceef0037' \
-d '{
"grant": {
"user_login": "user_login",
"perm": "agency_view",
"partners": [ 145375 ],
"event_labels": ["Checkout", "Proceed to cart"]
}
}'
POST /management/v1/application/1111/grants HTTP/1.1
Host: api.appmetrica.yandex.ru
Content-Type: application/json
Authorization: OAuth 05dd3dd84ff948fdae2bc4fb91f13e22bb1f289ceef0037
{
"grant": {
"user_login": "user_login",
"perm": "agency_view",
"partners": [ 145375 ],
"event_labels": ["Checkout", "Proceed to cart"]
}
}
If you didn't find the answer you were looking for, you can use the feedback form to submit your question. Please describe the problem in as much detail as possible. Attach a screenshot if possible.