GroundsocialDocs

API · Cosmos

GET /cosmos/clusters/posts

The elements in a Cosmos collection, paginated.

RequestGET /v1/cosmos/clusters/posts
Operation idcosmos.cluster.posts
Cost1 credit, refunded if the call fails
AuthAPI key: Authorization: Bearer <key> or x-api-key.

The elements in a Cosmos collection, paginated.

Query parameters

NameTypeRequiredDescription
urlstringyesA collection URL (cosmos.so/<user>/<slug>) or user/slug. Example: https://www.cosmos.so/cosmos/genesis.
afterstringnoThe previous page’s meta.next_token.

Responses

StatusMeaningSchema
200A page of elements.CosmosElements
400Invalid input. Nothing was charged.Error
401Missing or invalid API key.Error
402Not enough credits, a spend cap was reached, or payment is required.Error
403The target is private, or the account is suspended.Error
404The user, element or collection does not exist.Error
429Too many requests. Wait for Retry-After seconds.Error
503Cosmos is temporarily unavailable. Retryable; nothing was charged.Error

CosmosElements fields

FieldTypeDescription
dataCosmosElement[]
metaobject

Errors use one shape everywhere; see Errors for every code and what to do.