Question about API
Hi, i have some questions about the api.
When i create a new client their status are Trial. How can i change to active? I didn't found the parameter for this.
My second question are about users and permitions. When i create a new user to client, how can i set your role and your data source? About the data source. I would like to use the same ones i used for the client.

- Log in to post comments

Jason, thanks for providing detailed info on those operations in the cloud console.
Eric, let me explain how you can do this via API.
Changing client mode from trial to production is done with /tenants/{tenant_id}/pricing endpoint. Example:
PUT https://mc-beta-cloud.acronis.com/api/2/tenants/{id}/pricing
{
"version": 1497533157730,
"mode": "production",
"currency": "USD"
}
Setting user permissions is done with
/users/{user_id}/access_policies endpoint. Example:
PUT
https://mc-beta-cloud.acronis.com/api/2/users/{id}/access_policies
{
"items": [
{
"id": "fb261178-06bc-4268-9337-9639e049e1c8",
"tenant_id": "72acaf6a-b15a-11e6-80f5-76304dec7eb7",
"role_id": "unit_admin",
"version": 1,
...
}
]
}
To set the same scope of data sources as for tenant:
1) Get the list of data sources on tenant level:
GET
https://mc-beta-cloud.acronis.com/api/2/tenants/{id}/offering_items
2) Get the personal tenant ID for the user:
GET https://mc-beta-cloud.acronis.com/api/2/users/{id}
{
"personal_tenant_id":"3e6ebcd4-569d-446a-9a65-f6b1ea47368a",
"tenant_id":"03a27efb-03e8-45a1-adca-3fb4abb620d4",
"login":"cpanelbackup",
"id":"6aee2bdf-0a8d-4cd6-afd4-60a278b3c346",
...
}
3) Set the data sources for personal tenant:
PUT
https://mc-beta-cloud.acronis.com/api/2/tenants/{id}/offering_items
Let me know if all is clear now.
- Log in to post comments

Setting user permissions is done with
/users/{user_id}/access_policies endpoint. Example:
PUT
https://mc-beta-cloud.acronis.com/api/2/users/{id}/access_policies{ "items": [ { "id": "fb261178-06bc-4268-9337-9639e049e1c8", "tenant_id": "72acaf6a-b15a-11e6-80f5-76304dec7eb7", "role_id": "unit_admin", "version": 1, ... } ] }
To use this api I need some parameters that I do not know.
- issuer_id
- trustee_id
- trustee_type
To set the same scope of data sources as for tenant:
1) Get the list of data sources on tenant level:
GET
https://mc-beta-cloud.acronis.com/api/2/tenants/{id}/offering_items2) Get the personal tenant ID for the user:
GET https://mc-beta-cloud.acronis.com/api/2/users/{id}
{
"personal_tenant_id":"3e6ebcd4-569d-446a-9a65-f6b1ea47368a", "tenant_id":"03a27efb-03e8-45a1-adca-3fb4abb620d4", "login":"cpanelbackup", "id":"6aee2bdf-0a8d-4cd6-afd4-60a278b3c346", ... }3) Set the data sources for personal tenant:
PUT
https://mc-beta-cloud.acronis.com/api/2/tenants/{id}/offering_items
When i execute the last step, i get the response: could not be turned on for Unit tenant
Now i have one more question. How can i send user email activation via api?
- Log in to post comments

Setting user permissions is done with
/users/{user_id}/access_policies endpoint. Example:
PUT
https://mc-beta-cloud.acronis.com/api/2/users/{id}/access_policies{ "items": [ { "id": "fb261178-06bc-4268-9337-9639e049e1c8", "tenant_id": "72acaf6a-b15a-11e6-80f5-76304dec7eb7", "role_id": "unit_admin", "version": 1, ... } ] }
To use this api I need some parameters that I do not know.
issuer_id
trustee_id
trustee_type
To set the same scope of data sources as for tenant:
1) Get the list of data sources on tenant level:
GET
https://mc-beta-cloud.acronis.com/api/2/tenants/{id}/offering_items2) Get the personal tenant ID for the user:
GET https://mc-beta-cloud.acronis.com/api/2/users/{id}
{
"personal_tenant_id":"3e6ebcd4-569d-446a-9a65-f6b1ea47368a", "tenant_id":"03a27efb-03e8-45a1-adca-3fb4abb620d4", "login":"cpanelbackup", "id":"6aee2bdf-0a8d-4cd6-afd4-60a278b3c346", ... }3) Set the data sources for personal tenant:
PUT
https://mc-beta-cloud.acronis.com/api/2/tenants/{id}/offering_items
on the last step i get this response. Could not be turned on for Unit tenant.
Now i have one more question. How can i send email activation via api?
- Log in to post comments

Hi Eric,
To use this api I need some parameters that I do not know.
To get any value that you don't have, run GET on the same endpoint. You will receive current values and can change only those that you need ("role_id").
on the last step i get this response. Could not be turned on for Unit tenant.
You either use a Unit tenant ID instead of personal tenant ID, or you try to enable the offering items that are not available for users. To troubleshoot I suggest you to use Web Inspector from Developer Tools and see which requests are being made to modify the user quotas. See attached file.
Now i have one more question. How can i send email activation via api?
This endpoint is currently available in APIv1 only. Use following method:
POST https://mc-beta-cloud.acronis.com/api/1/actions/mail/activate
Attachment | Size |
---|---|
501750-168594.png | 788.14 KB |
- Log in to post comments
Please accept my apologies
I was working in the "Acronis Backup Cloud" forum and never realised that I clicked on the "Acronis Cloud Integrations and API"
And before I could correct myself Dmitry came to the rescue, I can second what Dmitry has provided and this will definitely help you.
- Log in to post comments

To get any value that you don't have, run GET on the same endpoint. You will receive current values and can change only those that you need ("role_id").
When I use get method returns to the empty list. Then i tried to use method post to create access polices. I use the required parameters. "issuer_id", "tenant_id" = "user_id", "role_id"
but didn't wort too. Returns a unexpected error.
{"code":405,"message":null,"details":{"info":null},"domain":"PlatformAccountServer","context":{}}}
You either use a Unit tenant ID instead of personal tenant ID, or you try to enable the offering items that are not available for users. To troubleshoot I suggest you to use Web Inspector from Developer Tools and see which requests are being made to modify the user quotas. See attached file.
I used a personal tenant and i have the same response: Could not be turned on for Unit tenant .
- Log in to post comments

Hi, Erico!
You can find detailed APIs documentation at the Acronis Developer Network portal https://developer.acronis.com/doc
It includes all the parameters descriptions and possible valules.
As well, you can check Python and PHP samples at GitHub https://github.com/acronis
- Log in to post comments