Sample - Box Platform API
GET/tasks/{task_id}

Get a task

Retrieves information about a specific task in a file-centric workflow. Use task_id to obtain the task's action, due date, completion state, assignees, and completion rule.

  • RetriesRetries up to 2×, 500ms backoff, 30s timeout.

1 parameter
task_idstringrequired
The string identifier of the task to retrieve.

3 status codes
200Returns a task object containing its identifier, action, due date, message, assignment collection, completion state, creator, timestamps, and completion rule.
idstringoptional
The unique identifier for this task.
typestringoptional
The value will always be `task`.
Allowed:task
itemobjectoptional
due_atstringoptional
When the task is due.
actionstringoptional
The type of task the task assignee will be prompted to perform.
Allowed:reviewcomplete
messagestringoptional
A message that will be included with the task.
task_assignment_collectionobjectoptional
is_completedbooleanoptional
Whether the task has been completed.
created_byobjectoptional
created_atstringoptional
When the task object was created.
completion_rulestringoptional
Defines which assignees need to complete this task before the task is considered completed. * `all_assignees` requires all assignees to review or approve the task in order for it to be considered completed. * `any_assignee` accepts any one assignee to review or approve the task in order for it to be considered completed.
Allowed:all_assigneesany_assignee
404Returned when the task cannot be found or the authenticated user does not have access to the file to which the task is assigned.
typestringoptional
The value will always be `error`.
Allowed:error
statusintegeroptional
The HTTP status of the response.
codestringoptional
A Box-specific error code.
Allowed:createdacceptedno_contentredirectnot_modifiedbad_requestunauthorizedforbiddennot_foundmethod_not_allowedconflictprecondition_failed
messagestringoptional
A short message describing the error.
context_infoobjectoptional
A free-form object that contains additional context about the error. The possible fields are defined on a per-endpoint basis. `message` is only one example.
help_urlstringoptional
A URL that links to more information about why this error occurred.
request_idstringoptional
A unique identifier for this response, which can be used when contacting Box support.
defaultReturned for an unexpected client error.
typestringoptional
The value will always be `error`.
Allowed:error
statusintegeroptional
The HTTP status of the response.
codestringoptional
A Box-specific error code.
Allowed:createdacceptedno_contentredirectnot_modifiedbad_requestunauthorizedforbiddennot_foundmethod_not_allowedconflictprecondition_failed
messagestringoptional
A short message describing the error.
context_infoobjectoptional
A free-form object that contains additional context about the error. The possible fields are defined on a per-endpoint basis. `message` is only one example.
help_urlstringoptional
A URL that links to more information about why this error occurred.
request_idstringoptional
A unique identifier for this response, which can be used when contacting Box support.

Error handling

A 404 is returned when the task cannot be found or the authenticated user does not have access to the file assigned to the task. task_id must identify the task you want to retrieve.