API HTTPcatalog-svc

GET /works/{id}

Obtener un work

ImplementadoSin versión del tren todavía· generada desde apps/docs/generated/openapi/catalog-svc.json

Página generada desde apps/catalog-svc/src/app.aot.ts. No se edita a mano: bun run docs:gen la regenera y bun run docs:check falla si difiere.

GET /works/{id}

Un work del catálogo. 404 CATALOG_WORK_NOT_FOUND si no existe.

CampoValor
Serviciocatalog-svc
operationIdgetWorksById
Policy (dec-0118 §3)public
Tagscatalog

Parámetros

NombreEnRequeridoEsquema
idpathsí{"type":"string","minLength":1,"maxLength":128}

Respuestas

200

Un work del catálogo federado (Work → Edition → MediaAsset → SourceBinding).

application/json

{
  "type": "object",
  "required": [
    "work"
  ],
  "properties": {
    "work": {
      "type": "object",
      "required": [
        "id",
        "title",
        "kind",
        "createdAt",
        "updatedAt"
      ],
      "properties": {
        "id": {
          "type": "string"
        },
        "title": {
          "type": "string"
        },
        "originalTitle": {
          "type": "string"
        },
        "year": {
          "type": "integer"
        },
        "kind": {
          "type": "string",
          "pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)*$",
          "maxLength": 64,
          "description": "Id registrado de un kind de obra (dec-0132): `movie`, `game.ps5`, `music.album`…"
        },
        "createdAt": {
          "type": "number"
        },
        "updatedAt": {
          "type": "number"
        }
      }
    }
  },
  "description": "Un work del catálogo federado (Work → Edition → MediaAsset → SourceBinding)."
}

400

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"
}

404

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"
}

422

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"
}

500

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"
}

502

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"
}

503

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"
}

504

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"
}