Confluence has a REST API that is the primary and recommended API for developers to use. The REST API provides access to various Confluence resources and capabilities.
Confluence also offers a GraphQL API, which was released in beta in March 2022. Key points about the GraphQL API include:
{"X-ExperimentalApi" : "confluence-agg-beta"}
Confluence previously had a JSON-RPC API, but it was deprecated since Confluence 5.5. Key points about this deprecated API:
In summary, while Confluence has had multiple API types in the past, the current recommended APIs are REST and GraphQL (in beta), with REST being the primary choice for most developers.
Webhooks are available in Confluence Server and Data Center versions 7.7 and later. Webhooks allow you to notify an external application or service when certain events occur in Confluence. You can create webhooks using the REST API or through the Confluence UI.
Some of the events you can subscribe to include:
To create a webhook via the API, you make a POST request to /rest/api/webhooks
with the webhook details in JSON format. The webhook configuration includes the name, events to subscribe to, URL to send notifications, whether it's active or not, and an optional secret for verification.
You can query existing webhooks using a GET request to /rest/api/webhooks
.
For Confluence Cloud, webhooks can only be registered through the descriptor file of an add-on, not from the UI. There is an open feature request (CONFCLOUD-36613) to allow webhook administration through the UI for Confluence Cloud.
Here are the key points about API rate limits for the Confluence API:
Confluence uses rate limiting to ensure services remain reliable and responsive for customers [2].
Rate limiting targets only external REST API requests, not internal Confluence traffic [4].
Confluence uses a token bucket algorithm for rate limiting [4]:
For Confluence Cloud, the exact rate limits are not published as they evolve continuously [2].
For Confluence Server/Data Center, administrators can configure custom rate limits [4]:
When rate limited, requests will receive a 429 HTTP status code [1][4].
Apps should implement backoff and retry logic to handle rate limits [2].
Confluence provides context parameters to help minimize necessary API requests [2].
Administrators can add exemptions for specific users or applications [4].
Consumer keys for external applications can be allowlisted to bypass rate limits [4].
Specific URLs/resources can be allowlisted using system properties [4].
Use multi-threading carefully, as high concurrency increases chances of hitting rate limits [2].
Consider factors like request idempotency, contention, timeouts, etc. when implementing retry logic [2].
For migrations, use the Migration-App
header to access migration-specific rate limits [2].
Monitor rate limited requests in Confluence logs for troubleshooting [4].
The exact rate limits are not published for Confluence Cloud, so you'll need to implement proper error handling and backoff logic. For Confluence Server/Data Center, work with administrators to configure appropriate limits and exemptions as needed.
Based on the search results provided, here is the most up-to-date information about the Confluence API versions:
The Confluence API currently has two main versions:
The Confluence Cloud REST API v1 is in the process of being deprecated. However, the exact timeline for full deprecation is not finalized. Key points to consider:
Atlassian is encouraging developers to migrate from v1 to v2 API:
@forge/ui-confluence
library version 13 and higher uses Confluence v2 REST APIs.@forge/ui-confluence
library, update to version 13 or higher and adjust your app's manifest to use the new required permission scopes.While the Confluence Cloud REST API v2 is the most recent version and should be used for new development, the v1 API is still accessible. Atlassian is working on achieving feature parity between v1 and v2 before fully deprecating v1. Developers should plan to migrate to v2, but there is currently no immediate deadline for this migration.
To get a developer account for Confluence and create an API integration, here are the key steps:
If you don't already have one, you'll need to create an Atlassian account at https://id.atlassian.com/signup.
Go to https://developer.atlassian.com/ and log in with your Atlassian account.
On the developer portal, navigate to the Confluence Cloud section to access:
Before starting API development:
For personal use and scripts, you can use:
Use standard HTTP methods (GET, PUT, POST, DELETE) to interact with Confluence resources via the REST API.
Based on the Confluence REST API documentation, here are the main data models you can interact with using the Confluence API, along with key points about what is possible for each:
The Confluence API provides comprehensive access to manage and interact with most aspects of the Confluence data model programmatically.