Hijos de un work (serie → episodio, disco → pista…)
apps/docs/generated/openapi/catalog-svc.jsonPágina generada desde
apps/catalog-svc/src/app.aot.ts. No se edita a mano:bun run docs:genla regenera ybun run docs:checkfalla si difiere.
GET /works/{id}/relations
Relaciones padre → hijo del work ordenadas por ordinal (ruta numérica: [1, 3] = temporada 1, episodio 3). 404 CATALOG_WORK_NOT_FOUND si el work no existe.
| Campo | Valor |
|---|---|
| Servicio | catalog-svc |
| operationId | getWorksByIdRelations |
Policy (dec-0118 §3) | public |
| Tags | catalog |
| Nombre | En | Requerido | Esquema |
|---|---|---|---|
id | path | sí | {"type":"string","minLength":1,"maxLength":128} |
Relaciones padre → hijo del work (serie → episodio, disco → pista…), ordenadas por ordinal.
application/json
{
"type": "object",
"required": [
"relations"
],
"properties": {
"relations": {
"type": "array",
"items": {
"type": "object",
"required": [
"parentWorkId",
"childWorkId",
"rel",
"createdAt"
],
"properties": {
"parentWorkId": {
"type": "string"
},
"childWorkId": {
"type": "string"
},
"rel": {
"type": "string",
"pattern": "^[a-z][a-z0-9-]{0,31}$"
},
"ordinal": {
"type": "array",
"items": {
"type": "integer",
"minimum": 0
}
},
"createdAt": {
"type": "number"
}
}
}
}
},
"description": "Relaciones padre → hijo del work (serie → episodio, disco → pista…), ordenadas por `ordinal`."
}Problem Details (RFC 9457), status 400. Códigos: CATALOG_INVALID_PATH, CATALOG_PERMISSION_DENIED, CATALOG_MEDIA_UNSUPPORTED, CATALOG_MEDIA_TIMELINE_OUT_OF_RANGE, CATALOG_INVALID_INPUT.
application/problem+json
{
"type": "object",
"required": [
"type",
"title",
"status",
"code",
"retryable",
"category"
],
"properties": {
"type": {
"type": "string"
},
"title": {
"type": "string"
},
"status": {
"type": "number",
"const": 400
},
"code": {
"type": "string",
"enum": [
"CATALOG_INVALID_PATH",
"CATALOG_PERMISSION_DENIED",
"CATALOG_MEDIA_UNSUPPORTED",
"CATALOG_MEDIA_TIMELINE_OUT_OF_RANGE",
"CATALOG_INVALID_INPUT"
]
},
"detail": {
"type": "string"
},
"instance": {
"type": "string"
},
"retryable": {
"type": "boolean"
},
"category": {
"type": "string",
"enum": [
"transient",
"permanent",
"recoverable"
]
}
},
"x-styx-media-type": "application/problem+json"
}Problem Details (RFC 9457), status 404. Códigos: CATALOG_ASSET_NOT_FOUND, CATALOG_WORK_NOT_FOUND, CATALOG_EDITION_NOT_FOUND.
application/problem+json
{
"type": "object",
"required": [
"type",
"title",
"status",
"code",
"retryable",
"category"
],
"properties": {
"type": {
"type": "string"
},
"title": {
"type": "string"
},
"status": {
"type": "number",
"const": 404
},
"code": {
"type": "string",
"enum": [
"CATALOG_ASSET_NOT_FOUND",
"CATALOG_WORK_NOT_FOUND",
"CATALOG_EDITION_NOT_FOUND"
]
},
"detail": {
"type": "string"
},
"instance": {
"type": "string"
},
"retryable": {
"type": "boolean"
},
"category": {
"type": "string",
"enum": [
"transient",
"permanent",
"recoverable"
]
}
},
"x-styx-media-type": "application/problem+json"
}Problem Details (RFC 9457), status 422. Códigos: validation.
application/problem+json
{
"type": "object",
"required": [
"type",
"title",
"status",
"code"
],
"properties": {
"type": {
"type": "string"
},
"title": {
"type": "string"
},
"status": {
"type": "number",
"const": 422
},
"code": {
"type": "string",
"const": "validation"
},
"on": {
"type": "string"
},
"property": {
"type": "string"
},
"detail": {
"type": "string"
}
},
"x-styx-media-type": "application/problem+json"
}Problem Details (RFC 9457), status 500. Códigos: CATALOG_INTERNAL.
application/problem+json
{
"type": "object",
"required": [
"type",
"title",
"status",
"code",
"retryable",
"category"
],
"properties": {
"type": {
"type": "string"
},
"title": {
"type": "string"
},
"status": {
"type": "number",
"const": 500
},
"code": {
"type": "string",
"const": "CATALOG_INTERNAL"
},
"detail": {
"type": "string"
},
"instance": {
"type": "string"
},
"retryable": {
"type": "boolean"
},
"category": {
"type": "string",
"enum": [
"transient",
"permanent",
"recoverable"
]
}
},
"x-styx-media-type": "application/problem+json"
}Problem Details (RFC 9457), status 502. Códigos: CATALOG_PROBE_FAILED.
application/problem+json
{
"type": "object",
"required": [
"type",
"title",
"status",
"code",
"retryable",
"category"
],
"properties": {
"type": {
"type": "string"
},
"title": {
"type": "string"
},
"status": {
"type": "number",
"const": 502
},
"code": {
"type": "string",
"const": "CATALOG_PROBE_FAILED"
},
"detail": {
"type": "string"
},
"instance": {
"type": "string"
},
"retryable": {
"type": "boolean"
},
"category": {
"type": "string",
"enum": [
"transient",
"permanent",
"recoverable"
]
}
},
"x-styx-media-type": "application/problem+json"
}Problem Details (RFC 9457), status 503. Códigos: CATALOG_DB_WRITE_FAILED, CATALOG_DB_READ_FAILED, CATALOG_NATS_PUBLISH_FAILED.
application/problem+json
{
"type": "object",
"required": [
"type",
"title",
"status",
"code",
"retryable",
"category"
],
"properties": {
"type": {
"type": "string"
},
"title": {
"type": "string"
},
"status": {
"type": "number",
"const": 503
},
"code": {
"type": "string",
"enum": [
"CATALOG_DB_WRITE_FAILED",
"CATALOG_DB_READ_FAILED",
"CATALOG_NATS_PUBLISH_FAILED"
]
},
"detail": {
"type": "string"
},
"instance": {
"type": "string"
},
"retryable": {
"type": "boolean"
},
"category": {
"type": "string",
"enum": [
"transient",
"permanent",
"recoverable"
]
}
},
"x-styx-media-type": "application/problem+json"
}Problem Details (RFC 9457), status 504. Códigos: CATALOG_PROBE_TIMEOUT.
application/problem+json
{
"type": "object",
"required": [
"type",
"title",
"status",
"code",
"retryable",
"category"
],
"properties": {
"type": {
"type": "string"
},
"title": {
"type": "string"
},
"status": {
"type": "number",
"const": 504
},
"code": {
"type": "string",
"const": "CATALOG_PROBE_TIMEOUT"
},
"detail": {
"type": "string"
},
"instance": {
"type": "string"
},
"retryable": {
"type": "boolean"
},
"category": {
"type": "string",
"enum": [
"transient",
"permanent",
"recoverable"
]
}
},
"x-styx-media-type": "application/problem+json"
}