SkyAtlas Object Storage API
You can do the following with the Object Storage API.
Unlimited storage of objects with 5 GB each by default
Creation and storage of objects of any size
Using Cross-origin sharing to ensure object security
Compressing files with content encryption
Create a calendar for removal of objects
Mass removal of 10,000 objects in one request
The path should be as follows:
/v1/{account}/{container}/{object}
To Logged-In
In order to take the desired actions by using Openstack API, it is necessary to login with the user name and password transmitted by SkyAtlas.
credentials = {"auth": {
"passwordCredentials":{
"username":"<email>",
"password":"<password>"
},
"tenantId":"<tenant_id>"
}
}
response = requests.post("panel.skyatlas.com:5000/v3/auth/tokens",
data=json.dumps(credentials), headers={"content-type":"application/json"})
response_dict = response.json()
token_id = response_dict["access"]["token"]["id"]
SkyAtlas Account, Container, Objects API usage
Account details and Container listing (/ v1 / {account})
url = "https://istanbul-1-
kvm.skyatlas.com:8080/v1/AUTH_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/”account_name
”"
response = requests.get(url, headers={"x-auth-token": token_id})
pprint.pprint(response.content)
Creating, Modifying and Deleting Account Metadata
Creating, Modifying, Deleting Metadata (/ v1 / {account})
url = "https://istanbul-1-
kvm.skyatlas.com:8080/v1/AUTH_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/”account_name
”"
response = requests.post, headers={"x-auth-token": token_id})
pprint.pprint(response.content)
Changing Metadata (/v1/{account})
url = "https://istanbul-1-
kvm.skyatlas.com:8080/v1/AUTH_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/”account_name
”"
response = requests.put, headers={"x-auth-token": token_id})
pprint.pprint(response.content)
Metadata Removal (/ v1 / {account})
url = "https://istanbul-1-
kvm.skyatlas.com:8080/v1/AUTH_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/”account_name
”"
response = requests.put, headers={"x-auth-token": token_id})
pprint.pprint(response.content)
Container
Container details can be viewed, copied, changed and deleted with the Container API.
Viewing container details and object listing (/ v1 / {account} / {container})
url = "https://istanbul-1-
kvm.skyatlas.com:8080/v1/AUTH_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/”account_name
”/”container”"
response = requests.get, headers={"x-auth-token": token_id})
pprint.pprint(response.content)
Creating container (/ v1 / {account} / {container})
url = "https://istanbul-1-
kvm.skyatlas.com:8080/v1/AUTH_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/”account_name
”/”container”"
response = requests.post, headers={"x-auth-token": token_id})
pprint.pprint(response.content)
Container Removal (/v1/{account}/{container})
url = "https://istanbul-1-
kvm.skyatlas.com:8080/v1/AUTH_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/”account_name
”/”container”"
response = requests.delete, headers={"x-auth-token": token_id})
pprint.pprint(response.content)
Objects
With the API, objects can be created, details can be viewed, copied and deleted.
Object contents and Metadata Listing (/ v1 / {account} / {container} / {object})
url = "https://istanbul-1-
kvm.skyatlas.com:8080/v1/AUTH_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/”account_name
”/”container”/”object”"
response = requests.get, headers={"x-auth-token": token_id})
pprint.pprint(response.content)
Creating Object (/v1/{account}/{container}/{object})
url = "https://istanbul-1-
kvm.skyatlas.com:8080/v1/AUTH_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/”account_name
”/”container”/”object”"
response = requests.put, headers={"x-auth-token": token_id})
pprint.pprint(response.content)
Copying Object (/v1/{account}/{container}/{object})
url = "https://istanbul-1-
kvm.skyatlas.com:8080/v1/AUTH_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/”account_name
”/”container”/”object”"
response = requests.copy, headers={"x-auth-token": token_id})
pprint.pprint(response.content)
Showing Object Metadata (/v1/{account}/{container}/{object})
url = "https://istanbul-1-
kvm.skyatlas.com:8080/v1/AUTH_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/”account_name
”/”container”/”object”"
response = requests.head, headers={"x-auth-token": token_id})
pprint.pprint(response.content)
Object Removal (/v1/{account}/{container}/{object})
url = "https://istanbul-1-
kvm.skyatlas.com:8080/v1/AUTH_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/”account_name
”/”container”/”object”"
response = requests.delete, headers={"x-auth-token": token_id})
pprint.pprint(response.content)