@@ -186,32 +186,105 @@ flashduty field list [flags] # List custom field definitions
186186
187187Supports ` --name ` .
188188
189- ### ` statuspage ` - Status Page Management (5 command groups)
189+ ### ` status-page ` - Status Page Management (28 commands)
190+
191+ The group is ` status-page ` (hyphenated), not ` statuspage ` . Nested object/array
192+ fields carry no typed flag and must be supplied as JSON through ` --data ` ;
193+ ` --data - ` reads the entire request body from stdin. Positional arguments and
194+ explicitly-set typed flags override the matching keys inside ` --data ` .
195+
196+ ** Pages, components, sections**
197+
198+ ``` bash
199+ flashduty status-page list # List status pages (JSON: {"items":[...]})
200+ flashduty status-page info < page-id> # Page detail, incl. component and section IDs
201+ flashduty status-page create --name < name> --url-name < slug> --type < public| internal> \
202+ --date-view < calendar| list> --display-uptime-mode < chart_and_percentage| chart| none>
203+ flashduty status-page update < page-id> [--name < name> ] [--url-name < slug> ] ... # Update a page
204+ flashduty status-page delete < page-id> # Delete a page
205+ flashduty status-page component-upsert < page-id> --data ' {"components":[{"name":"API","section_id":"<section-id>"}]}'
206+ flashduty status-page component-delete < component-id> [< id2> ...] --page-id < page-id>
207+ flashduty status-page section-upsert < page-id> --data ' {"sections":[{"name":"Core"}]}'
208+ flashduty status-page section-delete < section-id> [< id2> ...] --page-id < page-id>
209+ ```
210+
211+ ** Events (incident / maintenance) and their timeline**
212+
213+ ``` bash
214+ flashduty status-page change-active-list < page-id> --type < incident| maintenance> # Only in-progress events
215+ flashduty status-page change-list < page-id> --type < incident| maintenance> --status < status>
216+ flashduty status-page change-info --page-id < page-id> --change-id < change-id>
217+ flashduty status-page change-create < page-id> --type < incident| maintenance> --title < title> \
218+ --status < status> --description < text> --data ' {"updates":[...]}'
219+ flashduty status-page change-update --page-id < page-id> --change-id < change-id> [--title < title> ]
220+ flashduty status-page change-delete --page-id < page-id> --change-id < change-id>
221+ flashduty status-page change-timeline-create --page-id < page-id> --change-id < change-id> \
222+ --status < status> --description < text> [--data ' {"component_changes":[...]}' ]
223+ flashduty status-page change-timeline-update --page-id < page-id> --change-id < change-id> --update-id < update-id> [--description < text> ]
224+ flashduty status-page change-timeline-delete --page-id < page-id> --change-id < change-id> --update-id < update-id>
225+ ```
226+
227+ ` change-create ` takes ` <page-id> ` as a ** required positional argument** , and its
228+ required ` updates ` array (with the nested ` component_changes ` ) has no flag — so a
229+ real ` change-create ` call always carries a ` --data ` payload:
230+
231+ ``` bash
232+ flashduty status-page change-create 5750613685214 --type incident \
233+ --title " API latency elevated" --status investigating \
234+ --description " Investigating elevated latency." \
235+ --data ' {"updates":[{"status":"investigating","description":"Team is investigating.","component_changes":[{"component_id":"01KC3GAZ6ZJE40H55GM31RPWZE","status":"degraded"}]}]}'
236+ ```
237+
238+ The whole body can also come from stdin with ` --data - ` :
239+
240+ ``` bash
241+ cat change.json | flashduty status-page change-create 5750613685214 --data -
242+ ```
243+
244+ Resolving an incident goes through ` change-timeline-create ` ; every component the
245+ event touched must be moved back to ` operational ` :
246+
247+ ``` bash
248+ flashduty status-page change-timeline-create --page-id 5750613685214 --change-id 5821693893131 \
249+ --status resolved --description " Recovered." \
250+ --data ' {"component_changes":[{"component_id":"01KC3GAZ6ZJE40H55GM31RPWZE","status":"operational"}]}'
251+ ```
252+
253+ ** Subscribers and templates**
254+
255+ ``` bash
256+ flashduty status-page subscriber-list < page-id> [--component-ids < ids> ] [--page < n> ] [--limit < n> ]
257+ flashduty status-page subscriber-import < page-id> --method < email| im> --data ' {"subscribers":[...]}'
258+ flashduty status-page subscriber-export < page-id> [--component-ids < ids> ]
259+ flashduty status-page template-list < page-id> --type < pre_defined| message>
260+ flashduty status-page template-upsert < page-id> --type < pre_defined| message> --data ' {"template":{...}}'
261+ flashduty status-page template-delete --page-id < page-id> --template-id < template-id> --type < pre_defined| message>
262+ ```
263+
264+ ** Migration from Atlassian Statuspage**
190265
191266``` bash
192- flashduty statuspage list [--id < ids> ] # List status pages
193- flashduty statuspage changes --page-id < id> --type < incident| maintenance> # List active changes
194- flashduty statuspage create-incident --page-id < id> --title < title> # Create status incident
195- flashduty statuspage create-timeline --page-id < id> --change < id> --message < msg> # Add timeline update
196- flashduty statuspage migrate structure --from atlassian --source-page-id < id> --api-key < key> # Start structure/history migration
197- flashduty statuspage migrate email-subscribers --from atlassian --source-page-id < id> --target-page-id < id> --api-key < key> # Start email subscriber migration
198- flashduty statuspage migrate status --job-id < id> # Check migration job status
199- flashduty statuspage migrate cancel --job-id < id> # Cancel a running migration job
267+ flashduty status-page migrate-structure < source-page-id> --api-key < key> [--url-name < slug> ] # Structure + history
268+ flashduty status-page migrate-email-subscribers --source-page-id < id> --target-page-id < id> --api-key < key>
269+ flashduty status-page migration-status < job-id> # Check migration job status
270+ flashduty status-page migration-cancel < job-id> # Cancel a running migration job
200271```
201272
202- Migration jobs are asynchronous. After starting ` structure ` or ` email-subscribers ` , use:
273+ Migration jobs are asynchronous. After starting ` migrate-structure ` or
274+ ` migrate-email-subscribers ` , poll the returned ` job_id ` :
203275
204276``` bash
205- flashduty statuspage migrate status -- job-id < job_id >
277+ flashduty status-page migration-status < job-id>
206278```
207279
208280Typical flow:
209281
210282``` bash
211- flashduty statuspage migrate structure --from atlassian --source-page-id page_123 --api-key $ATLASSIAN_STATUSPAGE_API_KEY
212- flashduty statuspage migrate status --job-id < structure_job_id>
213- flashduty statuspage migrate email-subscribers --from atlassian --source-page-id page_123 --target-page-id < target_page_id> --api-key $ATLASSIAN_STATUSPAGE_API_KEY
214- flashduty statuspage migrate status --job-id < subscriber_job_id>
283+ flashduty status-page migrate-structure page_123 --api-key $ATLASSIAN_STATUSPAGE_API_KEY
284+ flashduty status-page migration-status < structure_job_id>
285+ flashduty status-page migrate-email-subscribers --source-page-id page_123 \
286+ --target-page-id < target_page_id> --api-key $ATLASSIAN_STATUSPAGE_API_KEY
287+ flashduty status-page migration-status < subscriber_job_id>
215288```
216289
217290### ` template ` - Notification Template Management (4 commands)
0 commit comments