Confluence
Port's Confluence integration syncs Confluence Cloud spaces, pages, and users into your context lake.
Live events are off for this integration. Spaces, pages, and users update on the scheduled resync interval, or when you resync from the connectors page.
Prerequisites
The integration reads Confluence Cloud with basic authentication: an Atlassian account email and an API token. Confluence Data Center and Server are not supported.
- A Confluence Cloud site, for example
https://example.atlassian.net. - An Atlassian account that can view the spaces, pages, and users you want in Port.
- An API token for that account.
- Your Port user role is set to
Admin.
Setup
Choose your preferred installation method below. Not sure which to pick? See the installation methods overview.
The prerequisites required for installation are listed below.
-
Go to the Confluence Connectors page in Port.
-
Under
Select your installation method, chooseHosted by Port. -
Configure the
Installation parametersandAdvanced configurationas you wish (see below for details).
Installation parameters
Each integration requires specific parameters (such as an API token, a URL, etc.), as seen in Port's UI when installing it. Hover over the ⓘ icon next to each parameter to see more details about it.
Advanced configuration
- During the installation process each integration may have additional settings under the
Advanced configurationsection in Port's UI. Additionally, each integration has one or more settings that can be configured after installation. To do so, click on the integration's name in the Connectors page and navigate to theSettingtab. Hover over the ⓘ icon next to each setting to see more details about it.
Port secrets
Some integration settings require sensitive pieces of data, such as tokens. For these settings, Port secrets will be used, ensuring that your sensitive data is encrypted and secure.
When filling in such a setting, its value will be obscured (shown as ••••••••).
For each such setting, Port will automatically create a secret in your organization.
To see all secrets in your organization, follow these steps.
Port source IP addresses
When using this installation method, Port will make outbound calls to your 3rd-party applications from static IP addresses. You may need to add these addresses to your allowlist, in order to allow Port to interact with the integrated service:
- Europe (EU):
54.73.167.226,63.33.143.237,54.76.185.219 - United States (US):
3.234.37.33,54.225.172.136,3.225.234.99
-
Go to the Confluence Connectors page in the Port app.
-
Select the
Self-hostedmethod. -
A
helmcommand will be displayed, with default values already filled out (e.g. your Port client ID, client secret, etc). Copy the command, replace the placeholders with your values, then run it in your terminal to install the integration.
Required parameters:
port.clientId- Your Port client ID (how to get the credentials).port.clientSecret- Your Port client secret (how to get the credentials).port.baseUrl- Your Port API URL (https://api.port.iofor EU,https://api.us.port.iofor US).integration.identifier- A unique identifier for your integration.integration.type- The integration type.integration.eventListener.type- The event listener type. Read more about event listeners.integration.config.confluenceHostUrl- Your Confluence Cloud site URL. For example,https://example.atlassian.net.integration.secrets.confluenceUserEmail- Email of the Atlassian account used to read Confluence. The account must be able to view the spaces, pages, and users you want in Port.integration.secrets.confluenceApiToken- API token for that Atlassian account. Create an API token.
Optional parameters (click to expand)
scheduledResyncInterval- The number of minutes between each resync. When not set, the integration resyncs for each event listener resync event. Read more about scheduledResyncInterval.initializePortResources- Whentrue, the integration creates the default blueprints and the Port app config mapping. Default istrue.sendRawDataExamples- Whentrue, sends raw data examples from the Confluence API to Port for testing and managing the integration mapping. Default istrue.
- GitHub
- Jenkins
- Azure DevOps
- GitLab
- Go to the Confluence Connectors page in the Port app.
- Under Select your installation method, choose your desired CI/CD platform.
- Copy the workflow and replace the placeholders with your values.
Below are the available parameters and their descriptions.
| Parameter | Description | Required? | Secret?Store this value as a GitHub Actions secret |
|---|---|---|---|
port_client_id | Your Port client ID (How to get the credentials). | ✓ | ✓ |
port_client_secret | Your Port client secret (How to get the credentials). | ✓ | ✓ |
port_base_url | Your Port API URL (https://api.port.io for EU, https://api.us.port.io for US). | ✓ | ✗ |
confluence_host_url | Confluence Cloud site URL, for example https://example.atlassian.net. | ✓ | ✗ |
confluence_user_email | Email of the Atlassian account used to read Confluence. The account must be able to view the spaces, pages, and users you want in Port. | ✓ | ✓ |
confluence_api_token | API token for that Atlassian account. Create one at id.atlassian.com. | ✓ | ✓ |
initialize_port_resources | Default true. When set to true, the integration will create default blueprints and the Port app config mapping. | ✗ | ✗ |
integration_identifier | The identifier of the integration that will be installed. | ✗ | ✗ |
send_raw_data_examples | Enable sending raw data examples from the third-party API to Port for testing and managing the integration mapping. Default is true. | ✗ | ✗ |
Your Jenkins agent must be able to run Docker commands.
Below are the available parameters and their descriptions.
| Parameter | Description | Required? | Secret?Store this value as a Jenkins credential (Secret Text) |
|---|---|---|---|
OCEAN__ | Your Port client ID (How to get the credentials). | ✓ | ✓ |
OCEAN__ | Your Port client secret (How to get the credentials). | ✓ | ✓ |
OCEAN__ | Your Port API URL (https://api.port.io for EU, https://api.us.port.io for US). | ✓ | ✗ |
OCEAN__ | Confluence Cloud site URL, for example https://example.atlassian.net. | ✓ | ✗ |
OCEAN__ | Email of the Atlassian account used to read Confluence. The account must be able to view the spaces, pages, and users you want in Port. | ✓ | ✓ |
OCEAN__ | API token for that Atlassian account. Create one at id.atlassian.com. | ✓ | ✓ |
OCEAN__ | Default true. When set to true, the integration will create default blueprints and the Port app config mapping. | ✗ | ✗ |
OCEAN__ | The identifier of the integration that will be installed. | ✗ | ✗ |
OCEAN__ | Enable sending raw data examples from the third-party API to Port for testing and managing the integration mapping. Default is true. | ✗ | ✗ |
Here is an example for a Jenkinsfile pipeline file:Jenkins pipeline (click to expand)
Prerequisites
- Your Azure Devops agent should be able to run docker commands. Learn more about agents here.
- You must have permissions to create and manage Azure DevOps variable groups for storing credentials.
Set up your credentials
- Create a Variable Group: Name it port-ocean-credentials.
- Store the required variables (see the table below).
- Authorize Your Pipeline:
-
Go to "Library" -> "Variable groups."
-
Find port-ocean-credentials and click on it.
-
Select "Pipeline Permissions" and add your pipeline to the authorized list.
-
Below are the available parameters and their descriptions.
| Parameter | Description | Required? | Secret?Store this value as an Azure DevOps pipeline variable |
|---|---|---|---|
OCEAN__ | Your Port client ID (How to get the credentials). | ✓ | ✓ |
OCEAN__ | Your Port client secret (How to get the credentials). | ✓ | ✓ |
OCEAN__ | Your Port API URL (https://api.port.io for EU, https://api.us.port.io for US). | ✓ | ✗ |
OCEAN__ | Confluence Cloud site URL, for example https://example.atlassian.net. | ✓ | ✗ |
OCEAN__ | Email of the Atlassian account used to read Confluence. The account must be able to view the spaces, pages, and users you want in Port. | ✓ | ✓ |
OCEAN__ | API token for that Atlassian account. Create one at id.atlassian.com. | ✓ | ✓ |
OCEAN__ | Default true. When set to true, the integration will create default blueprints and the Port app config mapping. | ✗ | ✗ |
OCEAN__ | The identifier of the integration that will be installed. | ✗ | ✗ |
OCEAN__ | Enable sending raw data examples from the third-party API to Port for testing and managing the integration mapping. Default is true. | ✗ | ✗ |
Here is an example for a azure-pipeline.yml pipeline file:Azure pipeline (click to expand)
- Go to the Confluence Connectors page in the Port app.
- Under Select your installation method, choose your desired CI/CD platform.
- Copy the workflow and replace the placeholders with your values.
Below are the available parameters and their descriptions.
| Parameter | Description | Required? | Secret?Store this value as a GitLab CI/CD variable |
|---|---|---|---|
OCEAN__ | Your Port client ID (How to get the credentials). | ✓ | ✓ |
OCEAN__ | Your Port client secret (How to get the credentials). | ✓ | ✓ |
OCEAN__ | Your Port API URL (https://api.port.io for EU, https://api.us.port.io for US). | ✓ | ✗ |
OCEAN__ | Confluence Cloud site URL, for example https://example.atlassian.net. | ✓ | ✗ |
OCEAN__ | Email of the Atlassian account used to read Confluence. The account must be able to view the spaces, pages, and users you want in Port. | ✓ | ✓ |
OCEAN__ | API token for that Atlassian account. Create one at id.atlassian.com. | ✓ | ✓ |
OCEAN__ | Default true. When set to true, the integration will create default blueprints and the Port app config mapping. | ✗ | ✗ |
OCEAN__ | The identifier of the integration that will be installed. | ✗ | ✗ |
OCEAN__ | Enable sending raw data examples from the third-party API to Port for testing and managing the integration mapping. Default is true. | ✗ | ✗ |
Configuration
Port integrations use a YAML mapping block to ingest data from the third-party API into Port.
The mapping makes use of the JQ JSON processor to select, modify, concatenate, transform and perform other operations on existing fields and values from the integration API.
Spaces and pages come from the Confluence Cloud REST API v2. Users come from GET /wiki/rest/api/search/user?cql=type=user. Page bodies use body-format=markdown when includeBody is on.
Default mapping configuration
This is the default mapping configuration for this integration:
Default mapping configuration (click to expand)
deleteDependentEntities: true
createMissingRelatedEntities: true
resources:
- kind: space
selector:
query: 'true'
port:
entity:
mappings:
identifier: .id
title: .name
blueprint: '"confluenceSpace"'
properties:
key: .key
type: .type
status: .status
description: .description.plain.value // ""
createdAt: .createdAt
homepageId: .homepageId
authorId: .authorId
spaceOwnerId: .spaceOwnerId
url: .__webUrl
relations:
author: .authorId
owner: .spaceOwnerId
- kind: page
selector:
query: 'true'
includeArchived: false
includeBody: true
port:
entity:
mappings:
identifier: .id
title: .title
blueprint: '"confluencePage"'
properties:
status: .status
subtype: .subtype
createdAt: .createdAt
updatedAt: .version.createdAt
version: .version.number
parentType: .parentType
position: .position
content: .body.markdown.value // ""
folderPath: .__folderPath
filePath: .__filePath
url: .__webUrl
relations:
space: .spaceId
parent: if .parentType == "page" and .parentId != null then .parentId else null end
author: .authorId
owner: .ownerId
- kind: user
selector:
query: 'true'
port:
entity:
mappings:
identifier: .accountId
title: .displayName // .publicName // .accountId
blueprint: '"confluenceUser"'
properties:
email: .email
accountType: .accountType
publicName: .publicName
timeZone: .timeZone
isExternalCollaborator: .isExternalCollaborator
isGuest: .isGuest
url: .__webUrl
Page paths
Confluence pages API returns a parent id and a parent type. It does not return the folder tree. The integration walks each page's ancestors and stores the result in folderPath and filePath, so a folder view can render the same hierarchy. folderPath is built from the ancestor titles. filePath is that path plus the page title.
The walk loads parent pages first. When the parent is a folder, whiteboard, or database, the integration loads that item by id and uses its title. Confluence has no get-by-id endpoint for embeds, so an embed parent stays in the path as its id.
The parent relation is set only when parentType is page.
The integration also adds these fields to the raw record, prefixed with __:
__webUrl- The space, page, or user URL in Confluence. The default mapping copies it tourl.__folderPath- The ancestor path for a page. The default mapping copies it tofolderPath.__filePath- The ancestor path plus the page title. The default mapping copies it tofilePath.
Deleted and trashed pages are never synced. Archived pages are off unless you set includeArchived to true. Fetching the page body limits each request to 25 pages. Turn includeBody off to sync titles only.
Mapping and selectors per resource
{
"identifier": "confluenceSpace",
"title": "Confluence Space",
"icon": "Confluence",
"schema": {
"properties": {
"key": {
"type": "string",
"title": "Key"
},
"type": {
"type": "string",
"title": "Type",
"enum": [
"global",
"collaboration",
"knowledge_base",
"personal",
"system",
"onboarding",
"xflow_sample_space"
]
},
"status": {
"type": "string",
"title": "Status",
"enum": ["current", "archived", "trashed"],
"enumColors": {
"current": "green",
"archived": "yellow",
"trashed": "red"
}
},
"description": {
"type": "string",
"title": "Description",
"format": "markdown"
},
"createdAt": {
"type": "string",
"title": "Created At",
"format": "date-time"
},
"homepageId": {
"type": "string",
"title": "Homepage ID"
},
"authorId": {
"type": "string",
"title": "Author Account ID"
},
"spaceOwnerId": {
"type": "string",
"title": "Owner Account ID"
},
"url": {
"type": "string",
"title": "URL",
"format": "url"
}
},
"required": []
},
"relations": {
"author": {
"title": "Author",
"target": "confluenceUser",
"required": false,
"many": false
},
"owner": {
"title": "Owner",
"target": "confluenceUser",
"required": false,
"many": false
}
}
}
- kind: space
selector:
query: 'true'
port:
entity:
mappings:
identifier: .id
title: .name
blueprint: '"confluenceSpace"'
properties:
key: .key
type: .type
status: .status
description: .description.plain.value // ""
createdAt: .createdAt
homepageId: .homepageId
authorId: .authorId
spaceOwnerId: .spaceOwnerId
url: .__webUrl
relations:
author: .authorId
owner: .spaceOwnerId
Below are the supported selectors for this resource. Use them under the selector key in your integration mapping configuration to control which resources are returned from the API.
| Selector | Type | Description |
|---|---|---|
type | string | Only sync spaces of this type. Leave empty to sync every type. Valid values: global, collaboration, knowledge_base, personal, system, onboarding, xflow_sample_space. |
status | string | Only sync spaces with this status. Leave empty to sync every status. Valid values: current, archived, trashed. |
labels | array | Only sync spaces that have these labels. Sent to Confluence as a comma-separated list. Default: []. |
Monitoring and sync status
To learn more about how to monitor and check the sync status of your integration, see the relevant documentation.
To view and test the integration's mapping against live API responses, use the jq playground in your connectors page.