Get Bucket Details
client.Storage.Buckets.Get(ctx, bucketID) (*Bucket, error)
GET/v1/storage/buckets/{bucket_id}
Get Bucket Details
package main
import (
"context"
"fmt"
"github.com/nirvana-labs/nirvana-go"
"github.com/nirvana-labs/nirvana-go/option"
)
func main() {
client := nirvana.NewClient(
option.WithAPIKey("My API Key"),
)
bucket, err := client.Storage.Buckets.Get(context.TODO(), "bucket_id")
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", bucket.ID)
}
{
"id": "123e4567-e89b-12d3-a456-426614174000",
"created_at": "2025-01-01T00:00:00Z",
"endpoint": "https://s3.sva2.nirvanacloud.io",
"name": "my-bucket",
"object_count": 1024,
"project_id": "123e4567-e89b-12d3-a456-426614174000",
"region": "us-sva-2",
"signing_region": "us-east-1",
"size_bytes": 1073741824,
"status": "ready",
"tags": [
"production",
"ethereum"
],
"updated_at": "2025-01-01T00:00:00Z",
"url": "https://s3.sva2.nirvanacloud.io/my-bucket"
}Returns Examples
{
"id": "123e4567-e89b-12d3-a456-426614174000",
"created_at": "2025-01-01T00:00:00Z",
"endpoint": "https://s3.sva2.nirvanacloud.io",
"name": "my-bucket",
"object_count": 1024,
"project_id": "123e4567-e89b-12d3-a456-426614174000",
"region": "us-sva-2",
"signing_region": "us-east-1",
"size_bytes": 1073741824,
"status": "ready",
"tags": [
"production",
"ethereum"
],
"updated_at": "2025-01-01T00:00:00Z",
"url": "https://s3.sva2.nirvanacloud.io/my-bucket"
}