Confluence
Confluence is Atlassian's team workspace for pages, blog posts, and knowledge bases.
Bruin supports Confluence Cloud as a source for Ingestr assets, and you can use it to ingest spaces, pages, blog posts, comments, and users into your data platform.
Configuration
Step 1: Add a connection to the .bruin.yml file
yaml
connections:
confluence:
- name: "confluence"
domain: "company.atlassian.net"
email: "user@company.com"
api_token: "your_api_token"
body_format: "storage"domain(required): Your Confluence site, such ascompany.atlassian.net. Can be left out only whenbase_urlis set.email(required): The email address of the Atlassian account or service account used to authenticate.api_token(required): An Atlassian API token for that account.body_format(optional): Include the content body of pages, blog posts, and footer comments, asstorage(Confluence's XHTML-based storage format) oratlas_doc_format(Atlassian Document Format JSON). Bodies are left out when not set, since they make up most of the data.cloud_id(optional): Your Atlassian site's cloud ID. Only needed for service accounts, and detected automatically when not set. You can find it athttps://company.atlassian.net/_edge/tenant_info.base_url(optional): Send requests to this URL instead of the site, e.g. a proxy. Cannot be combined withcloud_id.
For a service account, create it in Atlassian Administration under Directory → Service accounts, give it access to Confluence and the spaces you want to load, and create an API token with read scopes for content, spaces, comments, labels, and users.
Step 2: Create an asset file for data ingestion
Create a YAML file (e.g. confluence_ingestion.yml) inside the assets folder:
yaml
name: public.confluence_pages
type: ingestr
parameters:
source_connection: confluence
source_table: 'pages'
destination: postgresname: The name of the asset.type: Set toingestr.source_connection: The name of the Confluence connection defined in.bruin.yml.source_table: One of the tables below.destination: The destination platform/type, for examplepostgres.
Step 3: Run asset to ingest data
bash
bruin run assets/confluence_ingestion.ymlAvailable Source Tables
| Table | Primary Key | Incremental Key | Incremental Strategy | Details |
|---|---|---|---|---|
spaces | id | - | replace | All spaces the account can see, including archived ones |
pages | id | lastModifiedAt | merge | Pages in every status, with their body when body_format is set |
blogposts | id | lastModifiedAt | merge | Blog posts in every status, with their body when body_format is set |
page_versions | page_id, number | createdAt | merge | The version history of each page |
footer_comments | id | lastModifiedAt | merge | Comments at the bottom of pages and blog posts |
labels | id | - | replace | All labels defined on the site |
users | accountId | - | replace | Users of the site, including guests |
Incremental behavior and limitations
- Trashing, archiving, or restoring content doesn't create a new version, so incremental runs don't pick up those status changes. Run without an interval to refresh them; any run with an interval only sees current content.
- Label changes on pages are not tracked by
lastModifiedAt. - The
userstable returns at most 10,000 users, a limit of the Confluence user search API.