---
title: "POST /tasks/{taskId}:run"
method: POST
path: "/tasks/{taskId}:run"
tags: ["Tasks"]
---

# POST /tasks/{taskId}:run

`POST /tasks/{taskId}:run`

Run a task by taskId.

## Path parameters

- `taskId` string, required

## Query parameters

- `api-version` string, required

## Response `200`

The request has succeeded.

- Task
  - `id` string, required — The unique identifier of the task.
  - `startedAt` string, date-time — The time the task started.
  - `completedAt` string, date-time — The time the task completed.
  - `lastPolledAt` string, date-time — The last time the status of the task was updated.
  - `state` 'pending' | 'running' | 'paused' | 'complete' | 'incomplete' | 'failed' | 'warning' — The state the task is in.
  - `phase` 'running' | 'polling' | 'complete' — The phase the task is in.
  - `reason` string — The reason the task was moved into its current state, if the task wasn't completed.
  - `metadata` object — Attributes unique to the task. This differs by task type.

## Other responses

- `default` — An unexpected error response.

---

[API](https://skmtc.net/azure/apis/riskiq-microsoft-easm.md) · [All operations](https://skmtc.net/azure/apis/riskiq-microsoft-easm/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/azure/riskiq-microsoft-easm/revisions/5865b52c51a3/schema)
