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-keyheader on every request. Go to Manage API keys to create a key and token.Account, organization, and project IDs: Send
orgIdentifierandprojectIdentifieron most endpoints. The account ID isaccountIdon some endpoints andaccountIdentifieron 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-serviceand create one withPOST /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/listand schedule it withPOST /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?