Python (SDK)
from latitudesh_python_sdk import Latitudesh
import os
with Latitudesh(
bearer=os.getenv("LATITUDESH_BEARER", ""),
) as latitudesh:
res = latitudesh.object_storage.get_storage_buckets()
# Handle response
print(res)package main
import(
"context"
"os"
latitudeshgosdk "github.com/latitudesh/latitudesh-go-sdk"
"log"
)
func main() {
ctx := context.Background()
s := latitudeshgosdk.New(
latitudeshgosdk.WithSecurity(os.Getenv("LATITUDESH_BEARER")),
)
res, err := s.ObjectStorage.GetStorageBuckets(ctx, nil)
if err != nil {
log.Fatal(err)
}
if res.ObjectStorages != nil {
// handle response
}
}import { Latitudesh } from "latitudesh-typescript-sdk";
const latitudesh = new Latitudesh({
bearer: process.env["LATITUDESH_BEARER"] ?? "",
});
async function run() {
const result = await latitudesh.objectStorage.getStorageBuckets();
console.log(result);
}
run();curl --request GET \
--url https://api.latitude.sh/storage/buckets \
--header 'Authorization: <api-key>'const options = {method: 'GET', headers: {Authorization: '<api-key>'}};
fetch('https://api.latitude.sh/storage/buckets', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.latitude.sh/storage/buckets",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}HttpResponse<String> response = Unirest.get("https://api.latitude.sh/storage/buckets")
.header("Authorization", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.latitude.sh/storage/buckets")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"data": [
{
"id": "bucket_6VE1Wd37dXnZJ",
"type": "object_storages",
"attributes": {
"name": "my-bucket-storage",
"storage_type": "object",
"storage_class": "standard",
"created_at": "2026-03-19T10:30:00.000Z",
"bucket_name": "my-bucket",
"endpoint": "https://objects.us-east-1.storage.sh",
"access_key": "<your-access-key>",
"secret_key": "<your-secret-key>",
"versioning": false,
"locking": false,
"retention_mode": "NONE",
"retention_period": null,
"source": "default",
"region": {
"id": "SAO2",
"city": "SAO2",
"country": "Brazil"
},
"project": {
"id": "proj_6059EqYkOQj8p",
"name": "My Project",
"slug": "my-project",
"description": "Project description",
"billing_type": "Normal",
"billing_method": "Normal",
"bandwidth_alert": false,
"environment": null,
"billing": {
"subscription_id": null,
"type": "Normal",
"method": "Normal"
},
"stats": {
"databases": 0,
"ip_addresses": 0,
"prefixes": 0,
"servers": 0,
"storages": 1,
"virtual_machines": 0,
"vlans": 0
}
},
"team": {
"id": "team_lV9Xe2AAK5CbMgGbpPYLskLRXyV",
"name": "My Team",
"slug": "my-team",
"description": "My Team",
"address": "123 Main St",
"status": "verified",
"currency": {
"id": "cur_AW6Q2D9lqKLpr",
"code": "USD",
"name": "US Dollar",
"currency_id": null
}
}
}
}
]
}{
"errors": [
{
"code": "FEATURE_NOT_ENABLED",
"message": "Object Storage is not enabled for this team"
}
]
}Object Storage
List buckets
Lists all object storages from a team.
GET
/
storage
/
buckets
Python (SDK)
from latitudesh_python_sdk import Latitudesh
import os
with Latitudesh(
bearer=os.getenv("LATITUDESH_BEARER", ""),
) as latitudesh:
res = latitudesh.object_storage.get_storage_buckets()
# Handle response
print(res)package main
import(
"context"
"os"
latitudeshgosdk "github.com/latitudesh/latitudesh-go-sdk"
"log"
)
func main() {
ctx := context.Background()
s := latitudeshgosdk.New(
latitudeshgosdk.WithSecurity(os.Getenv("LATITUDESH_BEARER")),
)
res, err := s.ObjectStorage.GetStorageBuckets(ctx, nil)
if err != nil {
log.Fatal(err)
}
if res.ObjectStorages != nil {
// handle response
}
}import { Latitudesh } from "latitudesh-typescript-sdk";
const latitudesh = new Latitudesh({
bearer: process.env["LATITUDESH_BEARER"] ?? "",
});
async function run() {
const result = await latitudesh.objectStorage.getStorageBuckets();
console.log(result);
}
run();curl --request GET \
--url https://api.latitude.sh/storage/buckets \
--header 'Authorization: <api-key>'const options = {method: 'GET', headers: {Authorization: '<api-key>'}};
fetch('https://api.latitude.sh/storage/buckets', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.latitude.sh/storage/buckets",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}HttpResponse<String> response = Unirest.get("https://api.latitude.sh/storage/buckets")
.header("Authorization", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.latitude.sh/storage/buckets")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"data": [
{
"id": "bucket_6VE1Wd37dXnZJ",
"type": "object_storages",
"attributes": {
"name": "my-bucket-storage",
"storage_type": "object",
"storage_class": "standard",
"created_at": "2026-03-19T10:30:00.000Z",
"bucket_name": "my-bucket",
"endpoint": "https://objects.us-east-1.storage.sh",
"access_key": "<your-access-key>",
"secret_key": "<your-secret-key>",
"versioning": false,
"locking": false,
"retention_mode": "NONE",
"retention_period": null,
"source": "default",
"region": {
"id": "SAO2",
"city": "SAO2",
"country": "Brazil"
},
"project": {
"id": "proj_6059EqYkOQj8p",
"name": "My Project",
"slug": "my-project",
"description": "Project description",
"billing_type": "Normal",
"billing_method": "Normal",
"bandwidth_alert": false,
"environment": null,
"billing": {
"subscription_id": null,
"type": "Normal",
"method": "Normal"
},
"stats": {
"databases": 0,
"ip_addresses": 0,
"prefixes": 0,
"servers": 0,
"storages": 1,
"virtual_machines": 0,
"vlans": 0
}
},
"team": {
"id": "team_lV9Xe2AAK5CbMgGbpPYLskLRXyV",
"name": "My Team",
"slug": "my-team",
"description": "My Team",
"address": "123 Main St",
"status": "verified",
"currency": {
"id": "cur_AW6Q2D9lqKLpr",
"code": "USD",
"name": "US Dollar",
"currency_id": null
}
}
}
}
]
}{
"errors": [
{
"code": "FEATURE_NOT_ENABLED",
"message": "Object Storage is not enabled for this team"
}
]
}Was this page helpful?
⌘I