API · Cosmos
GET /cosmos/clusters
A Cosmos collection: name, owner, counts, cover.
| Request | GET /v1/cosmos/clusters |
| Operation id | cosmos.cluster.get |
| Cost | 1 credit, refunded if the call fails |
| Auth | API key: Authorization: Bearer <key> or x-api-key. |
A Cosmos collection: name, owner, counts, cover.
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. |
Responses
| Status | Meaning | Schema |
|---|---|---|
200 | The collection. | CosmosCluster |
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 |
CosmosCluster fields
| Field | Type | Description |
|---|---|---|
id | integer | |
name | string | |
slug | string | |
description | string | null | |
numberOfElements | integer | null | |
followersCount | integer | null | |
coverImageUrl | string | null | |
owner | object | null | |
url | string |
Errors use one shape everywhere; see Errors for every code and what to do.