Going Stellar

Home/Atlassian REST API reference

Jira and Confluence Cloud REST API

Confluence REST API v1 vs v2

Confluence Cloud serves two REST APIs side by side. v2 lives under /wiki/api/v2, returns string ids and pages through a cursor in the Link header. v1 lives under /wiki/rest/api, uses the expand parameter, and still answered every call on 29 Nov 2026 while sending a Deprecation header. Pick v2 where it has the operation, and fall back to v1 for the rest.

Endpoints

MethodPathWhat it does
GET/wiki/api/v2/pages/{id}v2: reads a page; the body comes back only for the format named in body-format.
GET/wiki/api/v2/spacesv2: lists spaces, filterable by keys.
POST/wiki/rest/api/content/{id}/labelv1: adds labels to a piece of content.
GET/wiki/rest/api/searchv1: CQL search.

Examples

GET /wiki/rest/api/content/{pageId}

v1 reads a page and asks for the body, version and space in one call through expand.

curl

curl -G \
  -u "you@example.com:$ATLASSIAN_API_TOKEN" \
  -H 'Accept: application/json' \
  --data-urlencode 'expand=body.storage,version,space' \
  'https://your-domain.atlassian.net/wiki/rest/api/content/{pageId}'

Python (requests)

import os
import requests

EMAIL = "you@example.com"
r = requests.get(
    'https://your-domain.atlassian.net/wiki/rest/api/content/{pageId}',
    auth=(EMAIL, os.environ["ATLASSIAN_API_TOKEN"]),
    headers={'Accept': 'application/json'},
    params={'expand': 'body.storage,version,space'},
)
print(r.status_code, r.text)

Response: HTTP 200

{
 "id": "33653083",
 "type": "page",
 "status": "current",
 "title": "Example page",
 "space": {
  "id": 655364,
  "key": "SD"
 },
 "version": {
  "message": "",
  "number": 1
 },
 "body": {
  "storage": {
   "value": "<p>Example page body.</p>",
   "representation": "storage"
  }
 }
}

Sent to Atlassian Cloud on .

GET /wiki/api/v2/pages/{pageId}

v2 reads the same page; the body is asked for with body-format and the ids are strings.

curl

curl -G \
  -u "you@example.com:$ATLASSIAN_API_TOKEN" \
  -H 'Accept: application/json' \
  --data-urlencode 'body-format=storage' \
  'https://your-domain.atlassian.net/wiki/api/v2/pages/{pageId}'

Python (requests)

import os
import requests

EMAIL = "you@example.com"
r = requests.get(
    'https://your-domain.atlassian.net/wiki/api/v2/pages/{pageId}',
    auth=(EMAIL, os.environ["ATLASSIAN_API_TOKEN"]),
    headers={'Accept': 'application/json'},
    params={'body-format': 'storage'},
)
print(r.status_code, r.text)

Response: HTTP 200

{
 "parentId": "655541",
 "version": {
  "number": 1,
  "message": ""
 },
 "spaceId": "655364",
 "status": "current",
 "body": {
  "storage": {
   "representation": "storage",
   "value": "<p>Example page body.</p>"
  }
 },
 "title": "Example page",
 "id": "33653083"
}

Sent to Atlassian Cloud on .

GET /wiki/rest/api/space/SD

v1 space lookup by key. The space id is a number in this call.

curl

curl \
  -u "you@example.com:$ATLASSIAN_API_TOKEN" \
  -H 'Accept: application/json' \
  'https://your-domain.atlassian.net/wiki/rest/api/space/SD'

Python (requests)

import os
import requests

EMAIL = "you@example.com"
r = requests.get(
    'https://your-domain.atlassian.net/wiki/rest/api/space/SD',
    auth=(EMAIL, os.environ["ATLASSIAN_API_TOKEN"]),
    headers={'Accept': 'application/json'},
)
print(r.status_code, r.text)

Response: HTTP 200

{
 "id": 655364,
 "key": "SD",
 "name": "Software Development",
 "type": "onboarding",
 "status": "current"
}

Response headers

Warning: 299 - "Deprecated API, will be removed on Mon, 31 Mar 2025 00:00:00 GMT"
Deprecation: Wed, 1 Mar 2023 00:00:00 GMT

Sent to Atlassian Cloud on .

GET /wiki/api/v2/spaces

