API HTTPplayback-svc

POST /ingest/sessions

Abrir una sesión de ingesta (SCT ingest + endpoint del daemon)

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

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

POST /ingest/sessions

Abre una sesión de ingesta para un fichero de sizeBytes y devuelve el endpoint de conduit en el daemon y la SCT de scope ingest. 429 si el actor ya tiene abiertas todas las permitidas; 413 si el fichero pasa del tope del nodo. Los bytes van directos al daemon, nunca por aquí.

Acceso: Bearer de identity con policy resource:ingest-session:create.

CampoValor
Servicioplayback-svc
operationIdpostIngestSessions
Policy (dec-0118 §3)resource:ingest-session:create
Tagsingest

Cuerpo

Requerido: sí.

application/json

{
  "type": "object",
  "required": [
    "sizeBytes"
  ],
  "properties": {
    "sizeBytes": {
      "type": "integer",
      "minimum": 0,
      "maximum": 1099511627776
    }
  },
  "description": "Tamaño del fichero a subir; la capability lo fija como tope."
}

Respuestas

200

Sesión de ingesta abierta: endpoint del wire de conduit en el daemon, tope de bytes y la capability (SCT de scope ingest) para subir.

application/json

{
  "type": "object",
  "required": [
    "sessionId",
    "endpoint",
    "maxBytes",
    "capability"
  ],
  "properties": {
    "sessionId": {
      "type": "string",
      "pattern": "^ing_[0-9a-f]{32}$"
    },
    "endpoint": {
      "type": "string",
      "minLength": 1
    },
    "maxBytes": {
      "type": "integer",
      "minimum": 0
    },
    "capability": {
      "type": "object",
      "required": [
        "token",
        "expiresAt"
      ],
      "properties": {
        "token": {
          "type": "string",
          "pattern": "^[A-Za-z0-9_-]{272}$"
        },
        "expiresAt": {
          "type": "integer"
        }
      }
    }
  },
  "description": "Sesión de ingesta abierta: endpoint del wire de conduit en el daemon, tope de bytes y la capability (SCT de scope ingest) para subir."
}

400

Problem Details (RFC 9457), status 400. Códigos: parse, PLAYBACK_INVALID_INPUT.

application/problem+json

{
  "anyOf": [
    {
      "type": "object",
      "required": [
        "type",
        "title",
        "status",
        "code"
      ],
      "properties": {
        "type": {
          "type": "string"
        },
        "title": {
          "type": "string"
        },
        "status": {
          "type": "number",
          "const": 400
        },
        "code": {
          "type": "string",
          "const": "parse"
        },
        "detail": {
          "type": "string"
        }
      },
      "x-styx-media-type": "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",
          "const": "PLAYBACK_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"
    }
  ]
}

401

Problem Details (RFC 9457), status 401. Códigos: unauthenticated, reauth-required.

application/problem+json

{
  "type": "object",
  "required": [
    "type",
    "title",
    "status",
    "code"
  ],
  "properties": {
    "type": {
      "type": "string"
    },
    "title": {
      "type": "string"
    },
    "status": {
      "type": "number",
      "const": 401
    },
    "code": {
      "type": "string",
      "enum": [
        "unauthenticated",
        "reauth-required"
      ]
    },
    "detail": {
      "type": "string"
    }
  },
  "x-styx-media-type": "application/problem+json"
}

403

Problem Details (RFC 9457), status 403. Códigos: forbidden.

application/problem+json

{
  "type": "object",
  "required": [
    "type",
    "title",
    "status",
    "code"
  ],
  "properties": {
    "type": {
      "type": "string"
    },
    "title": {
      "type": "string"
    },
    "status": {
      "type": "number",
      "const": 403
    },
    "code": {
      "type": "string",
      "const": "forbidden"
    },
    "detail": {
      "type": "string"
    }
  },
  "x-styx-media-type": "application/problem+json"
}

413

Problem Details (RFC 9457), status 413. Códigos: PLAYBACK_INGEST_FILE_TOO_LARGE.

application/problem+json

{
  "type": "object",
  "required": [
    "type",
    "title",
    "status",
    "code",
    "retryable",
    "category"
  ],
  "properties": {
    "type": {
      "type": "string"
    },
    "title": {
      "type": "string"
    },
    "status": {
      "type": "number",
      "const": 413
    },
    "code": {
      "type": "string",
      "const": "PLAYBACK_INGEST_FILE_TOO_LARGE"
    },
    "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"
}

429

Problem Details (RFC 9457), status 429. Códigos: rate-limited, PLAYBACK_INGEST_TOO_MANY_SESSIONS.

application/problem+json

{
  "anyOf": [
    {
      "type": "object",
      "required": [
        "type",
        "title",
        "status",
        "code"
      ],
      "properties": {
        "type": {
          "type": "string"
        },
        "title": {
          "type": "string"
        },
        "status": {
          "type": "number",
          "const": 429
        },
        "code": {
          "type": "string",
          "const": "rate-limited"
        },
        "detail": {
          "type": "string"
        }
      },
      "x-styx-media-type": "application/problem+json"
    },
    {
      "type": "object",
      "required": [
        "type",
        "title",
        "status",
        "code",
        "retryable",
        "category"
      ],
      "properties": {
        "type": {
          "type": "string"
        },
        "title": {
          "type": "string"
        },
        "status": {
          "type": "number",
          "const": 429
        },
        "code": {
          "type": "string",
          "const": "PLAYBACK_INGEST_TOO_MANY_SESSIONS"
        },
        "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: PLAYBACK_INGEST_UNAVAILABLE, PLAYBACK_DAEMON_UNAVAILABLE.

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": [
        "PLAYBACK_INGEST_UNAVAILABLE",
        "PLAYBACK_DAEMON_UNAVAILABLE"
      ]
    },
    "detail": {
      "type": "string"
    },
    "instance": {
      "type": "string"
    },
    "retryable": {
      "type": "boolean"
    },
    "category": {
      "type": "string",
      "enum": [
        "transient",
        "permanent",
        "recoverable"
      ]
    }
  },
  "x-styx-media-type": "application/problem+json"
}

507

Problem Details (RFC 9457), status 507. Códigos: PLAYBACK_INGEST_QUOTA_EXCEEDED.

application/problem+json

{
  "type": "object",
  "required": [
    "type",
    "title",
    "status",
    "code",
    "retryable",
    "category"
  ],
  "properties": {
    "type": {
      "type": "string"
    },
    "title": {
      "type": "string"
    },
    "status": {
      "type": "number",
      "const": 507
    },
    "code": {
      "type": "string",
      "const": "PLAYBACK_INGEST_QUOTA_EXCEEDED"
    },
    "detail": {
      "type": "string"
    },
    "instance": {
      "type": "string"
    },
    "retryable": {
      "type": "boolean"
    },
    "category": {
      "type": "string",
      "enum": [
        "transient",
        "permanent",
        "recoverable"
      ]
    }
  },
  "x-styx-media-type": "application/problem+json"
}