Blog Post
Page
Space

Rate this page:

About

This is the reference for the Confluence Cloud REST API v2, with definitions and performance intended to be an improvement over v1. You can click on the meatball menu in the upper right to download the spec or Postman collection.

Authentication and authorization

Authentication: If you are building a Cloud app, authentication is implemented via JWT or Oauth 2.0, depending on what you're building (see Authentication for apps). Otherwise, if you are authenticating directly against the REST API, the REST API supports basic auth (see Basic auth for REST APIs).

Authorization: If you are building a Cloud app, authorization can be implemented by scopes or by OAuth 2.0 user impersonation. Otherwise, if you are making calls directly against the REST API, authorization is based on the user used in the authentication process.

See Security overview for more details on authentication and authorization.

Using the REST API

Pagination: The Confluence REST API v2 uses cursor-based pagination: a method that returns a response with multiple objects can only return a limited number at one time. This limits the size of responses and conserves server resources.

Use the 'limit' and 'cursor' parameters on endpoints that return multiple objects to work with pagination. First, make a request with your desired limit in the 'limit' parameter, then observe the Link header in the response. If there are additional entities to be retrieved, the next URL in the Link header will allow you to retrieve the next set of results.

For example, the following request will return 5 page objects (if there are 5 present in the target site).

1
2
GET /wiki/api/v2/pages?limit=5

If there are additional pages available, the Link header will look like:

1
2
<<URL to Confluence Site>/wiki/api/v2/pages?limit=5&cursor=<cursor token>>; rel="next"

The URL within the Link header will allow you to access the next 5 pages, while the rel="next" denotes that the URL refers to the "next" set of pages. Relations for a single URL are separated by semicolons (;) and URLs are separated by commas (,) If there are no related URLs, the Link header will not be present in the response.

Rate this page: