---
ai:
  exclude: true
search:
  tags:
    - Long Task
    - GET
seo:
  description: >-
    Returns information about a long-running task. Reference for the GET
    /rest/api/longtask/{id} endpoint in the Confluence Data Center API.
sidebar:
  label: Get task by ID
  badge: GET
title: Get task by ID
type: openapi-operation
---
Returns information about a long-running task.

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

**Responses**

- `200` — returns a full JSON representation of a long task.
- `404` — Returned if there is no task with the given key, or if the calling user does not have permission to view it

Response example, 200:

```json
{
  "id": "string",
  "name": {
    "key": "string",
    "args": [
      {}
    ],
    "translation": "string"
  },
  "elapsedTime": 123456,
  "percentageComplete": 50,
  "successful": true,
  "messages": [
    {
      "key": "string",
      "args": [
        {}
      ],
      "translation": "string"
    }
  ]
}
```
