niyra_get_task — poll long-running tasks niyragettask When a niyraexecute or niyraask call exceeds its synchronous window, the response includes a taskid and the work continues in the background. This endpoint is how you check on it. Endpoint | Method | Path | Auth | Scope | | ------ | ---- | ---- | ----- | | GET | /v1/public/tasks/{taskid} | Bearer token | niyra:tasks:read | MCP equivalent: POST /mcp with method tools/call, name niyragettask, args {"taskid": "..."}. Response | Field | Type | Notes | | ----- | ---- | ----- | | status | enum | pending, running, complete, failed, cancelled | | terminal | bool | True iff status is one of complete / failed / cancelled. Stop polling. | | partialtext | string | Best-effort intermediate output. May lag behind actual progress. Null for failed/cancelled. | | result | string | Final output. Present when status is complete. | | error | object | Present when status is failed. Has code + message. | Polling pattern Errors | Status | Code | Meaning | | ------ | ---- | ------- | | 401 | invalidtoken | Token revoked/expired/unknown | | 403 | insufficientscope | Token lacks niyra:tasks:read | | 404 | notfound | Task ID unknown or owned by a different user | | 429 | ratelimitexceeded | You're polling too fast | Related - niyraexecute — the tool that spawns tasks - niyra_ask — also spawns under timeout - Rate limits