List Pages
acs2md space pages by-id SPACE_ID [flags]Lists all pages within a Confluence space. Use by-id when you already have the numeric space ID, or by-key when you want acs2md to resolve the Confluence space key for you first.
This is the key pre-flight command for verifying scope before you start a bulk conversion, continuity sync, or governance review.
Subcommands
acs2md space pages by-id SPACE_ID [flags]acs2md space pages by-key SPACE_KEY [flags]
by-key resolves the space key to its numeric ID, then lists pages.
Examples
# List all pages in a space by numeric ID
acs2md space pages by-id 123456
# List all pages in a space by key
acs2md space pages by-key DOCS
# Filter to only currently published pages
acs2md space pages by-id 123456 --status current
# Sort by most recently modified
acs2md space pages by-key DOCS --sort -modified-date
# Show the page tree as an indented hierarchy
acs2md space pages by-id 123456 --tree
# JSON output — good for piping to jq or scripts
acs2md space pages by-id 123456 --format json
# Save output to a file
acs2md space pages by-key DOCS --output pages.json --format json
# Combine filters
acs2md space pages by-id 216373 --status current --sort -modified-date --limit 50Flags for both subcommands
| Flag | Short | Default | Description |
|---|---|---|---|
--limit | -l | 0 | Total pages to return (0 = all, auto-paginates) |
--status | -s | current | Filter by page status: all, current, archived, trashed, deleted, draft |
--sort | -S | (none) | Sort order: id, -id, created-date, -created-date, modified-date, -modified-date, title, -title |
--tree | -t | false | Display pages as an indented hierarchy tree. Ignores --limit and cannot be combined with --format json. |
--format | -f | table | Output format: table, json, yaml, csv, tsv |
--output | -o | (stdout) | Output file path |
Sample output (table)
ID TITLE STATUS MODIFIED
────────────────────────────────────────────────────────────────────
123456 Getting Started current 2024-03-10
789012 API Reference current 2024-03-08
345678 Release Notes current 2024-02-28
901234 Migration Guide archived 2023-11-15Sample output (JSON)
{
"_links": {
"self": "",
"next": ""
},
"results": [
{
"createdAt": "2024-01-15T09:00:00.000Z",
"body": {
"storage": null,
"atlas_doc_format": null,
"view": null
},
"id": "100101",
"status": "current",
"title": "Team Documentation",
"spaceId": "100001",
"parentId": "",
"parentType": "",
"authorId": "<redacted>",
"ownerId": "<redacted>",
"lastOwnerId": "",
"subtype": "",
"version": {
"createdAt": "2024-01-15T09:00:00.000Z",
"message": "",
"authorId": "<redacted>",
"number": 3,
"minorEdit": false
},
"position": 0
}
],
"meta": {
"cursor": "",
"hasMore": false
}
}space pages uses --format json in v1.0.0. The legacy --json flag is no longer accepted.
Sample output (tree)
Space TEAMDOCS (Team Documentation) — 6 pages
Team Documentation (100101)
├── Architecture decisions (100111)
├── Change log (100112)
├── Meeting notes (100113)
├── Product requirements (100114)
└── Retrospectives (100115)That sample is based on a real --tree run against a small live space, with page titles and IDs redacted.
Use with page commands
Combine acs2md space pages with acs2md page ... or acp2md when you want targeted follow-up work after listing a space:
# Get IDs of all current pages in a space, then retrieve each page in native format
acs2md space pages by-id 123456 --format json \
| jq -r '.results[] | select(.status == "current") | .id' \
| while read id; do
acs2md page get by-id "$id" -f atlas_doc_format > "pages/$id.json"
doneUse --tree when humans need to validate scope. Use --format json when machines need to process the result.