Content and depots
Generated reference for the 7 /v1/content operations of the 0x REST API.
Generated from steamworks sg-backend/openapi.yaml at build 3a4a58e45c+dirty. Do not edit by hand.
Guide: Hosting and versions, Transfers. Errors are {"error": "..."} with the status (errors); limits are in rate limits.
| Method | Path | Auth | Summary |
|---|---|---|---|
POST | /v1/content/{cid}/announce | Bearer token | Tracker: |
GET | /v1/content/{cid}/peers | Bearer token | Tracker: |
GET | /v1/content/{cid}/seed | Bearer token | Web seed: |
GET | /v1/content/{cid}/key | Bearer token | AES-256 key of a gated |
POST | /v1/content/report | Bearer token | Opt-in aggregate content telemetry |
POST | /v1/content/transfers | Bearer token | Opt-in per-asset content telemetry |
POST | /v1/content/announce | Bearer token | Tracker, batch: |
#POST /v1/content/{cid}/announce
Tracker: the caller has (some of) this file; counts for 90 s (also over the push stream: {op: announce, id})
Auth: Bearer token: Authorization: Bearer <access token> (authentication).
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
cid | path | string | yes | content id: hex SHA-256 of the file (of the ciphertext when gated) |
| Status | Response |
|---|---|
| 200 | OK |
| 400 | Not a SHA-256 id |
curl -s -X POST "https://api.0x.limo/v1/content/$CID/announce" \
-H "Authorization: Bearer $ZEROX_TOKEN"#GET /v1/content/{cid}/peers
Tracker: up to 40 SteamIDs that announced the file in the last 90 s, shuffled (also over the push stream: {op: peers, id, req})
Auth: Bearer token: Authorization: Bearer <access token> (authentication).
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
cid | path | string | yes | content id: hex SHA-256 of the file (of the ciphertext when gated) |
| Status | Response |
|---|---|
| 200 | OK |
curl -s "https://api.0x.limo/v1/content/$CID/peers" \
-H "Authorization: Bearer $ZEROX_TOKEN"#GET /v1/content/{cid}/seed
Web seed: {data, info} URLs (CDN, or pre-signed bucket URLs) supporting HTTP range requests
Auth: Bearer token: Authorization: Bearer <access token> (authentication).
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
cid | path | string | yes | content id: hex SHA-256 of the file (of the ciphertext when gated) |
| Status | Response |
|---|---|
| 200 | OK |
curl -s "https://api.0x.limo/v1/content/$CID/seed" \
-H "Authorization: Bearer $ZEROX_TOKEN"#GET /v1/content/{cid}/key
AES-256 key of a gated (encrypted) file, for owners of its app
Auth: Bearer token: Authorization: Bearer <access token> (authentication).
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
cid | path | string | yes | content id: hex SHA-256 of the file (of the ciphertext when gated) |
| Status | Response |
|---|---|
| 200 | OK |
| 403 | Not entitled (or no such gated file) |
curl -s "https://api.0x.limo/v1/content/$CID/key" \
-H "Authorization: Bearer $ZEROX_TOKEN"#POST /v1/content/report
Opt-in aggregate content telemetry (SG_TELEMETRY): {session, app, counters: {peer, origin, webtorrent, duplicate, bad_pieces, wt_up}}, cumulative per session; the server adds deltas
Auth: Bearer token: Authorization: Bearer <access token> (authentication).
| Status | Response |
|---|---|
| 200 | OK |
| 400 | Bad session, unknown counter, value out of range, or a counter went down |
| 403 | Telemetry disabled |
curl -s -X POST "https://api.0x.limo/v1/content/report" \
-H "Authorization: Bearer $ZEROX_TOKEN"#POST /v1/content/transfers
Opt-in per-asset content telemetry (SG_TELEMETRY): {session, seq, app, items: [{id, peer, origin, webtorrent, up, bad_pieces}]}, bytes per content ID since the previous report (at most 500 items); seq rises by one per report and a repeated seq adds nothing
Auth: Bearer token: Authorization: Bearer <access token> (authentication).
| Status | Response |
|---|---|
| 200 | OK |
| 400 | Bad session or seq, bad or repeated id, unknown field, or value out of range |
| 403 | Telemetry disabled |
curl -s -X POST "https://api.0x.limo/v1/content/transfers" \
-H "Authorization: Bearer $ZEROX_TOKEN"#POST /v1/content/announce
Tracker, batch: {ids: [up to 1000 content ids]} (also over the push stream: {op: announce, ids})
Auth: Bearer token: Authorization: Bearer <access token> (authentication).
| Status | Response |
|---|---|
| 200 | OK |
| 400 | Bad or too many ids |
curl -s -X POST "https://api.0x.limo/v1/content/announce" \
-H "Authorization: Bearer $ZEROX_TOKEN"