Page History
Page History
Section titled “Page History”View version history, compare changes, and restore previous versions.
Prerequisites
Section titled “Prerequisites”- Authenticated profile (
atlcli auth login) - Space permission: View to see history, Edit to restore versions
Overview
Section titled “Overview”Confluence tracks every edit as a version. atlcli provides:
- Version history listing
- Content comparison (diff)
- Version restoration
View History
Section titled “View History”List all versions of a page:
atlcli wiki page history 12345Output:
VERSION AUTHOR DATE MESSAGE5 Alice 2025-01-14 10:30 Updated API examples4 Bob 2025-01-13 15:45 Fixed typos3 Alice 2025-01-12 09:00 Added authentication section2 Alice 2025-01-10 14:20 Initial draft1 Alice 2025-01-10 14:00 Created pageOptions:
| Flag | Description |
|---|---|
--limit | Number of versions to show |
--json | JSON output |
View Specific Version
Section titled “View Specific Version”Get content at a specific version:
# View version 3atlcli wiki page get 12345 --version 3
# Save to fileatlcli wiki page get 12345 --version 3 > old-version.mdCompare Versions (Diff)
Section titled “Compare Versions (Diff)”Compare with Current
Section titled “Compare with Current”# Compare version 3 with currentatlcli wiki page diff 12345 --version 3Output:
--- Version 3 (2025-01-12)+++ Current (Version 5)@@ -10,6 +10,10 @@ ## Authentication
Use API tokens for authentication.++### Token Scopes++Tokens can have limited scopes for security.Compare Two Versions
Section titled “Compare Two Versions”atlcli wiki page diff 12345 --from 2 --to 4Diff Options
Section titled “Diff Options”| Flag | Description |
|---|---|
--version | Compare this version with current |
--from | Start version for comparison |
--to | End version for comparison |
--context | Lines of context (default: 3) |
--no-color | Disable colored output |
Restore Version
Section titled “Restore Version”Restore a page to a previous version:
atlcli wiki page restore 12345 --version 3Options:
| Flag | Description |
|---|---|
--version | Version number to restore |
--message | Restore commit message |
--confirm | Skip confirmation prompt |
Restore with Message
Section titled “Restore with Message”atlcli wiki page restore 12345 --version 3 --message "Reverting breaking changes" --confirmJSON Output
Section titled “JSON Output”atlcli wiki page history 12345 --json{ "schemaVersion": "1", "pageId": "12345", "title": "API Reference", "versions": [ { "number": 5, "author": { "displayName": "Alice", "email": "alice@company.com" }, "created": "2025-01-14T10:30:00Z", "message": "Updated API examples", "minorEdit": false }, { "number": 4, "author": { "displayName": "Bob", "email": "bob@company.com" }, "created": "2025-01-13T15:45:00Z", "message": "Fixed typos", "minorEdit": true } ], "total": 5}Sync Integration
Section titled “Sync Integration”Pull Specific Version
Section titled “Pull Specific Version”# Pull a page at a specific versionatlcli wiki docs pull ./docs --page-id 12345 --version 3Version in Frontmatter
Section titled “Version in Frontmatter”atlcli tracks the current version in frontmatter:
---atlcli: id: "12345" title: "API Reference" version: 5 lastModified: "2025-01-14T10:30:00Z"---Use Cases
Section titled “Use Cases”Audit Trail
Section titled “Audit Trail”# See who changed whatatlcli wiki page history 12345 --json | \ jq '.versions[] | "\(.created): \(.author.displayName) - \(.message)"'Recover Deleted Content
Section titled “Recover Deleted Content”# Find when content was removedatlcli wiki page diff 12345 --from 1 --to 5 | grep "^-"
# Restore if neededatlcli wiki page restore 12345 --version 3Review Changes Before Merge
Section titled “Review Changes Before Merge”# See what changed in latest versionatlcli wiki page diff 12345 --version $(atlcli wiki page history 12345 --json | jq '.versions[1].number')Batch History Export
Section titled “Batch History Export”# Export history for all pages in spacefor id in $(atlcli wiki page list --space TEAM --json | jq -r '.pages[].id'); do atlcli wiki page history $id --json > "history-$id.json"doneRelated Topics
Section titled “Related Topics”
Jira and Confluence are trademarks of Atlassian Corporation Plc.
atlcli is not affiliated with, endorsed by, or sponsored by Atlassian.