Read a human task
GET /v1/human-tasks/{human_task_id}
| Property | Value |
|---|---|
| Operation | get_human_task |
| Group | Human tasks |
| Scope | processes:read |
Scopes of include values | content needs processes:content |
| Route class | read |
| Idempotency | No Idempotency-Key |
| Audit | An audited content read processes.human_task.read, when the request names an include value |
| Released in | 1.62.0 |
| Phase 0 host | Served (the hosted api pins 1.65.0) |
Answers a human task (1.62.0); its title and completed fields only when the read names include=content, which needs processes:content and is an audited content read, as opening a task that shows an instance's content is (section 9.5).
Request
Set VOCAL_API to the base URL of your API and VOCAL_API_KEY to an API key with the processes:read scope (Authentication and keys). Replace each placeholder, such as agt_... or <name>, with your own value.
curl "$VOCAL_API/v1/human-tasks/htk_..." \
-H "Authorization: Bearer $VOCAL_API_KEY"const response = await fetch(`${process.env.VOCAL_API}/v1/human-tasks/htk_...`, {
headers: {
Authorization: `Bearer ${process.env.VOCAL_API_KEY}`,
},
});
console.log(response.status, await response.text());import os
import requests
response = requests.get(
f"{os.environ['VOCAL_API']}/v1/human-tasks/htk_...",
headers={
"Authorization": f"Bearer {os.environ['VOCAL_API_KEY']}",
},
)
print(response.status_code, response.text)Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
human_task_id | path | HumanTaskId | yes | The id of a human task: htk_ and the row's UUIDv7 in 26 Crockford base32 characters. Opaque and safe to log. |
include | query | array of ProcessInclude | no | content adds the content (processes:content). |
Responses
| Status | Content type | Shape | Error codes |
|---|---|---|---|
200 | application/json | HumanTask | |
400 | application/json | ErrorEnvelope | invalid_request |
401 | application/json | ErrorEnvelope | unauthenticated |
403 | application/json | ErrorEnvelope | forbidden |
404 | application/json | ErrorEnvelope | not_found |
429 | application/json | ErrorEnvelope | rate_limited |
500 | application/json | ErrorEnvelope | internal_error |
Fields of the 200 answer
The shape is HumanTask.
| Field | Type | Required | Description |
|---|---|---|---|
assignee | HumanTaskAssignee | yes | |
claimed_at | Timestamp or null | yes | |
claimed_by | MemberId or null | yes | |
completion | HumanTaskCompletion or null | yes | |
created_at | Timestamp | yes | |
due_at | Timestamp or null | yes | When the node takes timeout and the task expires; null when unbounded. |
environment | Environment | yes | |
escalate_at | Timestamp or null | yes | When human_task.overdue is written if the task is still open or claimed. |
form | map of WorkflowField | yes | Typed fields, with an outcome enum. |
id | HumanTaskId | yes | |
node_id | WorkflowNodeId | yes | |
object | "human_task" | yes | |
organization_id | OrganizationId | yes | |
process_id | ProcessInstanceId | yes | |
status | HumanTaskStatus | yes | |
step_id | ProcessStepId | yes | |
title | string or null | yes | Rendered from the node's template. Content; null unless the read names include=content. |
updated_at | Timestamp | yes | |
workflow_id | WorkflowId | yes | |
workflow_version | integer | yes |