Skip to content
SHC Docs

Task API

  • router → prefix /api/resource/Task (tags: Task)
  • worker_router → prefix /api/resource/Worker (tags: Worker)
  • method route /api/method/shc.task.cancel

Hand-maintained notes against modules/task/router.go. Route inventory (generated): routes.md. Response models (generated): response-models/task.md.

MethodPathPermission
GET/api/resource/Task— (any authenticated caller)
GET/api/resource/Task/{id}platform:manage
GET/api/resource/Worker— (any authenticated caller)
POST/api/method/shc.task.cancelplatform:manage
  • summary: one full task row (canonical id, timestamps, handler kwargs)
  • permission: platform:manage (the detail row exposes full handler kwargs). The local CLI (UDS) resolves as the synthetic admin.
  • errors: X404404TSKNFD when no row matches
  • source: modules/task/router.go
  • summary: marks a PENDING task FAILED with the given reason. Only PENDING rows are eligible.
  • permission: platform:manage (cross-principal mutation of the cron/backup/job pipeline).
  • body: { "id": "<task_id>", "reason": "<optional>" } (id required)
  • source: modules/task/router.go