List Object Storage Keys
client.Storage.Keys.List(ctx, query) (*Cursor[ObjectStorageKey], error)
GET/v1/storage/keys
List Object Storage Keys
package main
import (
"context"
"fmt"
"github.com/nirvana-labs/nirvana-go"
"github.com/nirvana-labs/nirvana-go/option"
"github.com/nirvana-labs/nirvana-go/storage"
)
func main() {
client := nirvana.NewClient(
option.WithAPIKey("My API Key"),
)
page, err := client.Storage.Keys.List(context.TODO(), storage.KeyListParams{
ProjectID: "project_id",
})
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", page)
}
{
"items": [
{
"id": "123e4567-e89b-12d3-a456-426614174000",
"access_key": "0555B35654AD1656D804",
"created_at": "2025-01-01T00:00:00Z",
"name": "ci-uploads",
"project_id": "123e4567-e89b-12d3-a456-426614174000",
"region": "us-sva-2",
"status": "ready",
"updated_at": "2025-01-01T00:00:00Z"
}
],
"pagination": {
"next_cursor": "RhwniMT4B74siYZcPF8TnCdGI1l9rpPvg",
"previous_cursor": "ARhwnmi1hA7wEbHbMjdYQlOB_ZusP4fYvw",
"total_count": 125
}
}Returns Examples
{
"items": [
{
"id": "123e4567-e89b-12d3-a456-426614174000",
"access_key": "0555B35654AD1656D804",
"created_at": "2025-01-01T00:00:00Z",
"name": "ci-uploads",
"project_id": "123e4567-e89b-12d3-a456-426614174000",
"region": "us-sva-2",
"status": "ready",
"updated_at": "2025-01-01T00:00:00Z"
}
],
"pagination": {
"next_cursor": "RhwniMT4B74siYZcPF8TnCdGI1l9rpPvg",
"previous_cursor": "ARhwnmi1hA7wEbHbMjdYQlOB_ZusP4fYvw",
"total_count": 125
}
}