v2 space lookup by key. The same space comes back with a string id and a homepageId.

curl

curl -G \
  -u "you@example.com:$ATLASSIAN_API_TOKEN" \
  -H 'Accept: application/json' \
  --data-urlencode 'keys=SD' \
  'https://your-domain.atlassian.net/wiki/api/v2/spaces'

Python (requests)

import os
import requests

EMAIL = "you@example.com"
r = requests.get(
    'https://your-domain.atlassian.net/wiki/api/v2/spaces',
    auth=(EMAIL, os.environ["ATLASSIAN_API_TOKEN"]),
    headers={'Accept': 'application/json'},
    params={'keys': 'SD'},
)
print(r.status_code, r.text)

Response: HTTP 200

{
 "results": [
  {
   "homepageId": "655541",
   "status": "current",
   "name": "Software Development",
   "key": "SD",
   "id": "655364",
   "type": "onboarding"
  }
 ]
}

Response headers

Link: <https://your-domain.atlassian.net/wiki>; rel="base"

Sent to Atlassian Cloud on .

POST /wiki/rest/api/content

v1 page creation with the parent given as an ancestor and the space given by key.

curl

curl -X POST \
  -u "you@example.com:$ATLASSIAN_API_TOKEN" \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \
  --data '{
  "type": "page",
  "title": "Example page created with v1",
  "space": {
    "key": "SD"
  },
  "ancestors": [
    {
      "id": "{pageId}"
    }
  ],
  "body": {
    "storage": {
      "value": "<p>v1</p>",
      "representation": "storage"
    }
  }
}' \
  'https://your-domain.atlassian.net/wiki/rest/api/content'

Python (requests)

import os
import requests

EMAIL = "you@example.com"
r = requests.post(
    'https://your-domain.atlassian.net/wiki/rest/api/content',
    auth=(EMAIL, os.environ["ATLASSIAN_API_TOKEN"]),
    headers={'Accept': 'application/json'},
    json={'type': 'page',
          'title': 'Example page created with v1',
          'space': {'key': 'SD'},
          'ancestors': [{'id': '{pageId}'}],
          'body': {'storage': {'value': '<p>v1</p>', 'representation': 'storage'}}},
)
print(r.status_code, r.text)

Response: HTTP 200

{
 "id": "33784019",
 "type": "page",
 "status": "current",
 "title": "Example page created with v1",
 "space": {
  "key": "SD"
 },
 "ancestors": [
  {
   "id": "655541",
   "title": "Software Development"
  }
 ],
 "body": {
  "storage": {
   "value": "<p>v1</p>",
   "representation": "storage"
  }
 }
}

Sent to Atlassian Cloud on .

How it behaves

  • v1 calls on 29 Nov 2026 returned 200 and carried a Warning header announcing removal on 31 Mar 2025, a Deprecation header dated 1 Mar 2023 and a Link header with rel="deprecation" (conf-space-v1, conf-page-get-v1-expand, conf-page-create-v1). v2 responses carry none of these.
  • v1 returns the space id as a number (655364); v2 returns it as a string ("655364"). Page ids are strings in both.
  • v2 returns an empty body object unless body-format is set (conf-page-get). v1 returned a body in the run only because expand=body.storage was set.
  • A page created with v1 shows up in the v2 children listing of its parent (conf-page-children), so both APIs read and write the same content.

Pitfalls

  • Page ids, space ids and version numbers have different shapes in v1 and v2 (number vs string for space ids), so a client that mixes both needs to normalise them.
  • The v2 OpenAPI spec has no search path, no multipart attachment upload and no current-user path, so those calls stay on v1.
  • A Deprecation header with a removal date in the past does not mean the endpoint is gone. Read the header, plan the move, and check the Confluence changelog before relying on it.

Questions and answers

Is Confluence REST API v1 removed?

Not on 29 Nov 2026. The v1 calls in these examples returned 200 and sent a Warning header that names 31 Mar 2025 as the removal date.

Which API paginates with a cursor?

v2 does. The next URL is in the Link header and in _links.next of the body.

Sources

  1. The Confluence Cloud REST API v2 (Atlassian Developer)
  2. The Confluence Cloud REST API v1 (Atlassian Developer)
  3. Using the REST API, Confluence (Atlassian Developer)

Markdown version · All REST API pages