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 --json
# Save output to a file
acs2md space pages by-key DOCS --output pages.json --json
# Combine filters
acs2md space pages by-id 123456 --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 --json. |
--output | -o | (stdout) | Output file path |
--json | false | Output machine-readable JSON instead of a table |
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)
[
{
"id": "123456",
"title": "Getting Started",
"status": "current",
"spaceId": "654321",
"parentId": "100000",
"createdAt": "2022-06-01T09:00:00.000Z",
"modifiedAt": "2024-03-10T14:22:00.000Z"
},
...
]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 --json \
| jq -r '.[] | 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 --json when machines need to process the result.
Last updated on