CLI

Resource Operations

The Status200 CLI provides full CRUD (Create, Read, Update, Delete) operations for all supported resources. Resources are auto-discovered from your Status200 instance.

Available Resources

Run the following command to see all available resource types:

status200 resources

You can filter by type:

# Show only database resources
status200 resources --type database

# Show only analytics resources
status200 resources --type analytics

Common resources include:

ResourceCommand
Incidentstatus200 incident
Alertstatus200 alert
Monitorstatus200 monitor
Monitor Statusstatus200 monitor-status
Incident Statestatus200 incident-state
Status Pagestatus200 status-page
On-Call Policystatus200 on-call-policy
Teamstatus200 team
Scheduled Maintenance Eventstatus200 scheduled-maintenance-event

List Resources

Retrieve a list of resources with optional filtering, pagination, and sorting.

status200 <resource> list [options]

Options:

OptionDescriptionDefault
--query <json>Filter criteria as JSONNone
--limit <n>Maximum number of results10
--skip <n>Number of results to skip0
--sort <json>Sort order as JSONNone
-o, --output <format>Output formattable

Examples:

# List the 10 most recent incidents
status200 incident list

# Filter incidents by state ID
status200 incident list --query '{"currentIncidentStateId":"<state-id>"}'

# List with pagination
status200 incident list --limit 20 --skip 40

# Sort by creation date (descending)
status200 incident list --sort '{"createdAt":-1}'

# Output as JSON
status200 incident list -o json

Get a Resource

Retrieve a single resource by its ID.

status200 <resource> get <id>

Arguments:

ArgumentDescription
<id>The resource ID (UUID)

Examples:

# Get a specific incident
status200 incident get 550e8400-e29b-41d4-a716-446655440000

# Get a monitor as JSON
status200 monitor get abc-123 -o json

Create a Resource

Create a new resource from inline JSON or a file.

status200 <resource> create [options]

Options:

OptionDescription
--data <json>Resource data as a JSON object
--file <path>Path to a JSON file containing resource data
-o, --output <format>Output format

You must provide either --data or --file.

Examples:

# Create an incident with inline JSON
status200 incident create --data '{"title":"API Outage","currentIncidentStateId":"<state-id>","incidentSeverityId":"<severity-id>","declaredAt":"2025-01-15T10:30:00Z"}'

# Create from a JSON file
status200 incident create --file incident.json

# Create and output as JSON to capture the ID
status200 monitor create --data '{"name":"API Health Check"}' -o json

Update a Resource

Update an existing resource by ID.

status200 <resource> update <id> [options]

Arguments:

ArgumentDescription
<id>The resource ID

Options:

OptionDescription
--data <json>Fields to update as JSON (required)
-o, --output <format>Output format

Examples:

# Change incident state (e.g., to resolved)
status200 incident update abc-123 --data '{"currentIncidentStateId":"<resolved-state-id>"}'

# Rename a monitor
status200 monitor update abc-123 --data '{"name":"Updated Monitor Name"}'

Delete a Resource

Delete a resource by ID.

status200 <resource> delete <id> [--force]

Arguments:

ArgumentDescription
<id>The resource ID

Options:

OptionDescription
--forceSkip confirmation prompt

Examples:

status200 incident delete abc-123
status200 monitor delete 550e8400-e29b-41d4-a716-446655440000

# Skip confirmation
status200 monitor delete 550e8400-e29b-41d4-a716-446655440000 --force

Count Resources

Count resources matching optional filter criteria.

status200 <resource> count [options]

Options:

OptionDescription
--query <json>Filter criteria as JSON

Examples:

# Count all incidents
status200 incident count

# Count incidents by state
status200 incident count --query '{"currentIncidentStateId":"<state-id>"}'

# Count monitors
status200 monitor count

Analytics Resources

Analytics resources support a limited set of operations compared to database resources:

OperationSupported
listYes
createYes
countYes
getNo
updateNo
deleteNo

Use status200 resources --type analytics to see which analytics resources are available on your instance.