Typescript (SDK)
import { Latitudesh } from "latitudesh-typescript-sdk";
const latitudesh = new Latitudesh({
bearer: process.env["LATITUDESH_BEARER"] ?? "",
});
async function run() {
const result = await latitudesh.objectStorage.indexProjectStorageUsage({
projectId: "proj_5AEmq7wMqBkWX",
storageId: "bkt_6VE1Wd37dXnZJ",
});
console.log(result);
}
run();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.IndexProjectStorageUsage(ctx, "proj_5AEmq7wMqBkWX", latitudeshgosdk.Pointer("bkt_6VE1Wd37dXnZJ"), nil, nil)
if err != nil {
log.Fatal(err)
}
if res.StorageUsage != nil {
// handle response
}
}curl --request GET \
--url https://api.latitude.sh/projects/{project_id}/storage_usage \
--header 'Authorization: <api-key>'import requests
url = "https://api.latitude.sh/projects/{project_id}/storage_usage"
headers = {"Authorization": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: '<api-key>'}};
fetch('https://api.latitude.sh/projects/{project_id}/storage_usage', 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/projects/{project_id}/storage_usage",
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/projects/{project_id}/storage_usage")
.header("Authorization", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.latitude.sh/projects/{project_id}/storage_usage")
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": "42_2026-01-02",
"type": "storage_usage",
"attributes": {
"date": "2026-01-02",
"provider": "wasabi",
"region": "us-east-1",
"bytes": 10737418240,
"raw_value": 10,
"raw_unit": "GiB",
"ingested_at": "2026-01-03T04:15:00+00:00"
}
}
]
}Object Storage
List storage usage
Returns daily object storage usage for the project. Each row reports the canonical usage in bytes for a single storage on a given day, plus the provider-reported raw value.
GET
/
projects
/
{project_id}
/
storage_usage
Typescript (SDK)
import { Latitudesh } from "latitudesh-typescript-sdk";
const latitudesh = new Latitudesh({
bearer: process.env["LATITUDESH_BEARER"] ?? "",
});
async function run() {
const result = await latitudesh.objectStorage.indexProjectStorageUsage({
projectId: "proj_5AEmq7wMqBkWX",
storageId: "bkt_6VE1Wd37dXnZJ",
});
console.log(result);
}
run();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.IndexProjectStorageUsage(ctx, "proj_5AEmq7wMqBkWX", latitudeshgosdk.Pointer("bkt_6VE1Wd37dXnZJ"), nil, nil)
if err != nil {
log.Fatal(err)
}
if res.StorageUsage != nil {
// handle response
}
}curl --request GET \
--url https://api.latitude.sh/projects/{project_id}/storage_usage \
--header 'Authorization: <api-key>'import requests
url = "https://api.latitude.sh/projects/{project_id}/storage_usage"
headers = {"Authorization": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: '<api-key>'}};
fetch('https://api.latitude.sh/projects/{project_id}/storage_usage', 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/projects/{project_id}/storage_usage",
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/projects/{project_id}/storage_usage")
.header("Authorization", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.latitude.sh/projects/{project_id}/storage_usage")
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": "42_2026-01-02",
"type": "storage_usage",
"attributes": {
"date": "2026-01-02",
"provider": "wasabi",
"region": "us-east-1",
"bytes": 10737418240,
"raw_value": 10,
"raw_unit": "GiB",
"ingested_at": "2026-01-03T04:15:00+00:00"
}
}
]
}Authorizations
Path Parameters
Project ID or Slug
Query Parameters
Restrict the result to a single storage. Accepts the storage/bucket ID
Defaults to yesterday
Defaults to today; clamped to today when a future date is given
Response
200 - application/vnd.api+json
Success
Show child attributes
Show child attributes
Was this page helpful?
⌘I