# IRPCApplicationTaskQueue.UpdateTask

Location: [gRPC API](https://developer.m-files.com/APIs/gRPC-API/index.md) > [Server integration API](https://developer.m-files.com/APIs/gRPC-API/integration/index.md) > [Application task queue](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCApplicationTaskQueue/index.md)

HTML version: https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCApplicationTaskQueue/UpdateTask/

Badges: `Server integration API / specialized` `write` `session`

Reports the progress or the final state of a task.

- **Service:** [Application task queue](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCApplicationTaskQueue/index.md) `MFiles.IRPCApplicationTaskQueue`
- **gRPC method:** `/MFiles.IRPCApplicationTaskQueue/UpdateTask`
- **HTTP (mf-http-grpc):** `POST /grpc/v1/update-task`
- **Request:** [`UpdateTaskRequest`](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCApplicationTaskQueue/UpdateTask/index.md#request)
- **Response:** [`UpdateTaskResponse`](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCApplicationTaskQueue/UpdateTask/index.md#response)
- **Book and level:** Server integration API, specialized
- **Kind:** write
- **Session:** Required: the session ID from LogIn in the mfiles-session-id-bin metadata.
- **Idempotent:** no
- **Returns metadata structure version:** no
- **Streaming:** none (unary)

<a id="remarks"></a>

## Remarks

- Allowed changes: an in-progress task can stay in progress (progress update) or become
  `COMPLETED`, `FAILED` or `CANCELED`; a waiting task can only be cancelled. A task in a final
  state cannot change, and no call can set `WAITING` or `IN_PROGRESS`. Other changes fail with
  "Invalid transition of application task ...".
- Update an in-progress task at least once within its restore timeout to keep it reserved.
- An unknown task ID fails with "Not found.". Requires a vault session and the vault right
  `change_full_control_role`.

<a id="request"></a>

## Request: UpdateTaskRequest

> Nested message fields are expanded to depth 3; follow a type link for deeper levels and for the type's own page.

| Field | Type | Description |
|---|---|---|
| `task_id` | `string` | The ID of the task. |
| `state` | [`ApplicationTaskState`](https://developer.m-files.com/APIs/gRPC-API/Reference/Enums/MFiles.ApplicationTaskState/index.md) | The new state of the task. Values: `APPLICATION_TASK_STATE_WAITING` (0), `APPLICATION_TASK_STATE_IN_PROGRESS` (1), `APPLICATION_TASK_STATE_COMPLETED` (2), `APPLICATION_TASK_STATE_FAILED` (3), `APPLICATION_TASK_STATE_CANCELED` (4), `APPLICATION_TASK_STATE_NONE` (5). |
| `progress` | `string` | Free-form progress information, at most 1,048,575 characters. |

<a id="response"></a>

## Response: UpdateTaskResponse

No fields.
