listSpaces
The spaces in the caller's namespace — and the cross-shard completeness flag you must check.
listSpaces(query?: ListSpacesQuery): Promise<ListSpacesResult>listSpaces(request: SpaceListRequest): Promise<SpaceListResponse>Parameters
limitintegeroptionalCap on returned spaces. Required on the wire request type, optional on the HTTP query.
Returns
spacesSpaceSummary[]alwaysEach with space, createdAtUnixNanos, lastActiveUnixNanos, memoryCount and sessionCount.
crossShardCompletebooleanalwaysWhether the listing covered the whole namespace.
Check crossShardComplete
false means the listing covered one shard, not the namespace. Treating a
partial listing as complete is how a caller concludes a space is gone and
re-provisions over live data. This is a different kind of incompleteness
from pagination: there is no cursor to follow, only a flag saying the answer
is partial.
You do not choose your space on the HTTP tier
The space comes from the credential. These verbs act on the caller's space. Addressing another space per request is a wire-tier capability — see act_as. Per-end-user isolation is a storage-key prefix inside one space, not a key per user; see Namespaces.
Was this page helpful?