Skip to content
Console
On this page

List buckets

Lists buckets in a environment.

Lists buckets in a environment.

  • Path GET https://api.sylphx.com/v1/orgs/acme/projects/shop/envs/production/buckets
  • Scope data:read
  • Effect read — nothing is written.
  • Collection buckets
  • Query page_size, page_token, filter, order_by
  • Pagination the answer carries buckets and, when there is more, next_page_token

Request

FieldTypeWhat it is
parentstringThe parent to list in. Required.
page_sizeint32At most this many; default 50, clamped to 1000.
page_tokenstringnext_page_token of the previous page.
filterstringAIP-160 filter over labels, filterable fields, and Ready.
order_bystringAIP-132 ordering over filterable fields.

Response

FieldTypeWhat it is
bucketsBucket[]The page.
next_page_tokenstringThe token of the next page; empty on the last page.

Bucket

FieldTypeWhat it is
namestringorgs/{org}/projects/{project}/envs/{env}/buckets/{bucket}.
uidstringbkt_<cell><ulid>; never reused. Output only.
metaResourceMetaResource metadata.
specBucketSpecDesired state. Required.
statusBucketStatusObserved state. Output only.

ResourceMeta

FieldTypeWhat it is
generationint64Increases by one on every change to spec. Output only.
etagstringStrong ETag (AIP-154): changes on any change to spec, status, or metadata. Send it back as If-Match or etag to make Update and Delete conditional; a mismatch fails with ABORTED / 409 ETAG_MISMATCH. Output only.
create_timetimestampWhen the Resource was created. Output only.
update_timetimestampWhen the Resource last changed. Output only.
delete_timetimestampSet while the Resource is being deleted. Output only.
labelsmap<string, string>Caller-writable, indexed labels (AIP-122 label rules).
annotationsmap<string, string>Caller-writable, unindexed annotations.
display_namestringCaller-writable human-readable name.
creatorstringThe principal that created the Resource. Output only.

BucketSpec

FieldTypeWhat it is
versioning_enabledboolKeep every version and write delete markers.
retentiondurationVersions are kept at least this long; unset keeps no minimum.
regionstringThe region; default the project's home region. Changing it moves the data by signed export and import.
deletion_protectionboolWhile set, Delete fails with DELETION_PROTECTED.
corsBucketCorsRule[]Browser access (CORS) rules for the bucket's S3 endpoint, in order; the first rule matching an origin and method answers. Empty answers no cross-origin request. At most 20 rules.
lifecycleBucketLifecycleRules that remove what a bucket no longer needs. Unset keeps everything.
public_accessBucketPublicAccessWho may read the bucket's objects without a key. Unset is OFF. Set at creation; the bucket serves it once its S3 endpoint does, and until then every object stays private.

BucketStatus

FieldTypeWhat it is
observed_generationint64The generation this status was computed from. Output only.
conditionsCondition[]Ready, Reconciling, Stalled. Output only.
stateDatastoreStateServing state. Output only. One of provisioning, active, idle, moving, deleting.
refstringThe routing ref: the first DNS label of the datastore's endpoint. Output only.
hoststringThe object endpoint host. Output only.
cellstringThe cell the datastore is placed on. Output only.
storage_bytesint64Bytes stored, at the last usage sample. Output only.
object_countint64Current objects, at the last usage sample. Output only.
endpointstringThe URL clients send object requests to: https://{host}/v1/objects/{uid}. Output only.
public_urlstringThe base URL a key-less client reads public objects from, {endpoint} followed by the object key; empty while spec.public_access is off. Output only.

BucketCorsRule

FieldTypeWhat it is
allowed_originsstring[]Origins as scheme://host[:port], for example https://app.example.com, with at most one * in the host (https://*.example.com), or a lone *. Required; at most 20. Required.
allowed_methodsstring[]Any of GET, HEAD, PUT, POST, DELETE. Required. Required.
allowed_headersstring[]Request headers the browser may send, or *. A presigned PUT needs Content-Type; a multipart part needs none.
expose_headersstring[]Response headers the page may read. Data adds ETag to a rule that allows PUT or POST, because a browser multipart upload cannot complete without each part's ETag, so a read of the rule always lists it.
max_agedurationHow long a browser may cache the preflight answer; default 3600s, at most 86400s.

BucketLifecycle

FieldTypeWhat it is
abort_incomplete_multipart_daysint32Abort a multipart upload that has not completed this many days after it started, and free its parts: 1 to 365. 0 keeps incomplete uploads until someone aborts them (and they are billed as stored bytes until then).
expiration_rulesBucketExpirationRule[]Expire current objects by key prefix, at most 50 rules with distinct prefixes. On a versioned bucket an expiry writes a delete marker.

BucketPublicAccess

FieldTypeWhat it is
modeBucketPublicAccessModeWhich objects are public. One of off, read, read_prefixes.
prefixesstring[]Key prefixes whose objects are public when mode is READ_PREFIXES, at most 50, each at most 1024 bytes.

Condition

FieldTypeWhat it is
typestringThe condition type, for example Ready.
statusConditionStatusWhether the condition holds. One of true, false, unknown.
observed_generationint64The generation this observation was made against.
reasonstringA machine-readable UpperCamelCase reason.
messagestringA customer-safe human-readable message.
severitySeverityHow severe a FALSE condition is. One of info, warning, error.
transition_timetimestampWhen status last changed.

Errors

Every error arrives in the body Errors describes.

Examples

curl "https://api.sylphx.com/v1/orgs/acme/projects/shop/envs/production/buckets" \
  -H "Authorization: Bearer $SYLPHX_API_KEY"