moveTaskToBoard
Moves a task from its current board to a different target board. Use this instead of updateTask when changing a task’s board.
Template for Mutation:
mutation MoveTaskToBoard($hubId: ID!, $input: MoveTaskToBoardInput!) {
moveTaskToBoard(hubId: $hubId, input: $input) {
task {
id
}
}
}
Arguments
| hubId* ID non-null | The CommonWorkspace hub ID (a.k.a. ACE scope URN) of the hub that contains both boards. |
| input* MoveTaskToBoardInput non-null | Input object containing the task ID and the target board ID. |
Possible Returns
| Value Type | Description |
|---|---|
| MoveTaskToBoardPayload | Return payload for the moveTaskToBoard mutation. |
Examples
Example 1
Move a task to a different board in the same hub. Replace the example IDs with
your hub, task, and destination board IDs. You can use taskBoards to find the
destination board ID.
This example omits targetTaskStatusId, so the task uses the destination
board’s default status. To choose a different status, use a status ID from the
destination board.
Mutation
mutation MoveTaskToBoard($hubId: ID!, $input: MoveTaskToBoardInput!) {
moveTaskToBoard(hubId: $hubId, input: $input) {
task {
id
name
taskStatusId
board {
id
name
}
}
}
}
Variables
{
"hubId": "<HUB_ID>",
"input": {
"taskId": "<TASK_ID>",
"targetBoardId": "<TARGET_BOARD_ID>"
}
}
cURL request
Use a three-legged access token and set the region header to the hub’s region.
curl --request POST 'https://developer.api.autodesk.com/mfg/v3/graphql/public' \
--header 'Authorization: Bearer <YOUR_ACCESS_TOKEN>' \
--header 'Content-Type: application/json' \
--header 'region: <REGION>' \
--data '{
"query": "mutation MoveTaskToBoard($hubId: ID!, $input: MoveTaskToBoardInput!) { moveTaskToBoard(hubId: $hubId, input: $input) { task { id name taskStatusId board { id name } } } }",
"variables": {
"hubId": "<HUB_ID>",
"input": {
"taskId": "<TASK_ID>",
"targetBoardId": "<TARGET_BOARD_ID>"
}
}
}'
Illustrative response
The task ID is unchanged. The returned board ID matches the destination board,
and taskStatusId identifies that board’s default status.
{
"data": {
"moveTaskToBoard": {
"task": {
"id": "<TASK_ID>",
"name": "Review bracket tolerances",
"taskStatusId": "<TARGET_BOARD_DEFAULT_STATUS_ID>",
"board": {
"id": "<TARGET_BOARD_ID>",
"name": "Release review"
}
}
}
}
}