> For the complete documentation index, see [llms.txt](https://developer.harness.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developer.harness.io/ai-sre/api-reference/incidents.md).

# Incidents

## Add a root-cause theory

> Appends a root-cause theory, authored by the caller; calls authenticated as the project's Agent Account are recorded as AI-generated. Items the theory cites in relatedActivities are checked against the incident's project; any that can't be found are returned in notLinked and the theory is still added. Items may be cited by web URL, including PRs outside Harness Code; those with no activity in the incident's project are linked as cited and returned in unverified. If a theory with the same message already exists, no duplicate is created and the cited items are added to the existing theory.

```json
{"openapi":"3.0.1","info":{"title":"Harness AI SRE API","version":"v1"},"servers":[{"url":"https://app.harness.io/gateway/ir/tp"}],"security":[{}],"paths":{"/api/v1/mc/incidents/{incidentId}/root-cause-theories":{"post":{"tags":["Incidents"],"summary":"Add a root-cause theory","description":"Appends a root-cause theory, authored by the caller; calls authenticated as the project's Agent Account are recorded as AI-generated. Items the theory cites in relatedActivities are checked against the incident's project; any that can't be found are returned in notLinked and the theory is still added. Items may be cited by web URL, including PRs outside Harness Code; those with no activity in the incident's project are linked as cited and returned in unverified. If a theory with the same message already exists, no duplicate is created and the cited items are added to the existing theory.","operationId":"add_incident_root_cause_theory","parameters":[{"name":"accountId","in":"query","description":"Harness account identifier.","required":true,"schema":{"minLength":1,"type":"string"}},{"name":"orgId","in":"query","description":"Harness organization identifier.","required":true,"schema":{"minLength":1,"type":"string"}},{"name":"projectId","in":"query","description":"Harness project identifier.","required":true,"schema":{"minLength":1,"type":"string"}},{"name":"incidentId","in":"path","description":"Incident ID, e.g. INC-123","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AddRootCauseTheoryRequest"}}}},"responses":{"200":{"description":"A theory with this message already exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AddRootCauseTheoryResponse"}}}},"201":{"description":"Root-cause theory created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AddRootCauseTheoryResponse"}}}},"400":{"description":"Invalid request"},"404":{"description":"Incident not found"}}}}},"components":{"schemas":{"AddRootCauseTheoryRequest":{"required":["message"],"type":"object","properties":{"message":{"type":"string","description":"The root-cause theory text"},"status":{"type":"string","description":"Theory status: INVESTIGATING (default), CONFIRMED, or RULED_OUT"},"confidence":{"type":"integer","description":"Confidence level (0-100); defaults based on status when omitted","format":"int32"},"relatedActivities":{"type":"array","description":"Items the theory cites, shown as links under it. Each is checked against the incident's project; any that can't be found are returned in notLinked and the theory is still added. The items on a CONFIRMED theory are recorded as the incident's cause.","items":{"$ref":"#/components/schemas/RelatedActivityReference"}}},"description":"Request body for adding a root-cause theory"},"RelatedActivityReference":{"required":["id","type"],"type":"object","properties":{"type":{"type":"string","description":"DEPLOY, PR, INCIDENT, ALERT, CHANGE, BUILD, FF, FLAG_CHANGE, TICKET or LINK. For an item cited by web URL the type is a hint: the URL decides how it's stored"},"id":{"type":"string","description":"The item's public ID (e.g. DEPL-12). For a PR, its web URL or <repository identifier>#<PR number> for a repository in the incident's project's Harness Code (e.g. checkout-service#42). Anything else, such as a pipeline execution, build, feature flag, ticket or status page, by its web URL"}},"description":"An item a root-cause theory cites"},"AddRootCauseTheoryResponse":{"type":"object","properties":{"theory":{"$ref":"#/components/schemas/RootCauseTheoryInfo"},"created":{"type":"boolean","description":"False when a theory with the same message already existed"},"notLinked":{"type":"array","description":"Cited items that weren't found, so weren't linked","items":{"$ref":"#/components/schemas/RelatedActivityIssue"}},"unverified":{"type":"array","description":"Cited items that couldn't be checked right now, have no activity in the incident's project, or whose URL isn't the cited type; they're linked as cited","items":{"$ref":"#/components/schemas/RelatedActivityIssue"}}},"description":"Result of adding a root-cause theory to an incident"},"RootCauseTheoryInfo":{"type":"object","properties":{"id":{"type":"string","description":"Theory id"},"message":{"type":"string","description":"Theory message/description"},"status":{"type":"string","description":"Theory status (e.g. CONFIRMED, RULED_OUT, INVESTIGATING)"},"confidence":{"type":"integer","description":"Confidence level (0-100)","format":"int32"},"aiGenerated":{"type":"boolean","description":"Whether the theory was AI-generated"},"relatedActivities":{"type":"array","description":"Items the theory cites","items":{"$ref":"#/components/schemas/RelatedActivityInfo"}}},"description":"Root cause theory for an incident"},"RelatedActivityInfo":{"type":"object","properties":{"type":{"type":"string","description":"DEPLOY, PR, INCIDENT, ALERT, CHANGE, BUILD, FF, FLAG_CHANGE, TICKET or LINK"},"displayId":{"type":"string","description":"Text to show for the item"},"url":{"type":"string","description":"Link to the item"}},"description":"An item a root-cause theory cites"},"RelatedActivityIssue":{"type":"object","properties":{"reference":{"$ref":"#/components/schemas/RelatedActivityReference"},"reason":{"type":"string","description":"Why it wasn't linked or couldn't be checked"}},"description":"A cited item that couldn't be linked or checked, and why"}}}}
```

## POST /api/v1/mc/incidents/{incidentId}/close

> Close incident

```json
{"openapi":"3.0.1","info":{"title":"Harness AI SRE API","version":"v1"},"servers":[{"url":"https://app.harness.io/gateway/ir/tp"}],"security":[{}],"paths":{"/api/v1/mc/incidents/{incidentId}/close":{"post":{"tags":["Incidents"],"summary":"Close incident","operationId":"close_incident","parameters":[{"name":"accountId","in":"query","description":"Harness account identifier.","required":true,"schema":{"minLength":1,"type":"string"}},{"name":"orgId","in":"query","description":"Harness organization identifier.","required":true,"schema":{"minLength":1,"type":"string"}},{"name":"projectId","in":"query","description":"Harness project identifier.","required":true,"schema":{"minLength":1,"type":"string"}},{"name":"incidentId","in":"path","description":"Incident ID, e.g. INC-123","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Incident closed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IncidentResponse"}}}},"404":{"description":"Incident not found"}}}}},"components":{"schemas":{"IncidentResponse":{"required":["prettyId","projectId","reporter","status","title"],"type":"object","properties":{"prettyId":{"type":"string"},"projectId":{"type":"string"},"title":{"type":"string"},"summary":{"type":"string","description":"Incident summary"},"status":{"type":"string","description":"Incident status","enum":["NEW","INVESTIGATING","FIXING","MONITORING","CLOSED"]},"reporter":{"$ref":"#/components/schemas/OncallUser"},"commander":{"$ref":"#/components/schemas/OncallUser"},"impactedServices":{"type":"array","description":"Harness service identifiers for impacted services","items":{"type":"string","description":"Harness service identifiers for impacted services"}},"environments":{"type":"array","description":"Environment labels (e.g. prod, qa)","items":{"type":"string","description":"Environment labels (e.g. prod, qa)"}},"severity":{"$ref":"#/components/schemas/Severity"},"keyEvents":{"type":"array","description":"Key events timeline","items":{"$ref":"#/components/schemas/KeyEventInfo"}},"relatedActivities":{"type":"array","description":"Related activities","items":{"$ref":"#/components/schemas/RelatedActivity"}},"relatedExternalEntities":{"type":"array","description":"External items (deployments, PRs, tickets, URLs) linked to this activity","items":{"$ref":"#/components/schemas/RelatedExternalEntity"}},"rootCauseTheories":{"type":"array","description":"AI-generated root cause theories","items":{"$ref":"#/components/schemas/RootCauseTheoryInfo"}},"rootCauseTheoriesSha":{"type":"string","description":"Fingerprint of rootCauseTheories. Clients send this back when confirming, ruling out, or undoing a theory so a stale write is rejected."},"commsLinks":{"type":"array","description":"Communication links","items":{"$ref":"#/components/schemas/CommsLink"}},"videoConferenceLink":{"type":"string","description":"Video conference link for the incident"},"acknowledgedAtTimestamp":{"type":"integer","description":"Epoch timestamp when acknowledged (milliseconds)","format":"int64"},"startedAtTimestamp":{"type":"integer","description":"Epoch timestamp when work started (milliseconds)","format":"int64"},"resolvedAtTimestamp":{"type":"integer","description":"Epoch timestamp when resolved (milliseconds)","format":"int64"},"closedAtTimestamp":{"type":"integer","description":"Epoch timestamp when closed (milliseconds)","format":"int64"},"reportedAtTimestamp":{"type":"integer","description":"Epoch timestamp when reported (milliseconds)","format":"int64"},"mitigatedAtTimestamp":{"type":"integer","description":"Epoch timestamp when mitigated (milliseconds)","format":"int64"},"responderAssignedAtTimestamp":{"type":"integer","description":"Epoch timestamp when responder assigned (milliseconds)","format":"int64"},"pagedResponders":{"type":"array","description":"On-call users who were paged when pageOnCall was requested at create time. Null when pageOnCall was false or no on-call user was found. These users are not automatically assigned as incident responders.","items":{"$ref":"#/components/schemas/OncallUser"}}}},"OncallUser":{"required":["displayName","email","userId"],"type":"object","properties":{"userId":{"type":"string"},"displayName":{"type":"string"},"email":{"type":"string"}},"description":"On-call users who were paged when pageOnCall was requested at create time. Null when pageOnCall was false or no on-call user was found. These users are not automatically assigned as incident responders."},"Severity":{"type":"object","properties":{"id":{"type":"string","description":"Severity option id"},"label":{"type":"string","description":"Display label resolved from the activity template"}},"description":"Incident severity"},"KeyEventInfo":{"type":"object","properties":{"timestamp":{"type":"integer","description":"Epoch milliseconds when the event occurred","format":"int64"},"status":{"type":"string","description":"Status at the time of the event"},"details":{"type":"string","description":"Human-readable details"}},"description":"Key event in the incident timeline"},"RelatedActivity":{"required":["globalId","name","prettyId","templateTypeName","title"],"type":"object","properties":{"name":{"type":"string","description":"Relationship verb (e.g., \"relates to\")"},"templateTypeName":{"type":"string","description":"Template type name","enum":["INCIDENT","ALERT","DEPLOY","CHANGE"]},"prettyId":{"type":"string"},"globalId":{"type":"string"},"title":{"type":"string"}},"description":"Related activities"},"RelatedExternalEntity":{"required":["externalId","name","provider","relationshipGlobalId","type","url"],"type":"object","properties":{"relationshipGlobalId":{"type":"string","description":"Global ID of the link; pass this to the delete endpoint"},"name":{"type":"string","description":"Relationship verb with the activity as the subject (e.g., \"is caused by\")"},"type":{"type":"string","enum":["DEPLOYMENT","BUILD","PULL_REQUEST","TICKET","FEATURE_FLAG","LINK"]},"provider":{"type":"string","enum":["HARNESS","GITHUB","GITLAB","BITBUCKET","JIRA","SERVICENOW","GENERIC"]},"externalId":{"type":"string","description":"Canonical identifier within (type, provider), e.g. \"owner/repo#123\" or \"IR-3638\""},"url":{"type":"string"},"displayName":{"type":"string"}},"description":"An external item (deployment, PR, ticket, URL) linked to an activity"},"RootCauseTheoryInfo":{"type":"object","properties":{"id":{"type":"string","description":"Theory id"},"message":{"type":"string","description":"Theory message/description"},"status":{"type":"string","description":"Theory status (e.g. CONFIRMED, RULED_OUT, INVESTIGATING)"},"confidence":{"type":"integer","description":"Confidence level (0-100)","format":"int32"},"aiGenerated":{"type":"boolean","description":"Whether the theory was AI-generated"},"relatedActivities":{"type":"array","description":"Items the theory cites","items":{"$ref":"#/components/schemas/RelatedActivityInfo"}}},"description":"Root cause theory for an incident"},"RelatedActivityInfo":{"type":"object","properties":{"type":{"type":"string","description":"DEPLOY, PR, INCIDENT, ALERT, CHANGE, BUILD, FF, FLAG_CHANGE, TICKET or LINK"},"displayId":{"type":"string","description":"Text to show for the item"},"url":{"type":"string","description":"Link to the item"}},"description":"An item a root-cause theory cites"},"CommsLink":{"required":["linkType","url"],"type":"object","properties":{"url":{"type":"string"},"linkType":{"type":"string","enum":["WEB","SLACK"]}},"description":"Communication links"}}}}
```

## POST /api/v1/mc/incidents/{incidentId}/root-cause-theories/{theoryId}/confirm

> Confirm a root-cause theory

```json
{"openapi":"3.0.1","info":{"title":"Harness AI SRE API","version":"v1"},"servers":[{"url":"https://app.harness.io/gateway/ir/tp"}],"security":[{}],"paths":{"/api/v1/mc/incidents/{incidentId}/root-cause-theories/{theoryId}/confirm":{"post":{"tags":["Incidents"],"summary":"Confirm a root-cause theory","operationId":"confirm_incident_root_cause_theory","parameters":[{"name":"accountId","in":"query","description":"Harness account identifier.","required":true,"schema":{"minLength":1,"type":"string"}},{"name":"orgId","in":"query","description":"Harness organization identifier.","required":true,"schema":{"minLength":1,"type":"string"}},{"name":"projectId","in":"query","description":"Harness project identifier.","required":true,"schema":{"minLength":1,"type":"string"}},{"name":"incidentId","in":"path","description":"Incident ID, e.g. INC-123","required":true,"schema":{"type":"string"}},{"name":"theoryId","in":"path","description":"Root-cause theory id","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RootCauseTheoryStatusRequest"}}}},"responses":{"200":{"description":"Theory confirmed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IncidentResponse"}}}},"400":{"description":"Invalid request, unknown theory, or root-cause data has changed"},"404":{"description":"Incident not found"}}}}},"components":{"schemas":{"RootCauseTheoryStatusRequest":{"required":["expectedOldRcaSha"],"type":"object","properties":{"expectedOldRcaSha":{"type":"string","description":"Fingerprint from GET incident (rootCauseTheoriesSha). A blank value is rejected."}},"description":"Request body for confirming, ruling out, or undoing a root-cause theory"},"IncidentResponse":{"required":["prettyId","projectId","reporter","status","title"],"type":"object","properties":{"prettyId":{"type":"string"},"projectId":{"type":"string"},"title":{"type":"string"},"summary":{"type":"string","description":"Incident summary"},"status":{"type":"string","description":"Incident status","enum":["NEW","INVESTIGATING","FIXING","MONITORING","CLOSED"]},"reporter":{"$ref":"#/components/schemas/OncallUser"},"commander":{"$ref":"#/components/schemas/OncallUser"},"impactedServices":{"type":"array","description":"Harness service identifiers for impacted services","items":{"type":"string","description":"Harness service identifiers for impacted services"}},"environments":{"type":"array","description":"Environment labels (e.g. prod, qa)","items":{"type":"string","description":"Environment labels (e.g. prod, qa)"}},"severity":{"$ref":"#/components/schemas/Severity"},"keyEvents":{"type":"array","description":"Key events timeline","items":{"$ref":"#/components/schemas/KeyEventInfo"}},"relatedActivities":{"type":"array","description":"Related activities","items":{"$ref":"#/components/schemas/RelatedActivity"}},"relatedExternalEntities":{"type":"array","description":"External items (deployments, PRs, tickets, URLs) linked to this activity","items":{"$ref":"#/components/schemas/RelatedExternalEntity"}},"rootCauseTheories":{"type":"array","description":"AI-generated root cause theories","items":{"$ref":"#/components/schemas/RootCauseTheoryInfo"}},"rootCauseTheoriesSha":{"type":"string","description":"Fingerprint of rootCauseTheories. Clients send this back when confirming, ruling out, or undoing a theory so a stale write is rejected."},"commsLinks":{"type":"array","description":"Communication links","items":{"$ref":"#/components/schemas/CommsLink"}},"videoConferenceLink":{"type":"string","description":"Video conference link for the incident"},"acknowledgedAtTimestamp":{"type":"integer","description":"Epoch timestamp when acknowledged (milliseconds)","format":"int64"},"startedAtTimestamp":{"type":"integer","description":"Epoch timestamp when work started (milliseconds)","format":"int64"},"resolvedAtTimestamp":{"type":"integer","description":"Epoch timestamp when resolved (milliseconds)","format":"int64"},"closedAtTimestamp":{"type":"integer","description":"Epoch timestamp when closed (milliseconds)","format":"int64"},"reportedAtTimestamp":{"type":"integer","description":"Epoch timestamp when reported (milliseconds)","format":"int64"},"mitigatedAtTimestamp":{"type":"integer","description":"Epoch timestamp when mitigated (milliseconds)","format":"int64"},"responderAssignedAtTimestamp":{"type":"integer","description":"Epoch timestamp when responder assigned (milliseconds)","format":"int64"},"pagedResponders":{"type":"array","description":"On-call users who were paged when pageOnCall was requested at create time. Null when pageOnCall was false or no on-call user was found. These users are not automatically assigned as incident responders.","items":{"$ref":"#/components/schemas/OncallUser"}}}},"OncallUser":{"required":["displayName","email","userId"],"type":"object","properties":{"userId":{"type":"string"},"displayName":{"type":"string"},"email":{"type":"string"}},"description":"On-call users who were paged when pageOnCall was requested at create time. Null when pageOnCall was false or no on-call user was found. These users are not automatically assigned as incident responders."},"Severity":{"type":"object","properties":{"id":{"type":"string","description":"Severity option id"},"label":{"type":"string","description":"Display label resolved from the activity template"}},"description":"Incident severity"},"KeyEventInfo":{"type":"object","properties":{"timestamp":{"type":"integer","description":"Epoch milliseconds when the event occurred","format":"int64"},"status":{"type":"string","description":"Status at the time of the event"},"details":{"type":"string","description":"Human-readable details"}},"description":"Key event in the incident timeline"},"RelatedActivity":{"required":["globalId","name","prettyId","templateTypeName","title"],"type":"object","properties":{"name":{"type":"string","description":"Relationship verb (e.g., \"relates to\")"},"templateTypeName":{"type":"string","description":"Template type name","enum":["INCIDENT","ALERT","DEPLOY","CHANGE"]},"prettyId":{"type":"string"},"globalId":{"type":"string"},"title":{"type":"string"}},"description":"Related activities"},"RelatedExternalEntity":{"required":["externalId","name","provider","relationshipGlobalId","type","url"],"type":"object","properties":{"relationshipGlobalId":{"type":"string","description":"Global ID of the link; pass this to the delete endpoint"},"name":{"type":"string","description":"Relationship verb with the activity as the subject (e.g., \"is caused by\")"},"type":{"type":"string","enum":["DEPLOYMENT","BUILD","PULL_REQUEST","TICKET","FEATURE_FLAG","LINK"]},"provider":{"type":"string","enum":["HARNESS","GITHUB","GITLAB","BITBUCKET","JIRA","SERVICENOW","GENERIC"]},"externalId":{"type":"string","description":"Canonical identifier within (type, provider), e.g. \"owner/repo#123\" or \"IR-3638\""},"url":{"type":"string"},"displayName":{"type":"string"}},"description":"An external item (deployment, PR, ticket, URL) linked to an activity"},"RootCauseTheoryInfo":{"type":"object","properties":{"id":{"type":"string","description":"Theory id"},"message":{"type":"string","description":"Theory message/description"},"status":{"type":"string","description":"Theory status (e.g. CONFIRMED, RULED_OUT, INVESTIGATING)"},"confidence":{"type":"integer","description":"Confidence level (0-100)","format":"int32"},"aiGenerated":{"type":"boolean","description":"Whether the theory was AI-generated"},"relatedActivities":{"type":"array","description":"Items the theory cites","items":{"$ref":"#/components/schemas/RelatedActivityInfo"}}},"description":"Root cause theory for an incident"},"RelatedActivityInfo":{"type":"object","properties":{"type":{"type":"string","description":"DEPLOY, PR, INCIDENT, ALERT, CHANGE, BUILD, FF, FLAG_CHANGE, TICKET or LINK"},"displayId":{"type":"string","description":"Text to show for the item"},"url":{"type":"string","description":"Link to the item"}},"description":"An item a root-cause theory cites"},"CommsLink":{"required":["linkType","url"],"type":"object","properties":{"url":{"type":"string"},"linkType":{"type":"string","enum":["WEB","SLACK"]}},"description":"Communication links"}}}}
```

## GET /api/v1/mc/incidents

> List incidents

```json
{"openapi":"3.0.1","info":{"title":"Harness AI SRE API","version":"v1"},"servers":[{"url":"https://app.harness.io/gateway/ir/tp"}],"security":[{}],"paths":{"/api/v1/mc/incidents":{"get":{"tags":["Incidents"],"summary":"List incidents","operationId":"list_incidents","parameters":[{"name":"accountId","in":"query","description":"Harness account identifier.","required":true,"schema":{"minLength":1,"type":"string"}},{"name":"orgId","in":"query","description":"Harness organization identifier.","required":true,"schema":{"minLength":1,"type":"string"}},{"name":"projectId","in":"query","description":"Harness project identifier.","required":true,"schema":{"minLength":1,"type":"string"}},{"name":"status","in":"query","description":"Filter by status (multi-value, OR-combined). Allowed: new, investigating, fixing, monitoring, closed.","schema":{"type":"array","items":{"type":"string"}}},{"name":"severity","in":"query","description":"Filter by severity option id (multi-value, OR-combined)","schema":{"type":"array","items":{"type":"string"}}},{"name":"impactedService","in":"query","description":"Filter by service: Harness identifier, name, or ID (multi-value, OR-combined)","schema":{"type":"array","items":{"type":"string"}}},{"name":"environment","in":"query","description":"Filter by environment (multi-value, OR-combined), each a Harness environment identifier, name, or serialized HarnessEnvironmentId. Identifiers are matched before names. A reference shared by several scopes resolves to the closest: this project, then its org, then the account, then other projects in (org, project) order.","schema":{"type":"array","items":{"type":"string"}}},{"name":"commander","in":"query","description":"Filter by commander Harness user id","schema":{"type":"string"}},{"name":"text","in":"query","description":"Free-text search across title and summary","schema":{"type":"string"}},{"name":"reportedAfter","in":"query","description":"ISO-8601 inclusive lower bound on reportedAt, e.g. 2026-05-01T00:00:00Z","schema":{"type":"string"}},{"name":"reportedBefore","in":"query","description":"ISO-8601 inclusive upper bound on reportedAt","schema":{"type":"string"}},{"name":"sortField","in":"query","description":"Field to sort on","schema":{"type":"string","description":"Field to sort incidents by","enum":["REPORTED_AT","SEVERITY","STATUS"]}},{"name":"sortDirection","in":"query","description":"Sort direction. For severity, DESC is most critical first and ASC is least critical first; omitted defaults to most-critical-first. Other fields use the requested direction as-is.","schema":{"type":"string","description":"Sort direction","enum":["ASC","DESC"]}},{"name":"pageSize","in":"query","description":"Page size requested","schema":{"type":"integer","format":"int32"}},{"name":"page","in":"query","description":"0-based page number; defaults to 0 (the first page).","schema":{"minimum":0,"type":"integer","format":"int32"}}],"responses":{"200":{"description":"Page of incidents","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OffsetPaginatedResultIncidentResponse"}}}}}}}},"components":{"schemas":{"OffsetPaginatedResultIncidentResponse":{"type":"object","properties":{"entities":{"type":"array","items":{"$ref":"#/components/schemas/IncidentResponse"}},"totalCount":{"type":"integer","format":"int32"}}},"IncidentResponse":{"required":["prettyId","projectId","reporter","status","title"],"type":"object","properties":{"prettyId":{"type":"string"},"projectId":{"type":"string"},"title":{"type":"string"},"summary":{"type":"string","description":"Incident summary"},"status":{"type":"string","description":"Incident status","enum":["NEW","INVESTIGATING","FIXING","MONITORING","CLOSED"]},"reporter":{"$ref":"#/components/schemas/OncallUser"},"commander":{"$ref":"#/components/schemas/OncallUser"},"impactedServices":{"type":"array","description":"Harness service identifiers for impacted services","items":{"type":"string","description":"Harness service identifiers for impacted services"}},"environments":{"type":"array","description":"Environment labels (e.g. prod, qa)","items":{"type":"string","description":"Environment labels (e.g. prod, qa)"}},"severity":{"$ref":"#/components/schemas/Severity"},"keyEvents":{"type":"array","description":"Key events timeline","items":{"$ref":"#/components/schemas/KeyEventInfo"}},"relatedActivities":{"type":"array","description":"Related activities","items":{"$ref":"#/components/schemas/RelatedActivity"}},"relatedExternalEntities":{"type":"array","description":"External items (deployments, PRs, tickets, URLs) linked to this activity","items":{"$ref":"#/components/schemas/RelatedExternalEntity"}},"rootCauseTheories":{"type":"array","description":"AI-generated root cause theories","items":{"$ref":"#/components/schemas/RootCauseTheoryInfo"}},"rootCauseTheoriesSha":{"type":"string","description":"Fingerprint of rootCauseTheories. Clients send this back when confirming, ruling out, or undoing a theory so a stale write is rejected."},"commsLinks":{"type":"array","description":"Communication links","items":{"$ref":"#/components/schemas/CommsLink"}},"videoConferenceLink":{"type":"string","description":"Video conference link for the incident"},"acknowledgedAtTimestamp":{"type":"integer","description":"Epoch timestamp when acknowledged (milliseconds)","format":"int64"},"startedAtTimestamp":{"type":"integer","description":"Epoch timestamp when work started (milliseconds)","format":"int64"},"resolvedAtTimestamp":{"type":"integer","description":"Epoch timestamp when resolved (milliseconds)","format":"int64"},"closedAtTimestamp":{"type":"integer","description":"Epoch timestamp when closed (milliseconds)","format":"int64"},"reportedAtTimestamp":{"type":"integer","description":"Epoch timestamp when reported (milliseconds)","format":"int64"},"mitigatedAtTimestamp":{"type":"integer","description":"Epoch timestamp when mitigated (milliseconds)","format":"int64"},"responderAssignedAtTimestamp":{"type":"integer","description":"Epoch timestamp when responder assigned (milliseconds)","format":"int64"},"pagedResponders":{"type":"array","description":"On-call users who were paged when pageOnCall was requested at create time. Null when pageOnCall was false or no on-call user was found. These users are not automatically assigned as incident responders.","items":{"$ref":"#/components/schemas/OncallUser"}}}},"OncallUser":{"required":["displayName","email","userId"],"type":"object","properties":{"userId":{"type":"string"},"displayName":{"type":"string"},"email":{"type":"string"}},"description":"On-call users who were paged when pageOnCall was requested at create time. Null when pageOnCall was false or no on-call user was found. These users are not automatically assigned as incident responders."},"Severity":{"type":"object","properties":{"id":{"type":"string","description":"Severity option id"},"label":{"type":"string","description":"Display label resolved from the activity template"}},"description":"Incident severity"},"KeyEventInfo":{"type":"object","properties":{"timestamp":{"type":"integer","description":"Epoch milliseconds when the event occurred","format":"int64"},"status":{"type":"string","description":"Status at the time of the event"},"details":{"type":"string","description":"Human-readable details"}},"description":"Key event in the incident timeline"},"RelatedActivity":{"required":["globalId","name","prettyId","templateTypeName","title"],"type":"object","properties":{"name":{"type":"string","description":"Relationship verb (e.g., \"relates to\")"},"templateTypeName":{"type":"string","description":"Template type name","enum":["INCIDENT","ALERT","DEPLOY","CHANGE"]},"prettyId":{"type":"string"},"globalId":{"type":"string"},"title":{"type":"string"}},"description":"Related activities"},"RelatedExternalEntity":{"required":["externalId","name","provider","relationshipGlobalId","type","url"],"type":"object","properties":{"relationshipGlobalId":{"type":"string","description":"Global ID of the link; pass this to the delete endpoint"},"name":{"type":"string","description":"Relationship verb with the activity as the subject (e.g., \"is caused by\")"},"type":{"type":"string","enum":["DEPLOYMENT","BUILD","PULL_REQUEST","TICKET","FEATURE_FLAG","LINK"]},"provider":{"type":"string","enum":["HARNESS","GITHUB","GITLAB","BITBUCKET","JIRA","SERVICENOW","GENERIC"]},"externalId":{"type":"string","description":"Canonical identifier within (type, provider), e.g. \"owner/repo#123\" or \"IR-3638\""},"url":{"type":"string"},"displayName":{"type":"string"}},"description":"An external item (deployment, PR, ticket, URL) linked to an activity"},"RootCauseTheoryInfo":{"type":"object","properties":{"id":{"type":"string","description":"Theory id"},"message":{"type":"string","description":"Theory message/description"},"status":{"type":"string","description":"Theory status (e.g. CONFIRMED, RULED_OUT, INVESTIGATING)"},"confidence":{"type":"integer","description":"Confidence level (0-100)","format":"int32"},"aiGenerated":{"type":"boolean","description":"Whether the theory was AI-generated"},"relatedActivities":{"type":"array","description":"Items the theory cites","items":{"$ref":"#/components/schemas/RelatedActivityInfo"}}},"description":"Root cause theory for an incident"},"RelatedActivityInfo":{"type":"object","properties":{"type":{"type":"string","description":"DEPLOY, PR, INCIDENT, ALERT, CHANGE, BUILD, FF, FLAG_CHANGE, TICKET or LINK"},"displayId":{"type":"string","description":"Text to show for the item"},"url":{"type":"string","description":"Link to the item"}},"description":"An item a root-cause theory cites"},"CommsLink":{"required":["linkType","url"],"type":"object","properties":{"url":{"type":"string"},"linkType":{"type":"string","enum":["WEB","SLACK"]}},"description":"Communication links"}}}}
```

## POST /api/v1/mc/incidents

> Create incident

```json
{"openapi":"3.0.1","info":{"title":"Harness AI SRE API","version":"v1"},"servers":[{"url":"https://app.harness.io/gateway/ir/tp"}],"security":[{}],"paths":{"/api/v1/mc/incidents":{"post":{"tags":["Incidents"],"summary":"Create incident","operationId":"create_incident","parameters":[{"name":"accountId","in":"query","description":"Harness account identifier.","required":true,"schema":{"minLength":1,"type":"string"}},{"name":"orgId","in":"query","description":"Harness organization identifier.","required":true,"schema":{"minLength":1,"type":"string"}},{"name":"projectId","in":"query","description":"Harness project identifier.","required":true,"schema":{"minLength":1,"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateIncidentRequest"}}}},"responses":{"201":{"description":"Incident created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IncidentResponse"}}}},"400":{"description":"Invalid request"},"404":{"description":"Activity template not found"}}}}},"components":{"schemas":{"CreateIncidentRequest":{"required":["templateShortId","title"],"type":"object","properties":{"templateShortId":{"type":"string","description":"Short id of the incident type to create from (e.g. \"INC\")."},"title":{"type":"string","description":"Incident title"},"summary":{"type":"string","description":"Incident summary"},"severity":{"type":"string","description":"Severity option id or label (e.g. \"1\" or \"SEV1: Major\"). Matched case-insensitively against the template's severity field options."},"status":{"type":"string","description":"Incident status option id or label (e.g. \"new\" or \"Investigating\"). Matched case-insensitively against the template's status field options."},"impactedServices":{"type":"array","description":"Impacted services by Harness identifier, name, or ID","items":{"type":"string","description":"Impacted services by Harness identifier, name, or ID"}},"environments":{"type":"array","description":"Environments, each a Harness environment identifier, name, or serialized HarnessEnvironmentId. Identifiers are matched before names. A reference shared by several scopes resolves to the closest: this project, then its org, then the account, then other projects in (org, project) order.","items":{"type":"string","description":"Environments, each a Harness environment identifier, name, or serialized HarnessEnvironmentId. Identifiers are matched before names. A reference shared by several scopes resolves to the closest: this project, then its org, then the account, then other projects in (org, project) order."}},"commanderHarnessUserId":{"type":"string","description":"Harness user id of the incident commander"},"videoConferenceLink":{"type":"string","description":"Video conference link for the incident"},"slackChannelUrl":{"type":"string","description":"URL of an existing Slack channel to associate with the incident"},"reportedAtTimestamp":{"type":"integer","description":"Reported-at timestamp in epoch milliseconds. Defaults to now.","format":"int64"},"labels":{"type":"array","description":"Incident labels","items":{"type":"string","description":"Incident labels"}},"customFields":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/JsonNode"},"description":"Escape hatch for template-specific custom fields keyed by field id. Each value is the same JSON shape the form-input flow expects. Keys must not collide with typed top-level fields."},"pageOnCall":{"type":"boolean","description":"When true, page the on-call owner of the primary impacted service after the incident is created. Defaults to false when omitted."},"pipelineContextTimelineMessage":{"type":"string","description":"When set, adds a timeline key event with this text after the incident is created."}},"description":"Request body for creating an incident"},"JsonNode":{"type":"object","description":"Per-key merge-patch over template-specific custom fields keyed by field id. Omit a key to leave the field unchanged; set its value to null to clear the field. Keys must not collide with typed top-level fields.","nullable":true},"IncidentResponse":{"required":["prettyId","projectId","reporter","status","title"],"type":"object","properties":{"prettyId":{"type":"string"},"projectId":{"type":"string"},"title":{"type":"string"},"summary":{"type":"string","description":"Incident summary"},"status":{"type":"string","description":"Incident status","enum":["NEW","INVESTIGATING","FIXING","MONITORING","CLOSED"]},"reporter":{"$ref":"#/components/schemas/OncallUser"},"commander":{"$ref":"#/components/schemas/OncallUser"},"impactedServices":{"type":"array","description":"Harness service identifiers for impacted services","items":{"type":"string","description":"Harness service identifiers for impacted services"}},"environments":{"type":"array","description":"Environment labels (e.g. prod, qa)","items":{"type":"string","description":"Environment labels (e.g. prod, qa)"}},"severity":{"$ref":"#/components/schemas/Severity"},"keyEvents":{"type":"array","description":"Key events timeline","items":{"$ref":"#/components/schemas/KeyEventInfo"}},"relatedActivities":{"type":"array","description":"Related activities","items":{"$ref":"#/components/schemas/RelatedActivity"}},"relatedExternalEntities":{"type":"array","description":"External items (deployments, PRs, tickets, URLs) linked to this activity","items":{"$ref":"#/components/schemas/RelatedExternalEntity"}},"rootCauseTheories":{"type":"array","description":"AI-generated root cause theories","items":{"$ref":"#/components/schemas/RootCauseTheoryInfo"}},"rootCauseTheoriesSha":{"type":"string","description":"Fingerprint of rootCauseTheories. Clients send this back when confirming, ruling out, or undoing a theory so a stale write is rejected."},"commsLinks":{"type":"array","description":"Communication links","items":{"$ref":"#/components/schemas/CommsLink"}},"videoConferenceLink":{"type":"string","description":"Video conference link for the incident"},"acknowledgedAtTimestamp":{"type":"integer","description":"Epoch timestamp when acknowledged (milliseconds)","format":"int64"},"startedAtTimestamp":{"type":"integer","description":"Epoch timestamp when work started (milliseconds)","format":"int64"},"resolvedAtTimestamp":{"type":"integer","description":"Epoch timestamp when resolved (milliseconds)","format":"int64"},"closedAtTimestamp":{"type":"integer","description":"Epoch timestamp when closed (milliseconds)","format":"int64"},"reportedAtTimestamp":{"type":"integer","description":"Epoch timestamp when reported (milliseconds)","format":"int64"},"mitigatedAtTimestamp":{"type":"integer","description":"Epoch timestamp when mitigated (milliseconds)","format":"int64"},"responderAssignedAtTimestamp":{"type":"integer","description":"Epoch timestamp when responder assigned (milliseconds)","format":"int64"},"pagedResponders":{"type":"array","description":"On-call users who were paged when pageOnCall was requested at create time. Null when pageOnCall was false or no on-call user was found. These users are not automatically assigned as incident responders.","items":{"$ref":"#/components/schemas/OncallUser"}}}},"OncallUser":{"required":["displayName","email","userId"],"type":"object","properties":{"userId":{"type":"string"},"displayName":{"type":"string"},"email":{"type":"string"}},"description":"On-call users who were paged when pageOnCall was requested at create time. Null when pageOnCall was false or no on-call user was found. These users are not automatically assigned as incident responders."},"Severity":{"type":"object","properties":{"id":{"type":"string","description":"Severity option id"},"label":{"type":"string","description":"Display label resolved from the activity template"}},"description":"Incident severity"},"KeyEventInfo":{"type":"object","properties":{"timestamp":{"type":"integer","description":"Epoch milliseconds when the event occurred","format":"int64"},"status":{"type":"string","description":"Status at the time of the event"},"details":{"type":"string","description":"Human-readable details"}},"description":"Key event in the incident timeline"},"RelatedActivity":{"required":["globalId","name","prettyId","templateTypeName","title"],"type":"object","properties":{"name":{"type":"string","description":"Relationship verb (e.g., \"relates to\")"},"templateTypeName":{"type":"string","description":"Template type name","enum":["INCIDENT","ALERT","DEPLOY","CHANGE"]},"prettyId":{"type":"string"},"globalId":{"type":"string"},"title":{"type":"string"}},"description":"Related activities"},"RelatedExternalEntity":{"required":["externalId","name","provider","relationshipGlobalId","type","url"],"type":"object","properties":{"relationshipGlobalId":{"type":"string","description":"Global ID of the link; pass this to the delete endpoint"},"name":{"type":"string","description":"Relationship verb with the activity as the subject (e.g., \"is caused by\")"},"type":{"type":"string","enum":["DEPLOYMENT","BUILD","PULL_REQUEST","TICKET","FEATURE_FLAG","LINK"]},"provider":{"type":"string","enum":["HARNESS","GITHUB","GITLAB","BITBUCKET","JIRA","SERVICENOW","GENERIC"]},"externalId":{"type":"string","description":"Canonical identifier within (type, provider), e.g. \"owner/repo#123\" or \"IR-3638\""},"url":{"type":"string"},"displayName":{"type":"string"}},"description":"An external item (deployment, PR, ticket, URL) linked to an activity"},"RootCauseTheoryInfo":{"type":"object","properties":{"id":{"type":"string","description":"Theory id"},"message":{"type":"string","description":"Theory message/description"},"status":{"type":"string","description":"Theory status (e.g. CONFIRMED, RULED_OUT, INVESTIGATING)"},"confidence":{"type":"integer","description":"Confidence level (0-100)","format":"int32"},"aiGenerated":{"type":"boolean","description":"Whether the theory was AI-generated"},"relatedActivities":{"type":"array","description":"Items the theory cites","items":{"$ref":"#/components/schemas/RelatedActivityInfo"}}},"description":"Root cause theory for an incident"},"RelatedActivityInfo":{"type":"object","properties":{"type":{"type":"string","description":"DEPLOY, PR, INCIDENT, ALERT, CHANGE, BUILD, FF, FLAG_CHANGE, TICKET or LINK"},"displayId":{"type":"string","description":"Text to show for the item"},"url":{"type":"string","description":"Link to the item"}},"description":"An item a root-cause theory cites"},"CommsLink":{"required":["linkType","url"],"type":"object","properties":{"url":{"type":"string"},"linkType":{"type":"string","enum":["WEB","SLACK"]}},"description":"Communication links"}}}}
```

## GET /api/v1/mc/incidents/{incidentId}

> Get incident detail

```json
{"openapi":"3.0.1","info":{"title":"Harness AI SRE API","version":"v1"},"servers":[{"url":"https://app.harness.io/gateway/ir/tp"}],"security":[{}],"paths":{"/api/v1/mc/incidents/{incidentId}":{"get":{"tags":["Incidents"],"summary":"Get incident detail","operationId":"get_incident","parameters":[{"name":"accountId","in":"query","description":"Harness account identifier.","required":true,"schema":{"minLength":1,"type":"string"}},{"name":"orgId","in":"query","description":"Harness organization identifier.","required":true,"schema":{"minLength":1,"type":"string"}},{"name":"projectId","in":"query","description":"Harness project identifier.","required":true,"schema":{"minLength":1,"type":"string"}},{"name":"incidentId","in":"path","description":"Incident ID, e.g. INC-123","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Incident detail","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IncidentResponse"}}}},"404":{"description":"Incident not found"}}}}},"components":{"schemas":{"IncidentResponse":{"required":["prettyId","projectId","reporter","status","title"],"type":"object","properties":{"prettyId":{"type":"string"},"projectId":{"type":"string"},"title":{"type":"string"},"summary":{"type":"string","description":"Incident summary"},"status":{"type":"string","description":"Incident status","enum":["NEW","INVESTIGATING","FIXING","MONITORING","CLOSED"]},"reporter":{"$ref":"#/components/schemas/OncallUser"},"commander":{"$ref":"#/components/schemas/OncallUser"},"impactedServices":{"type":"array","description":"Harness service identifiers for impacted services","items":{"type":"string","description":"Harness service identifiers for impacted services"}},"environments":{"type":"array","description":"Environment labels (e.g. prod, qa)","items":{"type":"string","description":"Environment labels (e.g. prod, qa)"}},"severity":{"$ref":"#/components/schemas/Severity"},"keyEvents":{"type":"array","description":"Key events timeline","items":{"$ref":"#/components/schemas/KeyEventInfo"}},"relatedActivities":{"type":"array","description":"Related activities","items":{"$ref":"#/components/schemas/RelatedActivity"}},"relatedExternalEntities":{"type":"array","description":"External items (deployments, PRs, tickets, URLs) linked to this activity","items":{"$ref":"#/components/schemas/RelatedExternalEntity"}},"rootCauseTheories":{"type":"array","description":"AI-generated root cause theories","items":{"$ref":"#/components/schemas/RootCauseTheoryInfo"}},"rootCauseTheoriesSha":{"type":"string","description":"Fingerprint of rootCauseTheories. Clients send this back when confirming, ruling out, or undoing a theory so a stale write is rejected."},"commsLinks":{"type":"array","description":"Communication links","items":{"$ref":"#/components/schemas/CommsLink"}},"videoConferenceLink":{"type":"string","description":"Video conference link for the incident"},"acknowledgedAtTimestamp":{"type":"integer","description":"Epoch timestamp when acknowledged (milliseconds)","format":"int64"},"startedAtTimestamp":{"type":"integer","description":"Epoch timestamp when work started (milliseconds)","format":"int64"},"resolvedAtTimestamp":{"type":"integer","description":"Epoch timestamp when resolved (milliseconds)","format":"int64"},"closedAtTimestamp":{"type":"integer","description":"Epoch timestamp when closed (milliseconds)","format":"int64"},"reportedAtTimestamp":{"type":"integer","description":"Epoch timestamp when reported (milliseconds)","format":"int64"},"mitigatedAtTimestamp":{"type":"integer","description":"Epoch timestamp when mitigated (milliseconds)","format":"int64"},"responderAssignedAtTimestamp":{"type":"integer","description":"Epoch timestamp when responder assigned (milliseconds)","format":"int64"},"pagedResponders":{"type":"array","description":"On-call users who were paged when pageOnCall was requested at create time. Null when pageOnCall was false or no on-call user was found. These users are not automatically assigned as incident responders.","items":{"$ref":"#/components/schemas/OncallUser"}}}},"OncallUser":{"required":["displayName","email","userId"],"type":"object","properties":{"userId":{"type":"string"},"displayName":{"type":"string"},"email":{"type":"string"}},"description":"On-call users who were paged when pageOnCall was requested at create time. Null when pageOnCall was false or no on-call user was found. These users are not automatically assigned as incident responders."},"Severity":{"type":"object","properties":{"id":{"type":"string","description":"Severity option id"},"label":{"type":"string","description":"Display label resolved from the activity template"}},"description":"Incident severity"},"KeyEventInfo":{"type":"object","properties":{"timestamp":{"type":"integer","description":"Epoch milliseconds when the event occurred","format":"int64"},"status":{"type":"string","description":"Status at the time of the event"},"details":{"type":"string","description":"Human-readable details"}},"description":"Key event in the incident timeline"},"RelatedActivity":{"required":["globalId","name","prettyId","templateTypeName","title"],"type":"object","properties":{"name":{"type":"string","description":"Relationship verb (e.g., \"relates to\")"},"templateTypeName":{"type":"string","description":"Template type name","enum":["INCIDENT","ALERT","DEPLOY","CHANGE"]},"prettyId":{"type":"string"},"globalId":{"type":"string"},"title":{"type":"string"}},"description":"Related activities"},"RelatedExternalEntity":{"required":["externalId","name","provider","relationshipGlobalId","type","url"],"type":"object","properties":{"relationshipGlobalId":{"type":"string","description":"Global ID of the link; pass this to the delete endpoint"},"name":{"type":"string","description":"Relationship verb with the activity as the subject (e.g., \"is caused by\")"},"type":{"type":"string","enum":["DEPLOYMENT","BUILD","PULL_REQUEST","TICKET","FEATURE_FLAG","LINK"]},"provider":{"type":"string","enum":["HARNESS","GITHUB","GITLAB","BITBUCKET","JIRA","SERVICENOW","GENERIC"]},"externalId":{"type":"string","description":"Canonical identifier within (type, provider), e.g. \"owner/repo#123\" or \"IR-3638\""},"url":{"type":"string"},"displayName":{"type":"string"}},"description":"An external item (deployment, PR, ticket, URL) linked to an activity"},"RootCauseTheoryInfo":{"type":"object","properties":{"id":{"type":"string","description":"Theory id"},"message":{"type":"string","description":"Theory message/description"},"status":{"type":"string","description":"Theory status (e.g. CONFIRMED, RULED_OUT, INVESTIGATING)"},"confidence":{"type":"integer","description":"Confidence level (0-100)","format":"int32"},"aiGenerated":{"type":"boolean","description":"Whether the theory was AI-generated"},"relatedActivities":{"type":"array","description":"Items the theory cites","items":{"$ref":"#/components/schemas/RelatedActivityInfo"}}},"description":"Root cause theory for an incident"},"RelatedActivityInfo":{"type":"object","properties":{"type":{"type":"string","description":"DEPLOY, PR, INCIDENT, ALERT, CHANGE, BUILD, FF, FLAG_CHANGE, TICKET or LINK"},"displayId":{"type":"string","description":"Text to show for the item"},"url":{"type":"string","description":"Link to the item"}},"description":"An item a root-cause theory cites"},"CommsLink":{"required":["linkType","url"],"type":"object","properties":{"url":{"type":"string"},"linkType":{"type":"string","enum":["WEB","SLACK"]}},"description":"Communication links"}}}}
```

## PATCH /api/v1/mc/incidents/{incidentId}

> Update incident

```json
{"openapi":"3.0.1","info":{"title":"Harness AI SRE API","version":"v1"},"servers":[{"url":"https://app.harness.io/gateway/ir/tp"}],"security":[{}],"paths":{"/api/v1/mc/incidents/{incidentId}":{"patch":{"tags":["Incidents"],"summary":"Update incident","operationId":"update_incident","parameters":[{"name":"accountId","in":"query","description":"Harness account identifier.","required":true,"schema":{"minLength":1,"type":"string"}},{"name":"orgId","in":"query","description":"Harness organization identifier.","required":true,"schema":{"minLength":1,"type":"string"}},{"name":"projectId","in":"query","description":"Harness project identifier.","required":true,"schema":{"minLength":1,"type":"string"}},{"name":"incidentId","in":"path","description":"Incident ID, e.g. INC-123","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateIncidentRequest"}}}},"responses":{"200":{"description":"Incident updated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IncidentResponse"}}}},"400":{"description":"Invalid request"},"404":{"description":"Incident not found"}}}}},"components":{"schemas":{"UpdateIncidentRequest":{"type":"object","properties":{"title":{"type":"string","description":"Incident title","nullable":true},"summary":{"type":"string","description":"Incident summary","nullable":true},"severity":{"type":"string","description":"Severity option id or label (e.g. \"1\" or \"SEV1: Major\"). Matched case-insensitively against the template's severity field options.","nullable":true},"status":{"type":"string","description":"Incident status option id or label (e.g. \"investigating\"). To close an incident, use POST /api/v1/mc/incidents/{incidentId}/close instead.","nullable":true},"impactedServices":{"type":"array","description":"Impacted services by Harness identifier, name, or ID (replaces the full list)","nullable":true,"items":{"type":"string","description":"Impacted services by Harness identifier, name, or ID (replaces the full list)","nullable":true}},"environments":{"type":"array","description":"Environments (replaces the full list), each a Harness environment identifier, name, or serialized HarnessEnvironmentId. Identifiers are matched before names. A reference shared by several scopes resolves to the closest: this project, then its org, then the account, then other projects in (org, project) order.","nullable":true,"items":{"type":"string","description":"Environments (replaces the full list), each a Harness environment identifier, name, or serialized HarnessEnvironmentId. Identifiers are matched before names. A reference shared by several scopes resolves to the closest: this project, then its org, then the account, then other projects in (org, project) order.","nullable":true}},"commanderHarnessUserId":{"type":"string","description":"Harness user id of the incident commander","nullable":true},"videoConferenceLink":{"type":"string","description":"Video conference link for the incident","nullable":true},"customFields":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/JsonNode"},"description":"Per-key merge-patch over template-specific custom fields keyed by field id. Omit a key to leave the field unchanged; set its value to null to clear the field. Keys must not collide with typed top-level fields.","nullable":true}},"description":"JSON merge-patch body for updating an incident. Omit a field to leave it unchanged; set it to null to clear it."},"JsonNode":{"type":"object","description":"Per-key merge-patch over template-specific custom fields keyed by field id. Omit a key to leave the field unchanged; set its value to null to clear the field. Keys must not collide with typed top-level fields.","nullable":true},"IncidentResponse":{"required":["prettyId","projectId","reporter","status","title"],"type":"object","properties":{"prettyId":{"type":"string"},"projectId":{"type":"string"},"title":{"type":"string"},"summary":{"type":"string","description":"Incident summary"},"status":{"type":"string","description":"Incident status","enum":["NEW","INVESTIGATING","FIXING","MONITORING","CLOSED"]},"reporter":{"$ref":"#/components/schemas/OncallUser"},"commander":{"$ref":"#/components/schemas/OncallUser"},"impactedServices":{"type":"array","description":"Harness service identifiers for impacted services","items":{"type":"string","description":"Harness service identifiers for impacted services"}},"environments":{"type":"array","description":"Environment labels (e.g. prod, qa)","items":{"type":"string","description":"Environment labels (e.g. prod, qa)"}},"severity":{"$ref":"#/components/schemas/Severity"},"keyEvents":{"type":"array","description":"Key events timeline","items":{"$ref":"#/components/schemas/KeyEventInfo"}},"relatedActivities":{"type":"array","description":"Related activities","items":{"$ref":"#/components/schemas/RelatedActivity"}},"relatedExternalEntities":{"type":"array","description":"External items (deployments, PRs, tickets, URLs) linked to this activity","items":{"$ref":"#/components/schemas/RelatedExternalEntity"}},"rootCauseTheories":{"type":"array","description":"AI-generated root cause theories","items":{"$ref":"#/components/schemas/RootCauseTheoryInfo"}},"rootCauseTheoriesSha":{"type":"string","description":"Fingerprint of rootCauseTheories. Clients send this back when confirming, ruling out, or undoing a theory so a stale write is rejected."},"commsLinks":{"type":"array","description":"Communication links","items":{"$ref":"#/components/schemas/CommsLink"}},"videoConferenceLink":{"type":"string","description":"Video conference link for the incident"},"acknowledgedAtTimestamp":{"type":"integer","description":"Epoch timestamp when acknowledged (milliseconds)","format":"int64"},"startedAtTimestamp":{"type":"integer","description":"Epoch timestamp when work started (milliseconds)","format":"int64"},"resolvedAtTimestamp":{"type":"integer","description":"Epoch timestamp when resolved (milliseconds)","format":"int64"},"closedAtTimestamp":{"type":"integer","description":"Epoch timestamp when closed (milliseconds)","format":"int64"},"reportedAtTimestamp":{"type":"integer","description":"Epoch timestamp when reported (milliseconds)","format":"int64"},"mitigatedAtTimestamp":{"type":"integer","description":"Epoch timestamp when mitigated (milliseconds)","format":"int64"},"responderAssignedAtTimestamp":{"type":"integer","description":"Epoch timestamp when responder assigned (milliseconds)","format":"int64"},"pagedResponders":{"type":"array","description":"On-call users who were paged when pageOnCall was requested at create time. Null when pageOnCall was false or no on-call user was found. These users are not automatically assigned as incident responders.","items":{"$ref":"#/components/schemas/OncallUser"}}}},"OncallUser":{"required":["displayName","email","userId"],"type":"object","properties":{"userId":{"type":"string"},"displayName":{"type":"string"},"email":{"type":"string"}},"description":"On-call users who were paged when pageOnCall was requested at create time. Null when pageOnCall was false or no on-call user was found. These users are not automatically assigned as incident responders."},"Severity":{"type":"object","properties":{"id":{"type":"string","description":"Severity option id"},"label":{"type":"string","description":"Display label resolved from the activity template"}},"description":"Incident severity"},"KeyEventInfo":{"type":"object","properties":{"timestamp":{"type":"integer","description":"Epoch milliseconds when the event occurred","format":"int64"},"status":{"type":"string","description":"Status at the time of the event"},"details":{"type":"string","description":"Human-readable details"}},"description":"Key event in the incident timeline"},"RelatedActivity":{"required":["globalId","name","prettyId","templateTypeName","title"],"type":"object","properties":{"name":{"type":"string","description":"Relationship verb (e.g., \"relates to\")"},"templateTypeName":{"type":"string","description":"Template type name","enum":["INCIDENT","ALERT","DEPLOY","CHANGE"]},"prettyId":{"type":"string"},"globalId":{"type":"string"},"title":{"type":"string"}},"description":"Related activities"},"RelatedExternalEntity":{"required":["externalId","name","provider","relationshipGlobalId","type","url"],"type":"object","properties":{"relationshipGlobalId":{"type":"string","description":"Global ID of the link; pass this to the delete endpoint"},"name":{"type":"string","description":"Relationship verb with the activity as the subject (e.g., \"is caused by\")"},"type":{"type":"string","enum":["DEPLOYMENT","BUILD","PULL_REQUEST","TICKET","FEATURE_FLAG","LINK"]},"provider":{"type":"string","enum":["HARNESS","GITHUB","GITLAB","BITBUCKET","JIRA","SERVICENOW","GENERIC"]},"externalId":{"type":"string","description":"Canonical identifier within (type, provider), e.g. \"owner/repo#123\" or \"IR-3638\""},"url":{"type":"string"},"displayName":{"type":"string"}},"description":"An external item (deployment, PR, ticket, URL) linked to an activity"},"RootCauseTheoryInfo":{"type":"object","properties":{"id":{"type":"string","description":"Theory id"},"message":{"type":"string","description":"Theory message/description"},"status":{"type":"string","description":"Theory status (e.g. CONFIRMED, RULED_OUT, INVESTIGATING)"},"confidence":{"type":"integer","description":"Confidence level (0-100)","format":"int32"},"aiGenerated":{"type":"boolean","description":"Whether the theory was AI-generated"},"relatedActivities":{"type":"array","description":"Items the theory cites","items":{"$ref":"#/components/schemas/RelatedActivityInfo"}}},"description":"Root cause theory for an incident"},"RelatedActivityInfo":{"type":"object","properties":{"type":{"type":"string","description":"DEPLOY, PR, INCIDENT, ALERT, CHANGE, BUILD, FF, FLAG_CHANGE, TICKET or LINK"},"displayId":{"type":"string","description":"Text to show for the item"},"url":{"type":"string","description":"Link to the item"}},"description":"An item a root-cause theory cites"},"CommsLink":{"required":["linkType","url"],"type":"object","properties":{"url":{"type":"string"},"linkType":{"type":"string","enum":["WEB","SLACK"]}},"description":"Communication links"}}}}
```

## POST /api/v1/mc/incidents/{incidentId}/root-cause-theories/{theoryId}/rule-out

> Rule out a root-cause theory

```json
{"openapi":"3.0.1","info":{"title":"Harness AI SRE API","version":"v1"},"servers":[{"url":"https://app.harness.io/gateway/ir/tp"}],"security":[{}],"paths":{"/api/v1/mc/incidents/{incidentId}/root-cause-theories/{theoryId}/rule-out":{"post":{"tags":["Incidents"],"summary":"Rule out a root-cause theory","operationId":"rule_out_incident_root_cause_theory","parameters":[{"name":"accountId","in":"query","description":"Harness account identifier.","required":true,"schema":{"minLength":1,"type":"string"}},{"name":"orgId","in":"query","description":"Harness organization identifier.","required":true,"schema":{"minLength":1,"type":"string"}},{"name":"projectId","in":"query","description":"Harness project identifier.","required":true,"schema":{"minLength":1,"type":"string"}},{"name":"incidentId","in":"path","description":"Incident ID, e.g. INC-123","required":true,"schema":{"type":"string"}},{"name":"theoryId","in":"path","description":"Root-cause theory id","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RootCauseTheoryStatusRequest"}}}},"responses":{"200":{"description":"Theory ruled out","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IncidentResponse"}}}},"400":{"description":"Invalid request, unknown theory, or root-cause data has changed"},"404":{"description":"Incident not found"}}}}},"components":{"schemas":{"RootCauseTheoryStatusRequest":{"required":["expectedOldRcaSha"],"type":"object","properties":{"expectedOldRcaSha":{"type":"string","description":"Fingerprint from GET incident (rootCauseTheoriesSha). A blank value is rejected."}},"description":"Request body for confirming, ruling out, or undoing a root-cause theory"},"IncidentResponse":{"required":["prettyId","projectId","reporter","status","title"],"type":"object","properties":{"prettyId":{"type":"string"},"projectId":{"type":"string"},"title":{"type":"string"},"summary":{"type":"string","description":"Incident summary"},"status":{"type":"string","description":"Incident status","enum":["NEW","INVESTIGATING","FIXING","MONITORING","CLOSED"]},"reporter":{"$ref":"#/components/schemas/OncallUser"},"commander":{"$ref":"#/components/schemas/OncallUser"},"impactedServices":{"type":"array","description":"Harness service identifiers for impacted services","items":{"type":"string","description":"Harness service identifiers for impacted services"}},"environments":{"type":"array","description":"Environment labels (e.g. prod, qa)","items":{"type":"string","description":"Environment labels (e.g. prod, qa)"}},"severity":{"$ref":"#/components/schemas/Severity"},"keyEvents":{"type":"array","description":"Key events timeline","items":{"$ref":"#/components/schemas/KeyEventInfo"}},"relatedActivities":{"type":"array","description":"Related activities","items":{"$ref":"#/components/schemas/RelatedActivity"}},"relatedExternalEntities":{"type":"array","description":"External items (deployments, PRs, tickets, URLs) linked to this activity","items":{"$ref":"#/components/schemas/RelatedExternalEntity"}},"rootCauseTheories":{"type":"array","description":"AI-generated root cause theories","items":{"$ref":"#/components/schemas/RootCauseTheoryInfo"}},"rootCauseTheoriesSha":{"type":"string","description":"Fingerprint of rootCauseTheories. Clients send this back when confirming, ruling out, or undoing a theory so a stale write is rejected."},"commsLinks":{"type":"array","description":"Communication links","items":{"$ref":"#/components/schemas/CommsLink"}},"videoConferenceLink":{"type":"string","description":"Video conference link for the incident"},"acknowledgedAtTimestamp":{"type":"integer","description":"Epoch timestamp when acknowledged (milliseconds)","format":"int64"},"startedAtTimestamp":{"type":"integer","description":"Epoch timestamp when work started (milliseconds)","format":"int64"},"resolvedAtTimestamp":{"type":"integer","description":"Epoch timestamp when resolved (milliseconds)","format":"int64"},"closedAtTimestamp":{"type":"integer","description":"Epoch timestamp when closed (milliseconds)","format":"int64"},"reportedAtTimestamp":{"type":"integer","description":"Epoch timestamp when reported (milliseconds)","format":"int64"},"mitigatedAtTimestamp":{"type":"integer","description":"Epoch timestamp when mitigated (milliseconds)","format":"int64"},"responderAssignedAtTimestamp":{"type":"integer","description":"Epoch timestamp when responder assigned (milliseconds)","format":"int64"},"pagedResponders":{"type":"array","description":"On-call users who were paged when pageOnCall was requested at create time. Null when pageOnCall was false or no on-call user was found. These users are not automatically assigned as incident responders.","items":{"$ref":"#/components/schemas/OncallUser"}}}},"OncallUser":{"required":["displayName","email","userId"],"type":"object","properties":{"userId":{"type":"string"},"displayName":{"type":"string"},"email":{"type":"string"}},"description":"On-call users who were paged when pageOnCall was requested at create time. Null when pageOnCall was false or no on-call user was found. These users are not automatically assigned as incident responders."},"Severity":{"type":"object","properties":{"id":{"type":"string","description":"Severity option id"},"label":{"type":"string","description":"Display label resolved from the activity template"}},"description":"Incident severity"},"KeyEventInfo":{"type":"object","properties":{"timestamp":{"type":"integer","description":"Epoch milliseconds when the event occurred","format":"int64"},"status":{"type":"string","description":"Status at the time of the event"},"details":{"type":"string","description":"Human-readable details"}},"description":"Key event in the incident timeline"},"RelatedActivity":{"required":["globalId","name","prettyId","templateTypeName","title"],"type":"object","properties":{"name":{"type":"string","description":"Relationship verb (e.g., \"relates to\")"},"templateTypeName":{"type":"string","description":"Template type name","enum":["INCIDENT","ALERT","DEPLOY","CHANGE"]},"prettyId":{"type":"string"},"globalId":{"type":"string"},"title":{"type":"string"}},"description":"Related activities"},"RelatedExternalEntity":{"required":["externalId","name","provider","relationshipGlobalId","type","url"],"type":"object","properties":{"relationshipGlobalId":{"type":"string","description":"Global ID of the link; pass this to the delete endpoint"},"name":{"type":"string","description":"Relationship verb with the activity as the subject (e.g., \"is caused by\")"},"type":{"type":"string","enum":["DEPLOYMENT","BUILD","PULL_REQUEST","TICKET","FEATURE_FLAG","LINK"]},"provider":{"type":"string","enum":["HARNESS","GITHUB","GITLAB","BITBUCKET","JIRA","SERVICENOW","GENERIC"]},"externalId":{"type":"string","description":"Canonical identifier within (type, provider), e.g. \"owner/repo#123\" or \"IR-3638\""},"url":{"type":"string"},"displayName":{"type":"string"}},"description":"An external item (deployment, PR, ticket, URL) linked to an activity"},"RootCauseTheoryInfo":{"type":"object","properties":{"id":{"type":"string","description":"Theory id"},"message":{"type":"string","description":"Theory message/description"},"status":{"type":"string","description":"Theory status (e.g. CONFIRMED, RULED_OUT, INVESTIGATING)"},"confidence":{"type":"integer","description":"Confidence level (0-100)","format":"int32"},"aiGenerated":{"type":"boolean","description":"Whether the theory was AI-generated"},"relatedActivities":{"type":"array","description":"Items the theory cites","items":{"$ref":"#/components/schemas/RelatedActivityInfo"}}},"description":"Root cause theory for an incident"},"RelatedActivityInfo":{"type":"object","properties":{"type":{"type":"string","description":"DEPLOY, PR, INCIDENT, ALERT, CHANGE, BUILD, FF, FLAG_CHANGE, TICKET or LINK"},"displayId":{"type":"string","description":"Text to show for the item"},"url":{"type":"string","description":"Link to the item"}},"description":"An item a root-cause theory cites"},"CommsLink":{"required":["linkType","url"],"type":"object","properties":{"url":{"type":"string"},"linkType":{"type":"string","enum":["WEB","SLACK"]}},"description":"Communication links"}}}}
```

## POST /api/v1/mc/incidents/{incidentId}/root-cause-theories/{theoryId}/undo

> Undo a root-cause theory status

```json
{"openapi":"3.0.1","info":{"title":"Harness AI SRE API","version":"v1"},"servers":[{"url":"https://app.harness.io/gateway/ir/tp"}],"security":[{}],"paths":{"/api/v1/mc/incidents/{incidentId}/root-cause-theories/{theoryId}/undo":{"post":{"tags":["Incidents"],"summary":"Undo a root-cause theory status","operationId":"undo_incident_root_cause_theory_status","parameters":[{"name":"accountId","in":"query","description":"Harness account identifier.","required":true,"schema":{"minLength":1,"type":"string"}},{"name":"orgId","in":"query","description":"Harness organization identifier.","required":true,"schema":{"minLength":1,"type":"string"}},{"name":"projectId","in":"query","description":"Harness project identifier.","required":true,"schema":{"minLength":1,"type":"string"}},{"name":"incidentId","in":"path","description":"Incident ID, e.g. INC-123","required":true,"schema":{"type":"string"}},{"name":"theoryId","in":"path","description":"Root-cause theory id","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RootCauseTheoryStatusRequest"}}}},"responses":{"200":{"description":"Theory returned to investigating","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IncidentResponse"}}}},"400":{"description":"Invalid request, unknown theory, or root-cause data has changed"},"404":{"description":"Incident not found"}}}}},"components":{"schemas":{"RootCauseTheoryStatusRequest":{"required":["expectedOldRcaSha"],"type":"object","properties":{"expectedOldRcaSha":{"type":"string","description":"Fingerprint from GET incident (rootCauseTheoriesSha). A blank value is rejected."}},"description":"Request body for confirming, ruling out, or undoing a root-cause theory"},"IncidentResponse":{"required":["prettyId","projectId","reporter","status","title"],"type":"object","properties":{"prettyId":{"type":"string"},"projectId":{"type":"string"},"title":{"type":"string"},"summary":{"type":"string","description":"Incident summary"},"status":{"type":"string","description":"Incident status","enum":["NEW","INVESTIGATING","FIXING","MONITORING","CLOSED"]},"reporter":{"$ref":"#/components/schemas/OncallUser"},"commander":{"$ref":"#/components/schemas/OncallUser"},"impactedServices":{"type":"array","description":"Harness service identifiers for impacted services","items":{"type":"string","description":"Harness service identifiers for impacted services"}},"environments":{"type":"array","description":"Environment labels (e.g. prod, qa)","items":{"type":"string","description":"Environment labels (e.g. prod, qa)"}},"severity":{"$ref":"#/components/schemas/Severity"},"keyEvents":{"type":"array","description":"Key events timeline","items":{"$ref":"#/components/schemas/KeyEventInfo"}},"relatedActivities":{"type":"array","description":"Related activities","items":{"$ref":"#/components/schemas/RelatedActivity"}},"relatedExternalEntities":{"type":"array","description":"External items (deployments, PRs, tickets, URLs) linked to this activity","items":{"$ref":"#/components/schemas/RelatedExternalEntity"}},"rootCauseTheories":{"type":"array","description":"AI-generated root cause theories","items":{"$ref":"#/components/schemas/RootCauseTheoryInfo"}},"rootCauseTheoriesSha":{"type":"string","description":"Fingerprint of rootCauseTheories. Clients send this back when confirming, ruling out, or undoing a theory so a stale write is rejected."},"commsLinks":{"type":"array","description":"Communication links","items":{"$ref":"#/components/schemas/CommsLink"}},"videoConferenceLink":{"type":"string","description":"Video conference link for the incident"},"acknowledgedAtTimestamp":{"type":"integer","description":"Epoch timestamp when acknowledged (milliseconds)","format":"int64"},"startedAtTimestamp":{"type":"integer","description":"Epoch timestamp when work started (milliseconds)","format":"int64"},"resolvedAtTimestamp":{"type":"integer","description":"Epoch timestamp when resolved (milliseconds)","format":"int64"},"closedAtTimestamp":{"type":"integer","description":"Epoch timestamp when closed (milliseconds)","format":"int64"},"reportedAtTimestamp":{"type":"integer","description":"Epoch timestamp when reported (milliseconds)","format":"int64"},"mitigatedAtTimestamp":{"type":"integer","description":"Epoch timestamp when mitigated (milliseconds)","format":"int64"},"responderAssignedAtTimestamp":{"type":"integer","description":"Epoch timestamp when responder assigned (milliseconds)","format":"int64"},"pagedResponders":{"type":"array","description":"On-call users who were paged when pageOnCall was requested at create time. Null when pageOnCall was false or no on-call user was found. These users are not automatically assigned as incident responders.","items":{"$ref":"#/components/schemas/OncallUser"}}}},"OncallUser":{"required":["displayName","email","userId"],"type":"object","properties":{"userId":{"type":"string"},"displayName":{"type":"string"},"email":{"type":"string"}},"description":"On-call users who were paged when pageOnCall was requested at create time. Null when pageOnCall was false or no on-call user was found. These users are not automatically assigned as incident responders."},"Severity":{"type":"object","properties":{"id":{"type":"string","description":"Severity option id"},"label":{"type":"string","description":"Display label resolved from the activity template"}},"description":"Incident severity"},"KeyEventInfo":{"type":"object","properties":{"timestamp":{"type":"integer","description":"Epoch milliseconds when the event occurred","format":"int64"},"status":{"type":"string","description":"Status at the time of the event"},"details":{"type":"string","description":"Human-readable details"}},"description":"Key event in the incident timeline"},"RelatedActivity":{"required":["globalId","name","prettyId","templateTypeName","title"],"type":"object","properties":{"name":{"type":"string","description":"Relationship verb (e.g., \"relates to\")"},"templateTypeName":{"type":"string","description":"Template type name","enum":["INCIDENT","ALERT","DEPLOY","CHANGE"]},"prettyId":{"type":"string"},"globalId":{"type":"string"},"title":{"type":"string"}},"description":"Related activities"},"RelatedExternalEntity":{"required":["externalId","name","provider","relationshipGlobalId","type","url"],"type":"object","properties":{"relationshipGlobalId":{"type":"string","description":"Global ID of the link; pass this to the delete endpoint"},"name":{"type":"string","description":"Relationship verb with the activity as the subject (e.g., \"is caused by\")"},"type":{"type":"string","enum":["DEPLOYMENT","BUILD","PULL_REQUEST","TICKET","FEATURE_FLAG","LINK"]},"provider":{"type":"string","enum":["HARNESS","GITHUB","GITLAB","BITBUCKET","JIRA","SERVICENOW","GENERIC"]},"externalId":{"type":"string","description":"Canonical identifier within (type, provider), e.g. \"owner/repo#123\" or \"IR-3638\""},"url":{"type":"string"},"displayName":{"type":"string"}},"description":"An external item (deployment, PR, ticket, URL) linked to an activity"},"RootCauseTheoryInfo":{"type":"object","properties":{"id":{"type":"string","description":"Theory id"},"message":{"type":"string","description":"Theory message/description"},"status":{"type":"string","description":"Theory status (e.g. CONFIRMED, RULED_OUT, INVESTIGATING)"},"confidence":{"type":"integer","description":"Confidence level (0-100)","format":"int32"},"aiGenerated":{"type":"boolean","description":"Whether the theory was AI-generated"},"relatedActivities":{"type":"array","description":"Items the theory cites","items":{"$ref":"#/components/schemas/RelatedActivityInfo"}}},"description":"Root cause theory for an incident"},"RelatedActivityInfo":{"type":"object","properties":{"type":{"type":"string","description":"DEPLOY, PR, INCIDENT, ALERT, CHANGE, BUILD, FF, FLAG_CHANGE, TICKET or LINK"},"displayId":{"type":"string","description":"Text to show for the item"},"url":{"type":"string","description":"Link to the item"}},"description":"An item a root-cause theory cites"},"CommsLink":{"required":["linkType","url"],"type":"object","properties":{"url":{"type":"string"},"linkType":{"type":"string","enum":["WEB","SLACK"]}},"description":"Communication links"}}}}
```
