Skip to content

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 as company.atlassian.net. Can be left out only when base_url is 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, as storage (Confluence's XHTML-based storage format) or atlas_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 at https://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 with cloud_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: postgres
  • name: The name of the asset.
  • type: Set to ingestr.
  • 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 example postgres.

Step 3: Run asset to ingest data ​

bash
bruin run assets/confluence_ingestion.yml

Available Source Tables ​

TablePrimary KeyIncremental KeyIncremental StrategyDetails
spacesid-replaceAll spaces the account can see, including archived ones
pagesidlastModifiedAtmergePages in every status, with their body when body_format is set
blogpostsidlastModifiedAtmergeBlog posts in every status, with their body when body_format is set
page_versionspage_id, numbercreatedAtmergeThe version history of each page
footer_commentsidlastModifiedAtmergeComments at the bottom of pages and blog posts
labelsid-replaceAll labels defined on the site
usersaccountId-replaceUsers 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 users table returns at most 10,000 users, a limit of the Confluence user search API.