Cloud
Jira Cloud platform / Reference / REST API v3

This resource represents a long-running asynchronous tasks. Use it to obtain details about the progress of a long-running task or cancel a long-running task.

GET

Get task

Returns the status of a long-running asynchronous task.

When a task has finished, this operation returns the JSON blob applicable to the task. See the documentation of the operation that created the task for details. Task details are not permanently retained. As of September 2019, details are retained for 14 days although this period may change without notice.

Deprecation notice: The required OAuth 2.0 scopes will be updated on June 15, 2024.

  • read:jira-work

Permissions required: either of:

Data Security Policy: Exempt from app access rules
Scopes
read:jira-work

Connect app scope requiredNONE

Request

Path parameters

taskId

string

Required

Responses

Returned if the request is successful.

application/json

TaskProgressBeanObject

Details about a task.

GET/rest/api/3/task/{taskId}
1 2 3 4 5 6 7 8 9 10 11 12 // This sample uses Atlassian Forge // https://developer.atlassian.com/platform/forge/ import api, { route } from "@forge/api"; const response = await api.asUser().requestJira(route`/rest/api/3/task/{taskId}`, { headers: { 'Accept': 'application/json' } }); console.log(`Response: ${response.status} ${response.statusText}`); console.log(await response.json());
200Response
1 2 3 4 5 6 7 8 9 10 11 12 13 14 { "self": "https://your-domain.atlassian.net/rest/api/3/task/1", "id": "1", "description": "Task description", "status": "COMPLETE", "result": "the task result, this may be any JSON", "submittedBy": 10000, "progress": 100, "elapsedRuntime": 156, "submitted": 1501708132800, "started": 1501708132900, "finished": 1501708133000, "lastUpdate": 1501708133000 }
POST

Cancel taskExperimental

Cancels a task.

Permissions required: either of:

Data Security Policy: Exempt from app access rules
Scopes
ClassicRECOMMENDED:write:jira-work
Granular:delete:async-task:jira

Connect app scope requiredNONE

Request

Path parameters

taskId

string

Required

Responses

Returned if the request is successful.

application/json

any

POST/rest/api/3/task/{taskId}/cancel
1 2 3 4 5 6 7 8 9 10 11 12 13 // This sample uses Atlassian Forge // https://developer.atlassian.com/platform/forge/ import api, { route } from "@forge/api"; const response = await api.asUser().requestJira(route`/rest/api/3/task/{taskId}/cancel`, { method: 'POST', headers: { 'Accept': 'application/json' } }); console.log(`Response: ${response.status} ${response.statusText}`); console.log(await response.json());

Rate this page: