Renovar el SCT de lectura de una entrega propia (SEC-Z13)
apps/docs/generated/openapi/playback-svc.jsonPágina generada desde
apps/playback-svc/src/app.aot.ts. No se edita a mano:bun run docs:genla regenera ybun run docs:checkfalla si difiere.
POST /sessions/{sessionId}/token
Emite un SCT de lectura nuevo del mismo sid, actor y recurso presentando el vigente como prueba de posesión. Sólo el dueño; 403 si el SCT no es el último emitido (anti-replay) o está caducado más allá del skew; 429 sin cupo de renovaciones; 410 pasada la edad máxima de la entrega. Una entrega de otro actor o inexistente responde 404.
Acceso: Bearer de identity con policy resource:playback-session:renew.
| Campo | Valor |
|---|---|
| Servicio | playback-svc |
| operationId | playback.renewSession |
Policy (dec-0118 §3) | resource:playback-session:renew |
| Tags | playback |
| Nombre | En | Requerido | Esquema |
|---|---|---|---|
sessionId | path | sí | {"type":"string","pattern":"^(pkg|sess)_[0-9a-f]{32}$"} |
Requerido: sí.
application/json{
"type": "object",
"required": [
"capability"
],
"properties": {
"capability": {
"type": "string",
"pattern": "^[A-Za-z0-9_-]{272}$"
}
},
"description": "SCT de lectura vigente (o caducado hace menos que el skew de 30 s) de la misma entrega."
}Capability de lectura nueva del mismo sid, actor y recurso, con exp nuevo. La anterior sigue valiendo hasta que caduque.
application/json
{
"type": "object",
"required": [
"capability"
],
"properties": {
"capability": {
"type": "object",
"required": [
"token",
"expiresAt",
"ttlMs"
],
"properties": {
"token": {
"type": "string",
"pattern": "^[A-Za-z0-9_-]{272}$"
},
"expiresAt": {
"type": "integer"
},
"ttlMs": {
"type": "integer",
"minimum": 1
}
}
}
},
"description": "Capability de lectura nueva del mismo sid, actor y recurso, con exp nuevo. La anterior sigue valiendo hasta que caduque."
}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"
}Problem Details (RFC 9457), status 403. Códigos: PLAYBACK_CAPABILITY_INVALID.
application/problem+json
{
"type": "object",
"required": [
"type",
"title",
"status",
"code",
"retryable",
"category"
],
"properties": {
"type": {
"type": "string"
},
"title": {
"type": "string"
},
"status": {
"type": "number",
"const": 403
},
"code": {
"type": "string",
"const": "PLAYBACK_CAPABILITY_INVALID"
},
"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: PLAYBACK_SESSION_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",
"const": "PLAYBACK_SESSION_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 410. Códigos: PLAYBACK_SESSION_EXPIRED.
application/problem+json
{
"type": "object",
"required": [
"type",
"title",
"status",
"code",
"retryable",
"category"
],
"properties": {
"type": {
"type": "string"
},
"title": {
"type": "string"
},
"status": {
"type": "number",
"const": 410
},
"code": {
"type": "string",
"const": "PLAYBACK_SESSION_EXPIRED"
},
"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 429. Códigos: rate-limited, PLAYBACK_RENEW_RATE_LIMITED.
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_RENEW_RATE_LIMITED"
},
"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: 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",
"const": "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"
}