diff --git a/README.md b/README.md index e8c9854..78eb727 100644 --- a/README.md +++ b/README.md @@ -90,6 +90,9 @@ rootly incidents create --title="API degradation" --field="customer_impact=Check rootly incidents update --status=mitigated rootly incidents update --scheduled-until=2025-06-20T13:00:00Z rootly incidents update --field="customer_impact=Checkout restored" +rootly incidents create --title="Checkout errors" --services=api-gateway,payments --types=customer-impacting +rootly incidents update INC-123 --services=api-gateway --teams=platform +rootly incidents update INC-123 --types= # Clears the incident types rootly incidents delete # Alerts @@ -161,6 +164,26 @@ rootly incidents create --title="Release" \ --field="regions=EU West" ``` +### Incident Associations + +`incidents create` and `incidents update` can link an incident to other Rootly records. Each flag takes comma-separated slugs or IDs, like `rootly pulse create --services`: + +| Flag | Links | API attribute | +|------|-------|---------------| +| `--services` | Services | `service_ids` | +| `--types` | Incident types | `incident_type_ids` | +| `--functionalities` | Functionalities | `functionality_ids` | +| `--environments` | Environments | `environment_ids` | +| `--teams` | Teams | `group_ids` | +| `--causes` | Causes | `cause_ids` | + +On `update`, only the flags you pass are sent. Each one replaces the incident's current list, and an empty value (`--services=`) clears it. `update` accepts a sequential ID such as `INC-123` as well as a UUID or slug. + +```bash +rootly incidents create --title="Checkout errors" --services=api-gateway,payments --types=customer-impacting +rootly incidents update INC-123 --services=api-gateway --teams=platform +``` + ### Status-Page Templates and Maintenance Statuses List a status page's templates with `rootly status-pages templates list --status-page=`. The command supports `--page`, `--page-size`, and the standard `--format` output flag.