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

AI SRE

Manage incidents, alerts, deploys, and activity timelines with the Harness AI SRE API.

The AI SRE API manages the incidents, alerts, and deploys that AI SRE tracks, including root-cause theories and activity timelines. This reference covers the REST endpoints available today. Not every AI SRE capability is on the API yet.

Request basics

  • API key token: Send it in the x-api-key header on every request. Authorization: Bearer is the browser-session path and rejects API keys. Use a service account token for automation. Go to Manage API keys to create a key and token.

  • Account, organization, and project IDs: Send accountId, orgId, and projectId as query parameters. All three are required on every endpoint. Go to Organizations and projects to find these identifiers.

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

Example request

List the open incidents in a project:

curl "https://app.harness.io/gateway/ir/tp/api/v1/mc/incidents?accountId=ACCOUNT_ID&orgId=ORG_ID&projectId=PROJECT_ID&status=investigating&pageSize=10&page=0" \
  -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.

  • Incidents: Create an incident with POST /api/v1/mc/incidents, list them with GET /api/v1/mc/incidents, and read or update one with GET and PATCH /api/v1/mc/incidents/{incidentId}. Close an incident with POST /api/v1/mc/incidents/{incidentId}/close.

  • Root-cause theories: Add a theory to an incident with POST /api/v1/mc/incidents/{incidentId}/root-cause-theories. Then confirm it, rule it out, or undo that decision with POST on /confirm, /rule-out, or /undo under /api/v1/mc/incidents/{incidentId}/root-cause-theories/{theoryId}.

  • Alerts: List alerts with GET /api/v1/mc/alerts and read or update one with GET and PATCH /api/v1/mc/alerts/{alertId}. Change an alert's state with POST on /acknowledge, /dismiss, or /resolve under /api/v1/mc/alerts/{alertId}.

  • Deploys: List deploys with GET /api/v1/mc/deploys and read one with GET /api/v1/mc/deploys/{deployId}.

  • Activity timelines: Read an activity's timeline with GET /api/v1/mc/activities/{activityId}/timeline and add a markdown note with POST to the same path.

Known behavior

  • Time filters: reportedAfter and reportedBefore take ISO-8601 values such as 2026-05-01T00:00:00Z, not epoch milliseconds.

  • Pagination: page is 0-based. Use a pageSize of 20 or less, because larger page sizes can return a 500 error.

Last updated

Was this helpful?