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-keyheader on every request.Authorization: Beareris 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, andprojectIdas 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 withGET /api/v1/mc/incidents, and read or update one withGETandPATCH /api/v1/mc/incidents/{incidentId}. Close an incident withPOST /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 withPOSTon/confirm,/rule-out, or/undounder/api/v1/mc/incidents/{incidentId}/root-cause-theories/{theoryId}.Alerts: List alerts with
GET /api/v1/mc/alertsand read or update one withGETandPATCH /api/v1/mc/alerts/{alertId}. Change an alert's state withPOSTon/acknowledge,/dismiss, or/resolveunder/api/v1/mc/alerts/{alertId}.Deploys: List deploys with
GET /api/v1/mc/deploysand read one withGET /api/v1/mc/deploys/{deployId}.Activity timelines: Read an activity's timeline with
GET /api/v1/mc/activities/{activityId}/timelineand add a markdown note withPOSTto the same path.
Known behavior
Time filters:
reportedAfterandreportedBeforetake ISO-8601 values such as2026-05-01T00:00:00Z, not epoch milliseconds.Pagination:
pageis 0-based. Use apageSizeof 20 or less, because larger page sizes can return a 500 error.
Last updated
Was this helpful?