API HTTPcatalog-svc

GET /works

Listar works (paginado)

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

Works del catálogo federado, paginados (page desde 1, pageSize por defecto 50, máximo 200), con el total. Lectura pública de laboratorio: aún no hay bibliotecas privadas.

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

Parámetros

NombreEnRequeridoEsquema
pagequeryno{"type":"integer","minimum":1}
pageSizequeryno{"type":"integer","minimum":1,"maximum":200}

Respuestas

200

Página de works del catálogo y el total de works.

application/json

{
  "type": "object",
  "required": [
    "works",
    "total"
  ],
  "properties": {
    "works": {
      "type": "array",
      "items": {
        "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"
          }
        }
      }
    },
    "total": {
      "type": "integer",
      "minimum": 0
    }
  },
  "description": "Página de works del catálogo y el total de works."
}

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