Skip to main content

Question about API

Thread needs solution
Beginner
Posts: 2
Comments: 3

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.

0 Users found this helpful
Forum Member
Posts: 3
Comments: 72

#1

Hi Eric

When you create a new customer there is a drop down list under "Mode" which defaults to "Production" when you leave it as production and continue with creating the customer the customer will be created as a "Production" customer.

Should you at any point wish to change from "Trial" to "Production" this is done in the Backup Management Console

Next to the customer name you will see three dots > Click on this once > Click configure > At the top you will see the customer name with the word "Trial" in blue > Next to this there are three dots click this once > Click switch to production

Creating users is also done when setting up the customer:

When you get to select services - Here you can specify which services a customer should have for example Backup & Disaster recovery etc

The next section is called "Configure services" - Here you specify how many licenses a customer has for workstations etc as well as how much data they may store locally and in the cloud.

The next section is the "Create administrator" - Here you specify the customer administrator

Should you wish to change any of this it is again done from the backup management console > click the three dots next to customer name > Configure

Should you wish to add more users - Again from the backup management console > Three dots next to customer name > but this time click "Go to" > In the left pane click users > Here you will see the company administrator which you created for the company when creating the customer (Please note that this user must have the role of Company Administrator > From here you can create new users 

I hope this answers your question?

 

Acronis Program Manager
Posts: 7
Comments: 166

#2

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.

Beginner
Posts: 2
Comments: 3

#3
 
 
Thanks Jason for the support, but I really need to execute by api

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_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

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?

 

 

Beginner
Posts: 2
Comments: 3

#4
 

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_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

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?

Acronis Program Manager
Posts: 7
Comments: 166

#5

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
Forum Member
Posts: 3
Comments: 72

#6

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.

Beginner
Posts: 2
Comments: 3

#7
 

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 .

 

Beginner
Posts: 1
Comments: 6

#8

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