Skip to content

Page History

View version history, compare changes, and restore previous versions.

  • Authenticated profile (atlcli auth login)
  • Space permission: View to see history, Edit to restore versions

Confluence tracks every edit as a version. atlcli provides:

  • Version history listing
  • Content comparison (diff)
  • Version restoration

List all versions of a page:

Terminal window
atlcli wiki page history 12345

Output:

VERSION AUTHOR DATE MESSAGE
5 Alice 2025-01-14 10:30 Updated API examples
4 Bob 2025-01-13 15:45 Fixed typos
3 Alice 2025-01-12 09:00 Added authentication section
2 Alice 2025-01-10 14:20 Initial draft
1 Alice 2025-01-10 14:00 Created page

Options:

FlagDescription
--limitNumber of versions to show
--jsonJSON output

Get content at a specific version:

Terminal window
# View version 3
atlcli wiki page get 12345 --version 3
# Save to file
atlcli wiki page get 12345 --version 3 > old-version.md
Terminal window
# Compare version 3 with current
atlcli wiki page diff 12345 --version 3

Output:

--- 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.
Terminal window
atlcli wiki page diff 12345 --from 2 --to 4
FlagDescription
--versionCompare this version with current
--fromStart version for comparison
--toEnd version for comparison
--contextLines of context (default: 3)
--no-colorDisable colored output

Restore a page to a previous version:

Terminal window
atlcli wiki page restore 12345 --version 3

Options:

FlagDescription
--versionVersion number to restore
--messageRestore commit message
--confirmSkip confirmation prompt
Terminal window
atlcli wiki page restore 12345 --version 3 --message "Reverting breaking changes" --confirm
Terminal window
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
}
Terminal window
# Pull a page at a specific version
atlcli wiki docs pull ./docs --page-id 12345 --version 3

atlcli tracks the current version in frontmatter:

---
atlcli:
id: "12345"
title: "API Reference"
version: 5
lastModified: "2025-01-14T10:30:00Z"
---
Terminal window
# See who changed what
atlcli wiki page history 12345 --json | \
jq '.versions[] | "\(.created): \(.author.displayName) - \(.message)"'
Terminal window
# Find when content was removed
atlcli wiki page diff 12345 --from 1 --to 5 | grep "^-"
# Restore if needed
atlcli wiki page restore 12345 --version 3
Terminal window
# See what changed in latest version
atlcli wiki page diff 12345 --version $(atlcli wiki page history 12345 --json | jq '.versions[1].number')
Terminal window
# Export history for all pages in space
for id in $(atlcli wiki page list --space TEAM --json | jq -r '.pages[].id'); do
atlcli wiki page history $id --json > "history-$id.json"
done
  • Pages - Page operations
  • Sync - Version tracking in frontmatter
  • Audit - Analyze contributor history
Jira and Confluence are trademarks of Atlassian Corporation Plc. atlcli is not affiliated with, endorsed by, or sponsored by Atlassian.