Get started
Last updated
Was this helpful?
Last updated
Was this helpful?
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.
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. .
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.
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.
Let's create a new partner and see what we can do and what the responses might look like.
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:
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.
Let's rename our newly created partner.
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:
Let's update our newly created and renamed partner allocated storage capacity.
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:
All of these details are also available in the user interface except for id and distributorId.
Expand GET /contract/{contractID}/partners and click the Try it out button.
Expand POST /partner and click the Try it out button.
You can set allocatedCapacity value to "0" if you'd like that partner to use the "" model.
Expand PUT /partner/{partnerID} and click the Try it out button.
Expand PUT /partner/{partnerID} and click the Try it out button.