Skip to main content

GET /assignments/{taskId}

PRO

The functionality is available in PRO Edition only

Description

Gets data on assignments for a specified task subtree

The route handles the HTTP GET request made to the /assignments/{taskId} path. It is used by RestDataProvider.getData() on subtree (lazy) load when called with { assignments: true }, and is paired with the provide-data action.

Parameters

The next path parameters are sent in the request line:

  • {taskId} (number) - (required) the id of the task whose subtree assignments should be returned

Payload

No payload is required.

Response

The server returns a JSON array with the assignments whose task belongs to the subtree rooted at {taskId}. See parameters description here: assignments.

Example:

[
{
"id": 1,
"task": 10,
"resource": 101,
"units": 100
},
{
"id": 2,
"task": 10,
"resource": 102,
"units": 50
}
]

The HTTP status code shows whether the request succeeds (status 200) or fails (status 500).


Related article: Working with server