Confluence
Confluence
By the end of this guide, you will have your Confluence space indexed into a semantic collection and verified with a test search.
Prerequisites
- Indexed installed and workspace initialized (
indexed config init; see Quick Start) - A Confluence Cloud or Server/Data Center instance
- An API token (Cloud) or personal access token (Server/DC)
Create a Confluence API Token
Cloud vs. Server/Data Center auth
Confluence Cloud uses an Atlassian API token and the email for the account that owns the token. Set ATLASSIAN_EMAIL and ATLASSIAN_TOKEN, or pass --email and --token for that run.
Confluence Server/Data Center can use a bearer or personal access token (CONF_TOKEN), or username and password (CONF_LOGIN and CONF_PASSWORD). No Atlassian email is used.
- Go to https://id.atlassian.com/manage-profile/security/api-tokens
- Click Create API token
- Give it a label (e.g., "Indexed CLI")
- Copy the token
Set both variables in your shell or .env file:
export ATLASSIAN_EMAIL=your-email@company.com
export ATLASSIAN_TOKEN=your_api_token_hereToken (typical): create a Personal Access Token under your Confluence profile, then:
export CONF_TOKEN=your_personal_access_tokenUsername and password (when your site uses basic auth instead):
export CONF_LOGIN=your_username
export CONF_PASSWORD=your_passwordKeep tokens out of version control
See Connector credentials — never commit API tokens; use a .env file and .gitignore.
Index Your Wiki
Use a CQL query to select which pages to index. For Confluence Cloud, your URL must include the /wiki suffix:
indexed index create confluence \
-c team-wiki \
-u https://company.atlassian.net/wiki \
-q "space = ENG AND type = page"Cloud URL must include /wiki
For Confluence Cloud instances, the URL must end with /wiki — for example https://company.atlassian.net/wiki. Without it, the connector cannot reach the REST API and will return an authentication or connection error.
Indexing collection 'team-wiki'...
Fetched 87 pages from Confluence
Parsed 87 documents
Created 241 chunks
Generated embeddings
✓ Collection 'team-wiki' created (241 chunks, 9.8 MB)Verify and run a quick test search:
indexed index inspect team-wiki
indexed index search "database migration process" -c team-wikiResults for 'database migration process' (top 5):
1. [team-wiki] Database Schema Changes Guide
Score: 0.88
...Before running any migration, ensure you have a backup of
the production database. Use the migration tool in the
infra/ directory to generate the migration script...
2. [team-wiki] Incident Response Runbook
Score: 0.71
...If a migration fails in production, follow the rollback
procedure documented in the DBA handbook...Common CQL Patterns
| Goal | CQL |
|---|---|
| All pages in a space | space = ENG AND type = page |
| Recently updated | space = ENG AND lastModified >= "YYYY-MM-DD" — set the date in Confluence’s advanced search (or your policy), then paste the CQL here; avoid stale “example” dates in shared docs |
| Specific label | space = ENG AND label = "architecture" |
| By title keyword | space = ENG AND title ~ "runbook" |
| Multiple spaces | space in (ENG, OPS, PLATFORM) AND type = page |
| Exclude archived | space = ENG AND type = page AND label != "archived" |
Start narrow — one space, one label — and widen from there.
Configure comment indexing
By default, Indexed includes nested replies (--read-all-comments is the default; see indexed index create confluence). Use --first-level-comments for large spaces where thread depth adds noise rather than signal:
indexed index create confluence \
-c team-wiki \
-u https://company.atlassian.net/wiki \
-q "space = ENG AND type = page" \
--first-level-commentsUse --read-all-comments (default) when threaded discussion context matters — for example, when decisions and corrections often appear in nested replies rather than in the page body.
Keep the Index Fresh
Pull only new or modified pages since the last sync:
indexed index update team-wikiTo automate it:
# Update the team-wiki collection every 6 hours
0 */6 * * * /path/to/indexed index update team-wikiTroubleshooting
Authentication errors for Cloud — set both ATLASSIAN_EMAIL and ATLASSIAN_TOKEN. The email must match the Atlassian account that created the token.
Authentication errors for Server/DC — confirm CONF_TOKEN, or CONF_LOGIN and CONF_PASSWORD, match what your instance expects.
Empty results — test your CQL in Confluence's advanced search first to confirm it returns pages. For Cloud, verify the URL ends with /wiki. Also verify the API token has read access to the target space.
Rate limiting — for large spaces (500+ pages), Indexed handles rate limiting automatically with exponential backoff. If indexing is slow, narrow your CQL query to a single space or label.
What's Next
Configuration guide
config init, and workspace layout.Index Jira
Searching your Index
Collection Lifecycle
Index create commands
indexed index create; env vars in Config reference.