Access¶
Get a list of authorized users and their project permissions¶
GET /project/access/get-authorized-users You can use this method in order to acquire a list of authorized users and their project permissions.
curl 'https://cloud.roistat.com/api/v1/project/access/get-authorized-users?project=12345' \
    --request POST \
    --header 'Content-type: application/json' \ 
    --header 'Api-key: {KEY}'
{
    "authorized_users": [
        {
            "email": "example_1@mail.com",
            "name": null,
            "access": "owner"
        },
        {
            "email": "example_2@mail.com",
            "name": null,
            "access": "read"
        }
    ],
    "status": "success"
}
Query String:
| Parameter | Type | Description | Required | 
|---|---|---|---|
| project | string | Project number | yes | 
Request Body:
No parameters.
| Parameter | Type | Description | 
|---|---|---|
| authorized_users | array[object] | |
| string | User's email address | |
| > name | null или string | User name if specified in the profile | 
| > access | string | Project permissions: owner - owner of the project; read - can read only; write - can read and change. |  
| status | string | 
Alter project permissions for users¶
POST /project/access/change You can use this method in order to acquire a list of authorized users and their project permissions.
curl 'https://cloud.roistat.com/api/v1/project/access/change?project=12345' \
    --request POST \
    --header 'Content-type: application/json' \ 
    --header 'Api-key: {KEY}' \ 
    --data Request body - see below
Request Body:
{
    "email": "example@mail.com",
    "access": "read"
}
{
    "status": "success"
}
Query String:
| Parameter | Type | Description | Required | 
|---|---|---|---|
| project | string | Project number | yes | 
Request Body:
| Parameter | Type | Description | Required | 
|---|---|---|---|
| string | User's email address | yes | |
| access | string | New project permissions: write - read and change; read - read only; none - access denied. |  yes | 
| Parameter | Type | Description | 
|---|---|---|
| status | string |