Gap
The CLI needs to fetch one task by ID for tflowctl task show. Currently no such route exists.
| Path probed |
Result |
| GET /v1/workspaces/{ws}/tasks/{id} |
405 Method Not Allowed (PATCH and DELETE live here) |
| GET /v1/tasks/{id} |
404 Not Found |
Proposed
Add a handler at the existing workspace-scoped path:
GET /v1/workspaces/{workspace_id}/tasks/{task_id}
| Aspect |
Shape |
| Auth |
Same as existing PATCH/DELETE on this path: bearer token, workspace membership required |
| Path params |
workspace_id (UUID), task_id (UUID) |
| Response 200 |
TaskResponse (same shape as POST/PATCH return values) |
| Response 404 |
Task does not exist in this workspace; preserves non-disclosure for cross-tenant probes |
| Response 403 |
Caller is not a member of the workspace |
Why not flat /v1/tasks/{id}
Tenancy boundary is the workspace. A flat path would either leak cross-workspace existence on 403-vs-404, or require an extra round-trip to determine ownership. Workspace-scoped path keeps RBAC at the URL level and matches the existing PATCH/DELETE convention.
Consumer
The CLI Issue #104 currently omits tflowctl task show. Once this lands, that command becomes a thin call to the new endpoint.
Gap
The CLI needs to fetch one task by ID for tflowctl task show. Currently no such route exists.
Proposed
Add a handler at the existing workspace-scoped path:
GET /v1/workspaces/{workspace_id}/tasks/{task_id}
Why not flat /v1/tasks/{id}
Tenancy boundary is the workspace. A flat path would either leak cross-workspace existence on 403-vs-404, or require an extra round-trip to determine ownership. Workspace-scoped path keeps RBAC at the URL level and matches the existing PATCH/DELETE convention.
Consumer
The CLI Issue #104 currently omits tflowctl task show. Once this lands, that command becomes a thin call to the new endpoint.