Object Storage API ile aşağıdaki işlemleri yapabilirsiniz.

  • Her biri varsayılan olarak 5 GB olmak şartıyla sınırsız nesne saklanması

  • Herhangi bir boyuttaki nesnelerin oluşturulması ve saklanması

  • Nesne güvenliğini sağlamak için Cross-origin paylaşımın kullanılması

  • İçerik şifreleme ile dosyaların sıkıştırılması

  • Nesnelerin silinmesi için takvim oluşturma

  • Tek istekte 10.000 adet nesnenin toplu halde silinmesi

Temel mimaride path aşağıdaki gibi olmalıdır.

/v1/{account}/{container}/{object}
CODE

Login olmak
Openstack API kullanarak istenilen aksiyonları alabilmesi için Skyatlas tarafından iletilen kullanıcı adı
ve parola ile giriş yapmak gerekmektedir. Kullanıcının kendi hesabına giriş yapması için kullanıcı adı,
parola, tenant id gerekmektedir. Sonrasında iletilen token_id ile devam edilecektir.

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"]
CODE

 

SkyAtlas Account, Container,Objects API kullanımları

Hesap detayları ve Container listeleme (/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)
CODE

 

Hesap Metadataları Oluşturma,Değiştirme ve Silme

Metadata Oluşturma, Değiştirme,Silme (/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)
CODE

 Metadata Değiştirme (/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)
CODE

 Metadata Silme (/v1/{account})

url = "https://istanbul-1-
kvm.skyatlas.com:8080/v1/AUTH_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/”account_name
”"
response = requests.delete, headers={"x-auth-token": token_id})
pprint.pprint(response.content)
CODE

 

Container

Container API ile Container detaylarını görülebilir, kopyalanabilir, değiştirilebilir ve silinebilir.

Container detaylarını görme ve object listeleme (/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)
CODE

Container oluşturma (/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)
CODE

Container silme (/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)
CODE

 

Objects

API ile object oluşturulabilir, detayları görülebilir, kopyalanabilir ve silinebilir.

Object içerikleri ve Metadata Listeleme (/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)
CODE

Object oluşturma (/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)
CODE

Object Kopyalama (/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)
CODE

Object Metadata gösterme (/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)
CODE

Object Silme (/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)
CODE