Skip to content

Make Confluence REST API path configurable - #2

Merged
hkwi merged 1 commit into
mainfrom
feat/configurable-api-path
Aug 21, 2026
Merged

hkwi merged 1 commit into
mainfrom
feat/configurable-api-path

Conversation

@hkwi

@hkwi hkwi commented Aug 17, 2026

Copy link
Copy Markdown
Owner

Context

Confluence Server installations can expose content resources below different REST API roots or require an explicit API version. This follows the URL compatibility issue described in atlassian-api/atlassian-python-api#1654.

Summary

  • keep the current unversioned /rest/api/content/... path as the default
  • allow the API root and version to be configured independently through environment variables or Git remote configuration
  • apply the configured path to page reads, child traversal, space imports, attachment listings, and page updates
  • keep attachment download and browser links site-relative instead of prefixing them with the REST API path
  • document clone-time and configured-remote examples

For example, apiRoot=custom/api/root and apiVersion=2.0 produce /custom/api/root/2.0/content/....

Configuration

  • CONFLUENCE_API_ROOT / GIT_REMOTE_CONFLUENCE_API_ROOT
  • CONFLUENCE_API_VERSION / GIT_REMOTE_CONFLUENCE_API_VERSION
  • remote.<name>.apiRoot / remote.<name>.apiVersion
  • global fallback keys under confluence.* and remote.confluence.*

Testing

  • go test ./...
  • go vet ./...
  • git diff --check

Tests cover defaults, environment variables, real Git remote configuration, custom content URLs, and site-relative attachment downloads.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant