Skip to content
CLI Overview

CLI Overview

The Status200 CLI, status200, manages your Status200 project from a terminal or a script. List, read, create, change, delete and count monitors, incidents, alerts, status pages and the other records the Status200 API offers, with an API key of your project.

How the CLI works

Each command sends one request to the Status200 REST API and prints the answer. The CLI takes the API key and your Status200's address from flags, environment variables or a context that status200 login saved. The key decides what a command may read and change, exactly as it does for the API.

flowchart TB T["Your terminal<br/>or a CI job"] -->|"status200 incident list"| C["status200 CLI"] K["The API key and URL:<br/>flags, environment<br/>or a saved context"] --> C C -->|"POST /api/incident/get-list"| A["Status200 REST API"] A -->|"the records the key<br/>may read, as JSON"| C C -->|"a table in a terminal,<br/>JSON in a pipe"| T

One command, one request

The commands for records come with the CLI: each kind of record the Status200 API opens to tools has one, the same records the MCP server has tools for. Run status200 resources to list them.

Before you begin

  • Node.js and npm, a current LTS release, to install the CLI.
  • An API key of your project. Create one in Project Settings → Advanced → API Keys with Create API Key: see Create an API key.
  • On Status200 Cloud, the Growth plan or above. A project's API keys work only on it: see API keys and SCIM below their plan.

Install the CLI

Install the @status200/cli package from npm. It adds the status200 command, and --version prints the version you installed:

Bash
npm install -g @status200/cli
status200 --version

The CLI is released with Status200 and has the same version number. On a self-hosted Status200, install the CLI of your Status200's version, so its commands match the records your server has:

Bash
npm install -g @status200/cli@<your-oneuptime-version>

Run your first commands

  1. Save your API key

    Log in with the key and your Status200's address. The CLI saves them as a context named default and uses it from now on:

    Bash
    status200 login <your-api-key> https://status200.ru

    It answers Logged in successfully. Context "default" is now active. On a self-hosted Status200, use its address in place of https://status200.ru.

  2. List your incidents

    Bash
    status200 incident list

    The ten newest incidents appear as a table. login saves the key without checking it, so this is the first command that shows the key works: if it is refused, see Troubleshooting.

  3. See what else you can manage

    Bash
    status200 resources

    The list shows every kind of record you can work with, and its command, such as monitor, status-page or on-call-policy.

Commands at a glance

CommandWhat it doesRead more
status200 login <api-key> <instance-url>Saves an API key and an address as a contextAuthentication
status200 context list, use, current, deleteLists, switches, shows and deletes saved contextsAuthentication
status200 whoamiShows the URL and API key the next command will useAuthentication
status200 deployRecords a deploy, or another change, for charts and Status200 AIDeploys and Changes
status200 <resource> list, get, create, update, delete, countWorks with one kind of recordResource Operations
status200 resourcesLists the kinds of record, with their commandsCommand Reference
status200 versionPrints the CLI's versionCommand Reference
status200 help [command]Shows the help of a commandGet help

Global options

These options work with every command, before or after it:

OptionWhat it does
--api-key <key>The API key for this command, in place of the saved one
--url <url>Your Status200's address for this command
--context <name>A saved context for this command, in place of the current one
-o, --output <format>table, json or wide: see Output Formats
--no-colorPrints without colors
-V, --versionPrints the CLI's version
-h, --helpShows the help of the command

Get help

Every command has its own help, with its arguments, options and defaults:

Bash
status200 --help
status200 help incident
status200 incident list --help

Next steps