Audit
Analytics
Content
Content - attachments
Content body
Content - children and descendants
Content - macro body
Content comments
Content labels
Content permissions
Content properties
Content restrictions
Content states
Content versions
Content watches
Dynamic modules
Experimental
Group
Inline tasks
Label info
Long-running task
Relation
Search
Settings
Space
Space permissions
Space properties
Space settings
Template
Themes
Users

Rate this page:

Long-running task

Get long-running tasks

GET /wiki/rest/api/longtask

Returns information about all active long-running tasks (e.g. space export), such as how long each task has been running and the percentage of each task that has completed.

Permissions required: Permission to access the Confluence site ('Can use' global permission).

Connect app scope requiredREAD

read:content.metadata:confluence

Request

Query parameters
start

integer

The starting index of the returned tasks.

Default: 0, Minimum: 0, Format: int32
limit

integer

The maximum number of tasks to return per page. Note, this may be restricted by fixed system limits.

Default: 100, Minimum: 0, Format: int32

Example

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.asApp().requestConfluence(route`/wiki/rest/api/longtask`, {
  headers: {
    'Accept': 'application/json'
  }
});

console.log(`Response: ${response.status} ${response.statusText}`);
console.log(await response.json());

Responses

Returned if the requested tasks are returned.

Content typeValue
application/json

LongTaskStatusArray

Get long-running task

GET /wiki/rest/api/longtask/{id}

Returns information about an active long-running task (e.g. space export), such as how long it has been running and the percentage of the task that has completed.

Permissions required: Permission to access the Confluence site ('Can use' global permission).

Connect app scope requiredREAD

ClassicRECOMMENDED:read:confluence-space.summary
Granular:read:content.metadata:confluence

Request

Path parameters
id Required

string

The ID of the task.

Example

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.asApp().requestConfluence(route`/wiki/rest/api/longtask/{id}`, {
  headers: {
    'Accept': 'application/json'
  }
});

console.log(`Response: ${response.status} ${response.statusText}`);
console.log(await response.json());

Responses

Returned if the requested task is returned.

Content typeValue
application/json

LongTaskStatusWithLinks

Rate this page: