---
title: "Get long-running task"
method: GET
path: "/wiki/rest/api/longtask/{id}"
tags: ["Long-running task"]
---

# 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](https://confluence.atlassian.com/x/_AozKw) required**:
Permission to access the Confluence site ('Can use' global permission).

## Path parameters

- `id` string, required

## Response `200`

Returned if the requested task is returned.

- LongTaskStatusWithLinks — Same as LongTaskStatus but with `_links` property. Status keys: - `ERROR_UNKNOWN` - Generic error - `ERROR_LOCK_FAILED` - Could not get the lock on destination space - `ERROR_RELINK` - Error when relink pages/attachments - `ERROR_COPY_PAGE` - Error while copying 1 page - `WARN_RENAME_PAGE` - Warning page is rename during copy - `WARN_IGNORE_COPY_PERMISSION` - Warning could not copy permission - `WARN_IGNORE_COPY_ATTACHMENT` - Warning could not copy attachment - `WARN_IGNORE_DELETE_PAGE` - Warning ignoring delete of a non agreed on page - `STATUS_COPIED_PAGES` - Message total pages are copied - `STATUS_COPYING_PAGES` - Message copy pages - `STATUS_RELINK_PAGES` - Message relink pages/attachments - `STATUS_DELETING_PAGES` - Message delete pages - `STATUS_DELETED_PAGES` - Message total pages are deleted - `STATUS_MOVING_PAGES` - Message move pages - `WARN_IGNORE_VIEW_RESTRICTED` - Permission changed - view restricted - `WARN_IGNORE_EDIT_RESTRICTED` - Permission changed - edit restricted - `INITIALIZING_TASK` - Message when initializing task - `UNKNOWN_STATUS` - Message when status is unknown
  - `ari` string — the ARI for the long task, based on its ID
  - `id` string, required
  - `name` object, required
    - `key` string, required
    - `args` object[], required
  - `elapsedTime` integer, required
  - `percentageComplete` integer, required
  - `successful` boolean, required
  - `finished` boolean, required
  - `messages` Message[], required
    - `translation` string
    - `args` union[], required
      - union
        - string
        - object
  - `_links` GenericLinks, required
  - `status` string
  - `errors` Message[]
    - `translation` string
    - `args` union[], required
      - union
        - string
        - object
  - `additionalDetails` object
    - `destinationId` string, nullable
    - `destinationUrl` string
    - `totalPageNeedToCopy` integer
    - `additionalProperties` string

## Other responses

- `401` — Returned if the calling user is not logged in to Confluence.
- `404` — Returned if; - There is no task with the given ID. - The calling user does not have permission to view the task.

---

[API](https://skmtc.net/atlassian/apis/the-confluence-cloud-rest-api.md) · [All operations](https://skmtc.net/atlassian/apis/the-confluence-cloud-rest-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/atlassian/the-confluence-cloud-rest-api/revisions/70088490f406/schema)
