User-generated content
Generated reference for the 11 /v1/ugc operations of the 0x REST API.
Generated from steamworks sg-backend/openapi.yaml at build 3a4a58e45c+dirty. Do not edit by hand.
Errors are {"error": "..."} with the status (errors); limits are in rate limits.
| Method | Path | Auth | Summary |
|---|---|---|---|
GET | /v1/ugc/{id} | Bearer token | Item |
PUT | /v1/ugc/{id} | Bearer token | Owner commits an update |
DELETE | /v1/ugc/{id} | Bearer token | Owner deletes |
POST | /v1/ugc/{id}/content_urls | Bearer token | {method: |
GET | /v1/ugc/{id}/content | Bearer token | File list [{name, size, sha256}] |
GET | /v1/ugc/{id}/content/{path} | Bearer token | Download a file |
PUT | /v1/ugc/{id}/content/{path} | Bearer token | Owner uploads a file |
GET | /v1/ugc/{id}/preview | Bearer token | Preview image |
PUT | /v1/ugc/{id}/preview | Bearer token | Owner sets the preview |
POST | /v1/ugc/{id}/{action} | Bearer token | Subscribe, unsubscribe, vote {up}, favorite {add} |
GET | /v1/ugc/{id}/vote | Bearer token | {voted_up, voted_down, skipped} |
#GET /v1/ugc/{id}
Item (with vote and subscription counts)
Auth: Bearer token: Authorization: Bearer <access token> (authentication).
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string | yes |
| Status | Response |
|---|---|
| 200 | OK |
| 404 | Not visible |
curl -s "https://api.0x.limo/v1/ugc/$ID" \
-H "Authorization: Bearer $ZEROX_TOKEN"#PUT /v1/ugc/{id}
Owner commits an update (metadata, tags, kv, visibility, change note, file list); finalising a file list runs the upload scanner over each file and records its sha256 plus the item's content_sha256, and an optional {signature: {key, sig}} over the item id and that hash is verified and relayed
Auth: Bearer token: Authorization: Bearer <access token> (authentication).
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string | yes |
| Status | Response |
|---|---|
| 200 | OK |
| 400 | Bad or non-matching signature |
| 403 | Not the owner |
| 451 | The scanner refused a file |
curl -s -X PUT "https://api.0x.limo/v1/ugc/$ID" \
-H "Authorization: Bearer $ZEROX_TOKEN"#DELETE /v1/ugc/{id}
Owner deletes
Auth: Bearer token: Authorization: Bearer <access token> (authentication).
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string | yes |
| Status | Response |
|---|---|
| 200 | OK Ok |
curl -s -X DELETE "https://api.0x.limo/v1/ugc/$ID" \
-H "Authorization: Bearer $ZEROX_TOKEN"#POST /v1/ugc/{id}/content_urls
{method: PUT|GET, names} → {urls} (pre-signed); GET urls are issued only for files on the item's list
Auth: Bearer token: Authorization: Bearer <access token> (authentication).
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string | yes |
| Status | Response |
|---|---|
| 200 | OK |
| 404 | That name is not part of this item's content |
curl -s -X POST "https://api.0x.limo/v1/ugc/$ID/content_urls" \
-H "Authorization: Bearer $ZEROX_TOKEN"#GET /v1/ugc/{id}/content
File list [{name, size, sha256}]
Auth: Bearer token: Authorization: Bearer <access token> (authentication).
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string | yes |
| Status | Response |
|---|---|
| 200 | OK |
curl -s "https://api.0x.limo/v1/ugc/$ID/content" \
-H "Authorization: Bearer $ZEROX_TOKEN"#GET /v1/ugc/{id}/content/{path}
Download a file
Auth: Bearer token: Authorization: Bearer <access token> (authentication).
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string | yes | |
path | path | string | yes | relative path, / separated; no . or .. parts |
| Status | Response |
|---|---|
| 200 | File contents (application/octet-stream) |
curl -s "https://api.0x.limo/v1/ugc/$ID/content/$PATH" \
-H "Authorization: Bearer $ZEROX_TOKEN"#PUT /v1/ugc/{id}/content/{path}
Owner uploads a file
Auth: Bearer token: Authorization: Bearer <access token> (authentication).
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string | yes | |
path | path | string | yes | relative path, / separated; no . or .. parts |
| Status | Response |
|---|---|
| 200 | OK |
curl -s -X PUT "https://api.0x.limo/v1/ugc/$ID/content/$PATH" \
-H "Authorization: Bearer $ZEROX_TOKEN"#GET /v1/ugc/{id}/preview
Preview image
Auth: Bearer token: Authorization: Bearer <access token> (authentication).
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string | yes |
| Status | Response |
|---|---|
| 200 | File contents (application/octet-stream) |
curl -s "https://api.0x.limo/v1/ugc/$ID/preview" \
-H "Authorization: Bearer $ZEROX_TOKEN"#PUT /v1/ugc/{id}/preview
Owner sets the preview
Auth: Bearer token: Authorization: Bearer <access token> (authentication).
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string | yes |
| Status | Response |
|---|---|
| 200 | OK Ok |
curl -s -X PUT "https://api.0x.limo/v1/ugc/$ID/preview" \
-H "Authorization: Bearer $ZEROX_TOKEN"#POST /v1/ugc/{id}/{action}
Subscribe, unsubscribe, vote {up}, favorite {add}
Auth: Bearer token: Authorization: Bearer <access token> (authentication).
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string | yes | |
action | path | "subscribe" | "unsubscribe" | "vote" | "favorite" | yes |
| Status | Response |
|---|---|
| 200 | OK Ok |
curl -s -X POST "https://api.0x.limo/v1/ugc/$ID/$ACTION" \
-H "Authorization: Bearer $ZEROX_TOKEN"#GET /v1/ugc/{id}/vote
{voted_up, voted_down, skipped}
Auth: Bearer token: Authorization: Bearer <access token> (authentication).
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string | yes |
| Status | Response |
|---|---|
| 200 | OK |
curl -s "https://api.0x.limo/v1/ugc/$ID/vote" \
-H "Authorization: Bearer $ZEROX_TOKEN"