0xDocs 0x.limo

Docs / REST API

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.

MethodPathAuthSummary
POST/v1/content/{cid}/announceBearer tokenTracker:
GET/v1/content/{cid}/peersBearer tokenTracker:
GET/v1/content/{cid}/seedBearer tokenWeb seed:
GET/v1/content/{cid}/keyBearer tokenAES-256 key of a gated
POST/v1/content/reportBearer tokenOpt-in aggregate content telemetry
POST/v1/content/transfersBearer tokenOpt-in per-asset content telemetry
POST/v1/content/announceBearer tokenTracker, 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).

ParameterInTypeRequiredDescription
cidpathstringyescontent id: hex SHA-256 of the file (of the ciphertext when gated)
StatusResponse
200OK
400Not a SHA-256 id
bash
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).

ParameterInTypeRequiredDescription
cidpathstringyescontent id: hex SHA-256 of the file (of the ciphertext when gated)
StatusResponse
200OK
bash
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).

ParameterInTypeRequiredDescription
cidpathstringyescontent id: hex SHA-256 of the file (of the ciphertext when gated)
StatusResponse
200OK
bash
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).

ParameterInTypeRequiredDescription
cidpathstringyescontent id: hex SHA-256 of the file (of the ciphertext when gated)
StatusResponse
200OK
403Not entitled (or no such gated file)
bash
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).

StatusResponse
200OK
400Bad session, unknown counter, value out of range, or a counter went down
403Telemetry disabled
bash
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).

StatusResponse
200OK
400Bad session or seq, bad or repeated id, unknown field, or value out of range
403Telemetry disabled
bash
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).

StatusResponse
200OK
400Bad or too many ids
bash
curl -s -X POST "https://api.0x.limo/v1/content/announce" \
  -H "Authorization: Bearer $ZEROX_TOKEN"