API · Cosmos
GET /cosmos/clusters/posts
The elements in a Cosmos collection, paginated.
| Request | GET /v1/cosmos/clusters/posts |
| Operation id | cosmos.cluster.posts |
| Cost | 1 credit, refunded if the call fails |
| Auth | API key: Authorization: Bearer <key> or x-api-key. |
The elements in a Cosmos collection, paginated.
Query parameters
| Name | Type | Required | Description |
|---|---|---|---|
url | string | yes | A collection URL (cosmos.so/<user>/<slug>) or user/slug. Example: https://www.cosmos.so/cosmos/genesis. |
after | string | no | The previous page’s meta.next_token. |
Responses
| Status | Meaning | Schema |
|---|---|---|
200 | A page of elements. | CosmosElements |
400 | Invalid input. Nothing was charged. | Error |
401 | Missing or invalid API key. | Error |
402 | Not enough credits, a spend cap was reached, or payment is required. | Error |
403 | The target is private, or the account is suspended. | Error |
404 | The user, element or collection does not exist. | Error |
429 | Too many requests. Wait for Retry-After seconds. | Error |
503 | Cosmos is temporarily unavailable. Retryable; nothing was charged. | Error |
CosmosElements fields
| Field | Type | Description |
|---|---|---|
data | CosmosElement[] | |
meta | object |
Errors use one shape everywhere; see Errors for every code and what to do.