Connect Confluence to Retool
You can connect to Confluence using Retool's REST API integration and make it available as a resource. Once complete, you can write queries to interact with the Confluence API.
Requirements
All users for Retool organizations on Free or Team plans have global Edit permissions and can add, edit, and remove resources. If your organization manages user permissions for resources, you must be a member of a group with Edit all permissions.
To create your Confluence resource, you need:
Confluence uses Basic authentication. You must provide a username and API token for Retool to authorize requests. Refer to the Confluence documentation on authenticating requests to learn how to obtain the username and API token.
If Confluence is behind a firewall, you must also allow access from Retool's IP addresses. Add these IP addresses to your firewall's allowlist before you create the resource.
1. Create a new resource
Sign in to your Retool organization and navigate to the Resources tab. Click Create new, then select Resource.
Retool can connect to almost any API or database, and has built-in integrations for popular data sources. Select the REST API integration.
2. Configure the resource
Provide the necessary details to configure the resource so Retool can connect to Confluence. Not all settings are required but refer to the Confluence documentation to learn what is needed.
General
These settings configure the name and location of the resource within Retool.
Name
The name to use for the resource (e.g., Confluence).
Folder
The folder in which to save the resource.
Description
A brief description of the resource (e.g., Confluence data).
Credentials
These settings configure how Retool connects to Confluence.
Base URL
The base URL for the Confluence API on your instance. This must be an absolute URL. Use https://your-domain.atlassian.net/wiki/rest/api
.
URL parameters
Key-value pairs to include as URL parameters with Confluence API requests. No additional URL parameters are required.
Headers
Key-value pairs to include as headers with Confluence API requests. No additional header values are required.
Body
Key-value pairs to include in the body of Confluence API requests. No additional body values are required.
Cookies
Cookies to include with Confluence API requests. No cookies are required.
Authentication
The method of authentication to use with Confluence. Select Basic Auth
.
Setting | Description |
---|---|
Username | The username for authentication. |
Password | The API token for authentication. |
Forward all cookies
Whether to forward all cookies. This is useful if you have dynamic cookie names.
3. Save the resource
Click Create resource to complete the setup. You can then click either Create an app to immediately start building a Retool app or Back to resources to return to the list of resources.
Wrap up
Your Confluence resource is now ready to use. You write queries to make API requests by specifying the request method and endpoint, additional parameters to include, and the request body.
To verify you can successfully interact with Confluence, write a test query to retrieve some data. The following example returns wiki content for a single page.
- Request
- Response
GET https://your-domain.atlassian.net/wiki/rest/api/content?limit=1
{
"results": [
{
"id": "393219",
"type": "page",
"status": "current",
"title": "First space",
"extensions": {
"position": 0
},
"_links": {
"webui": "/display/FS/First+space",
"edit": "/pages/resumedraft.action?draftId=393219",
"tinyui": "/x/AwAG",
"self": "https://your-domain.atlassian.net/confluence/rest/api/content/393219"
},
"_expandable": {
"container": "/rest/api/space/FS",
"metadata": "",
"operations": "",
"children": "/rest/api/content/393219/child",
"restrictions": "/rest/api/content/393219/restriction/byOperation",
"history": "/rest/api/content/393219/history",
"ancestors": "",
"body": "",
"version": "",
"descendants": "/rest/api/content/393219/descendant",
"space": "/rest/api/space/FS"
}
},
{
"id": "393229",
"type": "page",
"status": "current",
"title": "Page 1",
"extensions": {
"position": 0
},
"_links": {
"webui": "/display/FS/Page+1",
"edit": "/pages/resumedraft.action?draftId=393229&draftShareId=f16d9e64-9373-4719-9df5-aec8102e5252",
"tinyui": "/x/DQAG",
"self": "http://localhost:8080/confluence/rest/api/content/393229"
},
"_expandable": {
"container": "/rest/api/space/FS",
"metadata": "",
"operations": "",
"children": "/rest/api/content/393229/child",
"restrictions": "/rest/api/content/393229/restriction/byOperation",
"history": "/rest/api/content/393229/history",
"ancestors": "",
"body": "",
"version": "",
"descendants": "/rest/api/content/393229/descendant",
"space": "/rest/api/space/FS"
}
}
],
"start": 0,
"limit": 2,
"size": 2,
"_links": {
"self": "https://your-domain.atlassian.net/confluence/rest/api/content",
"next": "/rest/api/content?limit=2&start=2",
"base": "https://your-domain.atlassian.net/confluence",
"context": "/confluence"
}
}