Get started
Here are a few simple steps to demonstrate some capabilities of Impossible Cloud's Management Console API. Let's go through them step-by-step.
Authorize and get list of contracts
Prepare authentication by creating an API key.
Expand GET /contract/list and click Try it out and then Execute to receive the list of the available contracts. List of key terms.
If you have contracts associated with your Partner Portal account, you should receive a response body containing all your contracts, for example:
Where:
id or the contract id, is the unique identifier of the particular contract;
distributorId is the unique identifier of your distributor account;
reservedCapacity is the total storage capacity in bytes associated with this particular contract id;
allocatedCapacity is the storage in bytes already allocated to your partners;
costStorageGBCents is the excess usage fee per GB/month. This price only applies if you go above your reserved capacity or allocated storage;
costEgressGBCents is the excess egress fee per GB/month as per your agreement with Impossible Cloud;
currency is your actual currency used for the billing purposes;
details is the name of the contract.
All of these details are also available in the Management Console user interface except for id and distributorId.
Get list of partners from a particular contract
Expand GET /contract/{contractID}/partners in the Swagger web interface and click the Try it out button.
Copy a contract id (id) of the contract you'd like to view (which you will have received in the previous step) and paste it into the contractID field.
Click "Execute".
If you have some partners under that contract, you should receive a response body containing those partners, for example:
Where:
id is the unique identifier of the particular partner;
distributorContractId is the unique identifier of your distributor account;
name is the name of the partner;
allocatedCapacity is the storage in bytes already allocated to that partner.
Creating a new partner
Let's create a new partner and see what we can do and what the responses might look like.
Expand POST /partner in the Swagger web interface and click the Try it out button.
Edit the partnerDetails field:
Change the allocatedCapacity to the number of bytes you'd like to allocate to the new partner
Copy your distributorContractId from the previous request and paste it between quotes in the appropriate part of the request body as the value of the distributorContractId key;
Enter the new partner name as the value of the name key.
Let's say we'd like to create a new partner named "New partner company" with the allocated capacity of 5 TB. Eventually, the partnerDetails field should look like this:
You can set allocatedCapacity value to "0" if you'd like that partner to use the "Pay-per-use" model.
Click "Execute".
If the body is correct and there is enough capacity to be allocated, you should receive a response body containing information about the newly created partner:
Where:
id is the unique identifier of the new partner;
distributorContractId is the unique identifier of your distributor account;
name is the name of the new partner;
allocatedCapacity is the storage allocated to that partner just now.
Changing partner's name
Let's rename our newly created partner.
Expand PUT /partner/{partnerID} in the Swagger web interface and click the Try it out button.
Edit the partnerID field:
Copy the partner's id from the previous request and paste it to the "partnerID field.
Edit the partnerDetails field:
Let's say we'd like to rename the partner to "Renamed partner". Eventually, the partnerDetails field should look like this:
Click "Execute".
If the body is correct and the new name is correct, you should receive a response body like this:
Updating partner's allocated capacity
Let's update our newly created and renamed partner allocated storage capacity.
Expand PUT /partner/{partnerID} in the Swagger web interface and click the Try it out button.
Edit the partnerID field:
Copy the partner's id from the previous request and paste it to the "partnerID field.
Edit the partnerDetails field:
Let's say we'd like to change the partner's allocated storage capacity to 250 MB. Eventually, the partnerDetails field should look like this:
Click "Execute".
If the body is correct and the new name is correct, you should receive a response body like this:
You can update partner's name and change the partner's allocated capacity within a single request. In this case, the partnerDetails body will look like this: { "allocatedCapacity": 250000000,
"name": "Renamed partner" }
Last updated
Was this helpful?