{
  "openapi" : "3.0.1",
  "info" : {
    "title" : "Harness AI SRE API",
    "description" : "REST API for Harness AI SRE incidents, alerts, deploys, and activity timelines.",
    "version" : "v1"
  },
  "servers" : [ {
    "url" : "https://app.harness.io/gateway/ir/tp"
  } ],
  "security" : [ {
    "x-api-key" : [ ]
  } ],
  "paths" : {
    "/api/v1/mc/alerts/{alertId}/acknowledge" : {
      "post" : {
        "tags" : [ "Alerts" ],
        "summary" : "Acknowledge alert",
        "operationId" : "acknowledge_alert",
        "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" : "alertId",
          "in" : "path",
          "description" : "Alert ID, e.g. ALERT-123",
          "required" : true,
          "schema" : {
            "type" : "string"
          }
        } ],
        "responses" : {
          "200" : {
            "description" : "Alert acknowledged",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/AlertResponse"
                }
              }
            }
          },
          "404" : {
            "description" : "Alert not found"
          }
        }
      }
    },
    "/api/v1/mc/alerts" : {
      "get" : {
        "tags" : [ "Alerts" ],
        "summary" : "List alerts",
        "operationId" : "list_project_alerts",
        "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: triggered, acknowledged, resolved, dismissed.",
          "schema" : {
            "type" : "array",
            "items" : {
              "type" : "string"
            }
          }
        }, {
          "name" : "priority",
          "in" : "query",
          "description" : "Filter by priority 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" : "templateShortId",
          "in" : "query",
          "description" : "Filter by alert template short id (multi-value, OR-combined), e.g. PALERTAED1EE",
          "schema" : {
            "type" : "array",
            "items" : {
              "type" : "string"
            }
          }
        }, {
          "name" : "assignee",
          "in" : "query",
          "description" : "Filter by assignee Harness user id. This is who is working the alert, not who was paged.",
          "schema" : {
            "type" : "string"
          }
        }, {
          "name" : "text",
          "in" : "query",
          "description" : "Free-text search across title and description",
          "schema" : {
            "type" : "string"
          }
        }, {
          "name" : "createdAfter",
          "in" : "query",
          "description" : "ISO-8601 inclusive lower bound on createdAt, e.g. 2026-05-01T00:00:00Z",
          "schema" : {
            "type" : "string"
          }
        }, {
          "name" : "createdBefore",
          "in" : "query",
          "description" : "ISO-8601 inclusive upper bound on createdAt",
          "schema" : {
            "type" : "string"
          }
        }, {
          "name" : "sortField",
          "in" : "query",
          "description" : "Field to sort on",
          "schema" : {
            "type" : "string",
            "description" : "Field to sort alerts by",
            "enum" : [ "CREATED_AT", "PRIORITY", "STATUS" ]
          }
        }, {
          "name" : "sortDirection",
          "in" : "query",
          "description" : "Sort direction. For priority, 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 alerts",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/OffsetPaginatedResultAlertResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/mc/alerts/{alertId}/dismiss" : {
      "post" : {
        "tags" : [ "Alerts" ],
        "summary" : "Dismiss alert",
        "operationId" : "dismiss_alert",
        "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" : "alertId",
          "in" : "path",
          "description" : "Alert ID, e.g. ALERT-123",
          "required" : true,
          "schema" : {
            "type" : "string"
          }
        } ],
        "responses" : {
          "200" : {
            "description" : "Alert dismissed",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/AlertResponse"
                }
              }
            }
          },
          "404" : {
            "description" : "Alert not found"
          }
        }
      }
    },
    "/api/v1/mc/alerts/{alertId}" : {
      "get" : {
        "tags" : [ "Alerts" ],
        "summary" : "Get alert detail",
        "operationId" : "get_alert",
        "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" : "alertId",
          "in" : "path",
          "description" : "Alert ID, e.g. ALERT-123",
          "required" : true,
          "schema" : {
            "type" : "string"
          }
        } ],
        "responses" : {
          "200" : {
            "description" : "Alert detail",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/AlertResponse"
                }
              }
            }
          },
          "404" : {
            "description" : "Alert not found"
          }
        }
      },
      "patch" : {
        "tags" : [ "Alerts" ],
        "summary" : "Update alert",
        "operationId" : "update_alert",
        "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" : "alertId",
          "in" : "path",
          "description" : "Alert ID, e.g. ALERT-123",
          "required" : true,
          "schema" : {
            "type" : "string"
          }
        } ],
        "requestBody" : {
          "content" : {
            "application/json" : {
              "schema" : {
                "$ref" : "#/components/schemas/UpdateAlertRequest"
              }
            }
          }
        },
        "responses" : {
          "200" : {
            "description" : "Alert updated",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/AlertResponse"
                }
              }
            }
          },
          "400" : {
            "description" : "Invalid request"
          },
          "404" : {
            "description" : "Alert not found"
          }
        }
      }
    },
    "/api/v1/mc/alerts/{alertId}/resolve" : {
      "post" : {
        "tags" : [ "Alerts" ],
        "summary" : "Resolve alert",
        "operationId" : "resolve_alert",
        "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" : "alertId",
          "in" : "path",
          "description" : "Alert ID, e.g. ALERT-123",
          "required" : true,
          "schema" : {
            "type" : "string"
          }
        } ],
        "responses" : {
          "200" : {
            "description" : "Alert resolved",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/AlertResponse"
                }
              }
            }
          },
          "404" : {
            "description" : "Alert not found"
          }
        }
      }
    },
    "/api/v1/mc/deploys/{deployId}" : {
      "get" : {
        "tags" : [ "Deploys" ],
        "summary" : "Get deploy detail",
        "operationId" : "get_deploy",
        "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" : "deployId",
          "in" : "path",
          "description" : "Deploy ID, e.g. DEPL-24",
          "required" : true,
          "schema" : {
            "type" : "string"
          }
        } ],
        "responses" : {
          "200" : {
            "description" : "Deploy detail",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/DeployResponse"
                }
              }
            }
          },
          "404" : {
            "description" : "Deploy not found"
          }
        }
      }
    },
    "/api/v1/mc/deploys" : {
      "get" : {
        "tags" : [ "Deploys" ],
        "summary" : "List deploys",
        "operationId" : "list_deploys",
        "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" : "service",
          "in" : "query",
          "description" : "Filter by service name (multi-value, OR-combined)",
          "schema" : {
            "type" : "array",
            "items" : {
              "type" : "string"
            }
          }
        }, {
          "name" : "environment",
          "in" : "query",
          "description" : "Filter by environment label (multi-value, OR-combined)",
          "schema" : {
            "type" : "array",
            "items" : {
              "type" : "string"
            }
          }
        }, {
          "name" : "deployedAfter",
          "in" : "query",
          "description" : "ISO-8601 inclusive lower bound on deploy time, e.g. 2026-05-01T00:00:00Z",
          "schema" : {
            "type" : "string"
          }
        }, {
          "name" : "deployedBefore",
          "in" : "query",
          "description" : "ISO-8601 inclusive upper bound on deploy time",
          "schema" : {
            "type" : "string"
          }
        }, {
          "name" : "sortDirection",
          "in" : "query",
          "description" : "Sort direction on deploy time",
          "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 deploys",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/OffsetPaginatedResultDeployResponse"
                }
              }
            }
          }
        }
      }
    },
    "/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, which, as for an update, must still be INVESTIGATING and, for an Agent Account caller, AI-generated.",
        "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" : {
          "201" : {
            "description" : "Root-cause theory created",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/AddRootCauseTheoryResponse"
                }
              }
            }
          },
          "200" : {
            "description" : "A theory with this message already exists",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/AddRootCauseTheoryResponse"
                }
              }
            }
          },
          "400" : {
            "description" : "Invalid request"
          },
          "404" : {
            "description" : "Incident not found"
          }
        }
      }
    },
    "/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"
          }
        }
      }
    },
    "/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"
          }
        }
      }
    },
    "/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"
                }
              }
            }
          }
        }
      },
      "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"
          }
        }
      }
    },
    "/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"
          }
        }
      },
      "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"
          }
        }
      }
    },
    "/api/v1/mc/incidents/{incidentId}/root-cause-theories/{theoryId}/remove" : {
      "post" : {
        "tags" : [ "Incidents" ],
        "summary" : "Remove a root-cause theory",
        "description" : "Deletes a theory. Only an INVESTIGATING theory can be removed, and calls authenticated as the project's Agent Account can only remove AI-generated theories. To keep a theory on record as excluded, rule it out instead.",
        "operationId" : "remove_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/RemoveRootCauseTheoryRequest"
              }
            }
          }
        },
        "responses" : {
          "200" : {
            "description" : "Theory removed",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/IncidentResponse"
                }
              }
            }
          },
          "400" : {
            "description" : "Invalid request, or the theory can't be removed"
          },
          "404" : {
            "description" : "Incident or theory not found"
          }
        }
      }
    },
    "/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"
          }
        }
      }
    },
    "/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"
          }
        }
      }
    },
    "/api/v1/mc/incidents/{incidentId}/root-cause-theories/{theoryId}" : {
      "patch" : {
        "tags" : [ "Incidents" ],
        "summary" : "Update a root-cause theory",
        "description" : "Changes a theory's message, confidence or cited items; omitted fields are unchanged. addRelatedActivities cites more items, removeRelatedActivities drops current ones, and clearRelatedActivities drops them all; citations not named are kept. Only an INVESTIGATING theory can be changed, and calls authenticated as the project's Agent Account can only change AI-generated theories. To confirm a theory, use its confirm operation.",
        "operationId" : "update_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/UpdateRootCauseTheoryRequest"
              }
            }
          }
        },
        "responses" : {
          "200" : {
            "description" : "Theory updated",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/UpdateRootCauseTheoryResponse"
                }
              }
            }
          },
          "400" : {
            "description" : "Invalid request, the theory can't be changed, or its new message matches another theory"
          },
          "404" : {
            "description" : "Incident or theory not found"
          }
        }
      }
    },
    "/api/v1/mc/activities/{activityId}/timeline" : {
      "get" : {
        "tags" : [ "Timeline" ],
        "summary" : "Get an activity's timeline",
        "operationId" : "get_activity_timeline",
        "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" : "activityId",
          "in" : "path",
          "description" : "Activity ID, e.g. INC-123 or ALERT-456",
          "required" : true,
          "schema" : {
            "type" : "string"
          }
        }, {
          "name" : "eventGroups",
          "in" : "query",
          "description" : "Event groups to include (repeatable); omit to include every group",
          "schema" : {
            "type" : "array",
            "items" : {
              "type" : "string",
              "description" : "Named group of timeline event types",
              "enum" : [ "USER_MESSAGES", "LIFECYCLE", "PAGING", "RUNBOOKS", "AI", "TASKS", "KEY_EVENTS", "STATUS_UPDATES" ]
            }
          }
        }, {
          "name" : "cursor",
          "in" : "query",
          "description" : "Paging cursor value from the previous response.",
          "schema" : {
            "type" : "string"
          }
        }, {
          "name" : "pageSize",
          "in" : "query",
          "description" : "Page size requested",
          "schema" : {
            "type" : "integer",
            "format" : "int32"
          }
        }, {
          "name" : "sortDirection",
          "in" : "query",
          "description" : "Sort direction; defaults to DESC (newest first)",
          "schema" : {
            "type" : "string",
            "description" : "Sort direction",
            "enum" : [ "ASC", "DESC" ]
          }
        } ],
        "responses" : {
          "200" : {
            "description" : "Timeline events",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/CursorPaginatedResultStringTimelineEventResponse"
                }
              }
            }
          },
          "404" : {
            "description" : "Activity not found"
          }
        }
      },
      "post" : {
        "tags" : [ "Timeline" ],
        "summary" : "Post a markdown note to an activity's timeline",
        "description" : "Adds a markdown note to the activity's timeline. A newly posted note may take a moment to appear in a subsequent GET of the same timeline. The `message` returned here is the markdown exactly as submitted; GET returns it rendered with the author's name.",
        "operationId" : "post_activity_timeline_message",
        "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" : "activityId",
          "in" : "path",
          "description" : "Activity ID, e.g. INC-123 or ALERT-456",
          "required" : true,
          "schema" : {
            "type" : "string"
          }
        } ],
        "requestBody" : {
          "content" : {
            "application/json" : {
              "schema" : {
                "$ref" : "#/components/schemas/PostTimelineMessageRequest"
              }
            }
          }
        },
        "responses" : {
          "201" : {
            "description" : "Timeline message created",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/TimelineEventResponse"
                }
              }
            }
          },
          "400" : {
            "description" : "Invalid request"
          },
          "404" : {
            "description" : "Activity not found"
          }
        }
      }
    }
  },
  "components" : {
    "schemas" : {
      "AlertResponse" : {
        "required" : [ "prettyId", "projectId", "title" ],
        "type" : "object",
        "properties" : {
          "prettyId" : {
            "type" : "string",
            "description" : "Alert pretty id, e.g. ALERT-123"
          },
          "projectId" : {
            "type" : "string"
          },
          "title" : {
            "type" : "string"
          },
          "description" : {
            "type" : "string",
            "description" : "Alert description"
          },
          "status" : {
            "type" : "string",
            "description" : "Resolved alert status option id (e.g. triggered, resolved)"
          },
          "priority" : {
            "$ref" : "#/components/schemas/Priority"
          },
          "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)"
            }
          },
          "monitoringLink" : {
            "type" : "string",
            "description" : "Monitoring link for the alert"
          },
          "deduplicationId" : {
            "type" : "string",
            "description" : "Deduplication / correlation key"
          },
          "quietMode" : {
            "type" : "boolean",
            "description" : "When true, suppresses notifications and on-call pages"
          },
          "assignee" : {
            "$ref" : "#/components/schemas/OncallUser"
          },
          "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"
            }
          },
          "commsLinks" : {
            "type" : "array",
            "description" : "Communication links (includes a WEB link to the alert)",
            "items" : {
              "$ref" : "#/components/schemas/CommsLink"
            }
          },
          "createdAtTimestamp" : {
            "type" : "integer",
            "description" : "Epoch timestamp when created (milliseconds)",
            "format" : "int64"
          },
          "startedAtTimestamp" : {
            "type" : "integer",
            "description" : "Epoch timestamp when the alert started (milliseconds)",
            "format" : "int64"
          },
          "acknowledgedAtTimestamp" : {
            "type" : "integer",
            "description" : "Epoch timestamp when acknowledged (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"
          }
        }
      },
      "CommsLink" : {
        "required" : [ "linkType", "url" ],
        "type" : "object",
        "properties" : {
          "url" : {
            "type" : "string"
          },
          "linkType" : {
            "type" : "string",
            "enum" : [ "WEB", "SLACK" ]
          }
        },
        "description" : "Communication links"
      },
      "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"
      },
      "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."
      },
      "Priority" : {
        "type" : "object",
        "properties" : {
          "id" : {
            "type" : "string",
            "description" : "Priority option id"
          },
          "label" : {
            "type" : "string",
            "description" : "Display label resolved from the activity template"
          }
        },
        "description" : "Alert priority"
      },
      "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"
      },
      "OffsetPaginatedResultAlertResponse" : {
        "type" : "object",
        "properties" : {
          "entities" : {
            "type" : "array",
            "items" : {
              "$ref" : "#/components/schemas/AlertResponse"
            }
          },
          "totalCount" : {
            "type" : "integer",
            "format" : "int32"
          }
        }
      },
      "UpdateAlertRequest" : {
        "type" : "object",
        "properties" : {
          "title" : {
            "type" : "string",
            "description" : "Alert title",
            "nullable" : true
          },
          "description" : {
            "type" : "string",
            "description" : "Alert description",
            "nullable" : true
          },
          "priority" : {
            "type" : "string",
            "description" : "Alert priority option id (p1_critical, p2_error, p3_warning, p4_info). To acknowledge, resolve, or dismiss an alert, use the dedicated lifecycle endpoints instead.",
            "nullable" : true
          },
          "status" : {
            "type" : "string",
            "description" : "Alert status option id. To acknowledge, resolve, or dismiss, use POST /api/v1/mc/alerts/{alertId}/acknowledge|resolve|dismiss. Reopening to triggered is allowed here.",
            "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" : "Harness environment identifiers (replaces the full list)",
            "nullable" : true,
            "items" : {
              "type" : "string",
              "description" : "Harness environment identifiers (replaces the full list)",
              "nullable" : true
            }
          },
          "monitoringLink" : {
            "type" : "string",
            "description" : "Monitoring link for the alert",
            "nullable" : true
          },
          "quietMode" : {
            "type" : "boolean",
            "description" : "When true, suppresses user notifications and on-call pages for this alert",
            "nullable" : true
          },
          "assigneeHarnessUserId" : {
            "type" : "string",
            "description" : "Harness user id of the person working this alert. Does not page them and does not change who was paged. Omit to leave unchanged; null clears it.",
            "nullable" : true
          }
        },
        "description" : "JSON merge-patch body for updating an alert. Omit a field to leave it unchanged; set it to null to clear it."
      },
      "BuildVersionInfo" : {
        "type" : "object",
        "properties" : {
          "service" : {
            "type" : "string",
            "description" : "Service name"
          },
          "version" : {
            "type" : "string",
            "description" : "Deployed version"
          },
          "commitSha" : {
            "type" : "string",
            "description" : "Commit SHA"
          },
          "branch" : {
            "type" : "string",
            "description" : "Source branch"
          },
          "repositoryName" : {
            "type" : "string",
            "description" : "Build repository name"
          },
          "repositoryUrl" : {
            "type" : "string",
            "description" : "Build repository URL"
          }
        },
        "description" : "A service and the version that was deployed"
      },
      "DeployResponse" : {
        "required" : [ "id", "projectId" ],
        "type" : "object",
        "properties" : {
          "id" : {
            "type" : "string",
            "description" : "Deploy id (activity pretty id, e.g. DEPL-24)"
          },
          "projectId" : {
            "type" : "string"
          },
          "title" : {
            "type" : "string",
            "description" : "Deploy title"
          },
          "summary" : {
            "type" : "string",
            "description" : "Deploy summary"
          },
          "status" : {
            "type" : "string",
            "description" : "Deploy status",
            "enum" : [ "PENDING", "IN_PROGRESS", "SUCCESS", "FAILED", "ROLLED_BACK" ]
          },
          "environments" : {
            "type" : "array",
            "description" : "Environment labels the deploy targeted (e.g. prod, qa)",
            "items" : {
              "type" : "string",
              "description" : "Environment labels the deploy targeted (e.g. prod, qa)"
            }
          },
          "buildVersions" : {
            "type" : "array",
            "description" : "Services and versions included in the deploy",
            "items" : {
              "$ref" : "#/components/schemas/BuildVersionInfo"
            }
          },
          "deployTimestamp" : {
            "type" : "integer",
            "description" : "Epoch timestamp of the deploy (milliseconds)",
            "format" : "int64"
          },
          "webLink" : {
            "type" : "string",
            "description" : "Web link to the deploy activity"
          },
          "relatedActivities" : {
            "type" : "array",
            "description" : "Related activities",
            "items" : {
              "$ref" : "#/components/schemas/RelatedActivity"
            }
          }
        }
      },
      "OffsetPaginatedResultDeployResponse" : {
        "type" : "object",
        "properties" : {
          "entities" : {
            "type" : "array",
            "items" : {
              "$ref" : "#/components/schemas/DeployResponse"
            }
          },
          "totalCount" : {
            "type" : "integer",
            "format" : "int32"
          }
        }
      },
      "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"
      },
      "RelatedActivityInfo" : {
        "type" : "object",
        "properties" : {
          "type" : {
            "type" : "string",
            "description" : "DEPLOY, PR, INCIDENT, ALERT, CHANGE, BUILD, FF, FLAG_CHANGE, TICKET or LINK"
          },
          "id" : {
            "type" : "string",
            "description" : "The item's id as a theory's related activities take it: its URL, or its public ID when it has no URL. Pass it back to remove the citation."
          },
          "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"
      },
      "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), or <org>/<project>/<repository identifier>#<PR number> for one in another project. 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"
      },
      "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"
      },
      "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"
      },
      "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"
            }
          }
        }
      },
      "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"
      },
      "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"
      },
      "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
      },
      "OffsetPaginatedResultIncidentResponse" : {
        "type" : "object",
        "properties" : {
          "entities" : {
            "type" : "array",
            "items" : {
              "$ref" : "#/components/schemas/IncidentResponse"
            }
          },
          "totalCount" : {
            "type" : "integer",
            "format" : "int32"
          }
        }
      },
      "RemoveRootCauseTheoryRequest" : {
        "required" : [ "reason" ],
        "type" : "object",
        "properties" : {
          "reason" : {
            "type" : "string",
            "description" : "Why the theory no longer holds; recorded with the change"
          }
        },
        "description" : "Request body for removing a root-cause theory"
      },
      "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."
      },
      "UpdateRootCauseTheoryResponse" : {
        "type" : "object",
        "properties" : {
          "theory" : {
            "$ref" : "#/components/schemas/RootCauseTheoryInfo"
          },
          "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"
            }
          },
          "notRemoved" : {
            "type" : "array",
            "description" : "Items to remove that the theory doesn't cite",
            "items" : {
              "$ref" : "#/components/schemas/RelatedActivityIssue"
            }
          }
        },
        "description" : "Result of changing a root-cause theory"
      },
      "UpdateRootCauseTheoryRequest" : {
        "type" : "object",
        "properties" : {
          "message" : {
            "type" : "string",
            "description" : "The new theory text"
          },
          "confidence" : {
            "type" : "integer",
            "description" : "Confidence level (0-100)",
            "format" : "int32"
          },
          "addRelatedActivities" : {
            "type" : "array",
            "description" : "Items to cite in addition to the current ones. Each is checked against the incident's project; any that can't be found are returned in notLinked.",
            "items" : {
              "$ref" : "#/components/schemas/RelatedActivityReference"
            }
          },
          "removeRelatedActivities" : {
            "type" : "array",
            "description" : "Current citations to drop, each named by the type and id of the theory's relatedActivities entry; any the theory doesn't cite are returned in notRemoved. An item can't be both added and removed.",
            "items" : {
              "$ref" : "#/components/schemas/RelatedActivityReference"
            }
          },
          "clearRelatedActivities" : {
            "type" : "boolean",
            "description" : "true to drop every current citation; with addRelatedActivities, replaces them. Can't be combined with removeRelatedActivities."
          },
          "reason" : {
            "type" : "string",
            "description" : "Why the theory is being changed; recorded with the change"
          }
        },
        "description" : "Request body for changing a root-cause theory. Omitted fields are unchanged; at least one of message, confidence, addRelatedActivities, removeRelatedActivities or clearRelatedActivities is required. Confirm a theory with its confirm operation."
      },
      "CursorPaginatedResultStringTimelineEventResponse" : {
        "type" : "object",
        "properties" : {
          "nextPageCursor" : {
            "type" : "string"
          },
          "hasMoreResults" : {
            "type" : "boolean"
          },
          "results" : {
            "type" : "array",
            "items" : {
              "$ref" : "#/components/schemas/TimelineEventResponse"
            }
          },
          "totalCount" : {
            "type" : "integer",
            "format" : "int64"
          },
          "totalCountApproximate" : {
            "type" : "integer",
            "format" : "int64"
          }
        }
      },
      "TimelineEventResponse" : {
        "type" : "object",
        "properties" : {
          "eventId" : {
            "type" : "string",
            "description" : "Unique identifier for this timeline event"
          },
          "eventType" : {
            "type" : "string",
            "description" : "The type of event, e.g. ONCALL_PAGED"
          },
          "timestamp" : {
            "type" : "integer",
            "description" : "Epoch milliseconds when the event occurred",
            "format" : "int64"
          },
          "actor" : {
            "type" : "string",
            "description" : "Display name of whoever or whatever produced the event, when known"
          },
          "message" : {
            "type" : "string",
            "description" : "The event's content, rendered as markdown"
          }
        },
        "description" : "An event in an activity's timeline"
      },
      "PostTimelineMessageRequest" : {
        "required" : [ "message" ],
        "type" : "object",
        "properties" : {
          "message" : {
            "type" : "string",
            "description" : "Markdown note to post to the timeline"
          }
        },
        "description" : "Request body for posting a markdown note to an activity's timeline"
      }
    },
    "securitySchemes" : {
      "x-api-key" : {
        "type" : "apiKey",
        "description" : "API key is a token provided while making the API calls. This is used to authenticate the client at the exposed endpoint.",
        "name" : "x-api-key",
        "in" : "header"
      }
    }
  },
  "x-enable-proxy" : true
}