Task

A task allows for file-centric workflows within Box. Users can create tasks on files and assign them to other users for them to complete the tasks.

string
11446498

The unique identifier for this task

string
task

Value is always task

string
review

The type of task the task assignee will be prompted to perform.

Value is one of review,complete

all_assignees

Defines which assignees need to complete this task before the task is considered completed.

  • all_assignees requires all assignees to review or approve the the task in order for it to be considered completed.
  • any_assignee accepts any one assignee to review or approve the the task in order for it to be considered completed.

Value is one of all_assignees,any_assignee

string / date-time
2012-12-12T10:53:43-08:00

When the task object was created

object

The user who created the task

11446498

The unique identifier for this user

user

Value is always user

string / email
ceo@example.com

The primary email address of this user

Aaron Levie50

The display name of this user

string / date-time
2012-12-12T10:53:43-08:00

When the task is due

boolean
true

Whether the task has been completed

object

The file associated with the task

string
12345

The unique identifier that represent a file.

The ID for any file can be determined by visiting a file in the web application and copying the ID from the URL. For example, for the URL https://*.app.box.com/files/123 the file_id is 123.

string
file

Value is always file

string
1

The HTTP etag of this file. This can be used within some API endpoints in the If-Match and If-None-Match headers to only perform changes on the file if (no) changes have happened.

The information about the current version of the file.

12345

The unique identifier that represent a file version.

file_version

Value is always file_version

134b65991ed521fcfe4724b7d814ab8ded5185dc

The SHA1 hash of this version of the file.

string
Contract.pdf

The name of the file

3

A numeric identifier that represents the most recent user event that has been applied to this item.

This can be used in combination with the GET /events-endpoint to filter out user events that would have occurred before this identifier was read.

An example would be where a Box Drive-like application would fetch an item via the API, and then listen to incoming user events for changes to the item. The application would ignore any user events where the sequence_id in the event is smaller than or equal to the sequence_id in the originally fetched resource.

string / digest
85136C79CBF9FE36BB9D05D0639C70C265C18D37

The SHA1 hash of the file. This can be used to compare the contents of a file on Box with a local file.

string
Legal review

A message that will be included with the task

A collection of task assignment objects associated with the task

Response Example

{
  "id": 11446498,
  "type": "task",
  "action": "review",
  "completion_rule": "all_assignees",
  "created_at": "2012-12-12T10:53:43-08:00",
  "created_by": {
    "id": 11446498,
    "type": "user",
    "login": "ceo@example.com",
    "name": "Aaron Levie"
  },
  "due_at": "2012-12-12T10:53:43-08:00",
  "is_completed": true,
  "item": {
    "id": 12345,
    "type": "file",
    "etag": 1,
    "file_version": {
      "id": 12345,
      "type": "file_version",
      "sha1": "134b65991ed521fcfe4724b7d814ab8ded5185dc"
    },
    "name": "Contract.pdf",
    "sequence_id": 3,
    "sha1": "85136C79CBF9FE36BB9D05D0639C70C265C18D37"
  },
  "message": "Legal review",
  "task_assignment_collection": {
    "entries": [
      {
        "id": 11446498,
        "type": "task_assignment",
        "item": {
          "id": 12345,
          "etag": 1,
          "type": "file",
          "sequence_id": 3,
          "name": "Contract.pdf",
          "sha1": "85136C79CBF9FE36BB9D05D0639C70C265C18D37",
          "file_version": {
            "id": 12345,
            "type": "file_version",
            "sha1": "134b65991ed521fcfe4724b7d814ab8ded5185dc"
          }
        },
        "assigned_to": {
          "id": 11446498,
          "type": "user",
          "name": "Aaron Levie",
          "login": "ceo@example.com"
        },
        "message": "Please review",
        "completed_at": "2012-12-12T10:53:43-08:00",
        "assigned_at": "2012-12-12T10:53:43-08:00",
        "reminded_at": "2012-12-12T10:53:43-08:00",
        "resolution_state": "incomplete",
        "assigned_by": {
          "id": 11446498,
          "type": "user",
          "name": "Aaron Levie",
          "login": "ceo@example.com"
        }
      }
    ],
    "total_count": 100
  }
}