Skip to content
For the complete documentation index, see llms.txt. This page is also available as Markdown.

Service Reliability Management

Manage monitored services, health sources, SLOs, and downtime with the Harness Service Reliability Management API.

The Service Reliability Management (SRM) API manages the monitored services, health sources, and service level objectives (SLOs) that track how reliable your services are.

Request basics

  • API key token: Send it in the x-api-key header on every request. Go to Manage API keys to create a key and token.

  • Account, organization, and project IDs: Send orgIdentifier and projectIdentifier on most endpoints. The account ID is accountId on some endpoints and accountIdentifier on others, so check each endpoint's parameters. Go to Organizations and projects to find these identifiers.

  • Base URL: Send requests to https://app.harness.io/gateway/cv/api, followed by the endpoint path.

Example request

List the monitored services in a project:

curl "https://app.harness.io/gateway/cv/api/monitored-service?accountId=ACCOUNT_ID&orgIdentifier=ORG_ID&projectIdentifier=PROJECT_ID&offset=0&pageSize=10&servicesAtRiskFilter=false" \
  -H "x-api-key: $HARNESS_API_KEY"

Replace ACCOUNT_ID, ORG_ID, and PROJECT_ID with your own values, and set HARNESS_API_KEY to your API key token.

Find an endpoint

Endpoint paths are relative to the base URL.

  • Monitored services: A service and environment pair that SRM watches for health. List them with GET /monitored-service and create one with POST /monitored-service. Go to Monitored Services to create a monitored service.

  • Health sources: The metrics and logs tools, such as Datadog or Splunk, that feed a monitored service. List a service's health sources with GET /monitored-service/{monitoredServiceIdentifier}/health-sources. Go to Health sources catalog to add a health source.

  • SLOs: Targets for a service's reliability, such as 99.9% of requests succeeding over 30 days, simple or composite. List SLOs with GET /account/{accountIdentifier}/org/{orgIdentifier}/project/{projectIdentifier}/slo/v2. Go to Manage SLO to manage SLOs.

  • Downtime: Planned maintenance windows that SLOs should not count against the error budget. List downtime with GET /account/{accountIdentifier}/org/{orgIdentifier}/project/{projectIdentifier}/downtime/list and schedule it with POST /account/{accountIdentifier}/org/{orgIdentifier}/project/{projectIdentifier}/downtime. Go to SLO downtime to schedule downtime.

  • Notifications: Alerts when a monitored service's health changes or an SLO's error budget runs low. Read a service's rules with GET /monitored-service/{identifier}/notification-rules. Go to SRM Notifications to set up notifications.

Last updated

Was this helpful?