{
  "components": {
    "schemas": {
      "LabelFilterLabelMatcher": {
        "description": "One matcher, and which of the alert's two label sets it applies to.",
        "properties": {
          "filter_target": {
            "allOf": [
              {
                "$ref": "#/components/schemas/LabelMatcherFilterTarget"
              }
            ],
            "description": "Which of the alert's label sets this matcher applies to. Required."
          },
          "matcher": {
            "allOf": [
              {
                "$ref": "#/components/schemas/commonPromQLMatcher"
              }
            ],
            "description": "The label name, value and comparison to apply."
          }
        },
        "type": "object"
      },
      "LabelFilterMatchStrategy": {
        "description": "How closely an alert's labels must correspond to the matchers.\n\n - SUBSET_MATCH: EQUAL matchers require the labels to contain all the given labels, but\nthe alert may carry more. NOT_EQUAL excludes an alert when the labels\nmatch any matcher.\n - EXACT_MATCH: EQUAL matchers require exactly the provided labels, no more or less.\nNOT_EQUAL excludes an alert only when every NOT_EQUAL matcher applies.",
        "enum": [
          "SUBSET_MATCH",
          "EXACT_MATCH"
        ],
        "type": "string"
      },
      "LabelMatcherFilterTarget": {
        "description": "The label set a matcher reads. An alert carries the labels of the\nsignal that fired (`SIGNAL`) and the labels of the monitor or SLO\nthat raised it (`MONITOR`); the two are matched independently.",
        "enum": [
          "MONITOR",
          "SIGNAL"
        ],
        "type": "string"
      },
      "MetricUsageQueryExecutionCountsByType": {
        "properties": {
          "dashboard": {
            "format": "int32",
            "type": "integer"
          },
          "explorer": {
            "format": "int32",
            "type": "integer"
          },
          "external": {
            "format": "int32",
            "type": "integer"
          }
        },
        "type": "object"
      },
      "MetricUsageReferenceCountsByType": {
        "properties": {
          "aggregation_rules": {
            "format": "int32",
            "type": "integer"
          },
          "dashboards": {
            "format": "int32",
            "type": "integer"
          },
          "drop_rules": {
            "format": "int32",
            "type": "integer"
          },
          "monitors": {
            "format": "int32",
            "type": "integer"
          },
          "recording_rules": {
            "format": "int32",
            "type": "integer"
          }
        },
        "type": "object"
      },
      "RuleEvaluationRuleType": {
        "enum": [
          "MONITOR",
          "RECORDING"
        ],
        "type": "string"
      },
      "apiError": {
        "properties": {
          "message": {
            "description": "An error message describing what went wrong.",
            "type": "string"
          }
        },
        "type": "object"
      },
      "commonPromQLMatcher": {
        "properties": {
          "name": {
            "description": "Prometheus label name for the matcher",
            "type": "string"
          },
          "type": {
            "allOf": [
              {
                "$ref": "#/components/schemas/commonPromQLMatcherType"
              }
            ],
            "description": "The type of match to be performed"
          },
          "value": {
            "description": "Prometheus label value for the matcher",
            "type": "string"
          }
        },
        "type": "object"
      },
      "commonPromQLMatcherType": {
        "enum": [
          "MatchEqual",
          "MatchRegexp",
          "MatchNotEqual",
          "MatchNotRegexp"
        ],
        "type": "string"
      },
      "configv1PageResult": {
        "properties": {
          "next_token": {
            "description": "An opaque page token that identifies the next page of items that the\nclient should request. An empty value indicates that there are no\nmore items to return.",
            "type": "string"
          }
        },
        "type": "object"
      },
      "datav1FiringStatus": {
        "description": "Whether an alert is currently firing or has resolved.",
        "enum": [
          "RESOLVED",
          "FIRING"
        ],
        "type": "string"
      },
      "datav1LabelFilter": {
        "description": "A set of label matchers evaluated together as a single AND clause.",
        "properties": {
          "label_matchers": {
            "description": "The matchers that make up this clause. An alert must satisfy all of\nthem. A filter with no matchers is ignored rather than matching\neverything.",
            "items": {
              "$ref": "#/components/schemas/LabelFilterLabelMatcher"
            },
            "type": "array"
          },
          "match_strategy": {
            "allOf": [
              {
                "$ref": "#/components/schemas/LabelFilterMatchStrategy"
              }
            ],
            "description": "How closely an alert's labels must correspond to `label_matchers`.\nDefaults to `SUBSET_MATCH` when unset, whether or not `label_matchers`\nis populated. Applied per target: a filter that only names monitor\nlabels places no constraint on the alert's signal labels under either\nstrategy."
          }
        },
        "type": "object"
      },
      "datav1Severity": {
        "description": "The severity an alert fired at.",
        "enum": [
          "WARN",
          "CRITICAL"
        ],
        "type": "string"
      },
      "statev1ListMetricUsagesByLabelNameResponse": {
        "properties": {
          "page": {
            "$ref": "#/components/schemas/configv1PageResult"
          },
          "usages": {
            "items": {
              "$ref": "#/components/schemas/statev1MetricUsageByLabelName"
            },
            "type": "array"
          }
        },
        "type": "object"
      },
      "statev1ListMetricUsagesByMetricNameResponse": {
        "properties": {
          "page": {
            "$ref": "#/components/schemas/configv1PageResult"
          },
          "usages": {
            "items": {
              "$ref": "#/components/schemas/statev1MetricUsageByMetricName"
            },
            "type": "array"
          }
        },
        "type": "object"
      },
      "statev1ListMonitorStatusesRequest": {
        "properties": {
          "collection_slugs": {
            "description": "Count only alerts from monitors owned by one of these collections.",
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "include_signals": {
            "description": "Include each monitor's firing signals.",
            "type": "boolean"
          },
          "label_filters": {
            "description": "Each LabelFilter is one AND clause; the clauses are OR'ed together.\nApplied to alerts before they roll up into monitor statuses, with the same\nsemantics as ListAlerts.",
            "items": {
              "$ref": "#/components/schemas/datav1LabelFilter"
            },
            "type": "array"
          },
          "monitor_slugs": {
            "description": "Return only these monitors. When empty, returns every monitor with a firing\nalert that matches the other filters. A named monitor with no firing alert\nmatching the filters is returned as passing, even when it has firing alerts\nthe filters exclude. Slugs are not checked against existing monitors, so a\nslug that names no monitor is also returned as passing.",
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "severity": {
            "allOf": [
              {
                "$ref": "#/components/schemas/datav1Severity"
              }
            ],
            "description": "Count only alerts of this severity. Unset counts both."
          },
          "team_slugs": {
            "description": "Count only alerts from monitors owned by one of these teams.",
            "items": {
              "type": "string"
            },
            "type": "array"
          }
        },
        "type": "object"
      },
      "statev1ListMonitorStatusesResponse": {
        "properties": {
          "monitor_statuses": {
            "description": "One entry per monitor with at least one firing alert matching the filters,\nplus a passing entry for each of `monitor_slugs` that has none, ordered by\nmonitor slug. Other monitors are omitted.",
            "items": {
              "$ref": "#/components/schemas/statev1MonitorStatus"
            },
            "type": "array"
          }
        },
        "type": "object"
      },
      "statev1ListRuleEvaluationsResponse": {
        "properties": {
          "page": {
            "$ref": "#/components/schemas/configv1PageResult"
          },
          "rule_evaluations": {
            "items": {
              "$ref": "#/components/schemas/statev1RuleEvaluation"
            },
            "type": "array"
          }
        },
        "type": "object"
      },
      "statev1MetricUsage": {
        "properties": {
          "query_execution_counts_by_type": {
            "$ref": "#/components/schemas/MetricUsageQueryExecutionCountsByType"
          },
          "reference_counts_by_type": {
            "$ref": "#/components/schemas/MetricUsageReferenceCountsByType"
          },
          "total_query_executions": {
            "format": "int32",
            "type": "integer"
          },
          "total_references": {
            "format": "int32",
            "type": "integer"
          },
          "total_unique_users": {
            "format": "int32",
            "type": "integer"
          },
          "utility_score": {
            "format": "double",
            "type": "number"
          }
        },
        "type": "object"
      },
      "statev1MetricUsageByLabelName": {
        "properties": {
          "dpps": {
            "format": "double",
            "type": "number"
          },
          "label_name": {
            "type": "string"
          },
          "percent_of_series_with_label_name": {
            "description": "Percent of persisted series observed to have the label name.\nReturns in format: [0.0, 100.0]",
            "format": "double",
            "type": "number"
          },
          "total_unique_values": {
            "format": "int32",
            "type": "integer"
          },
          "usage": {
            "$ref": "#/components/schemas/statev1MetricUsage"
          }
        },
        "type": "object"
      },
      "statev1MetricUsageByMetricName": {
        "properties": {
          "dpps": {
            "format": "double",
            "type": "number"
          },
          "metric_name": {
            "type": "string"
          },
          "usage": {
            "$ref": "#/components/schemas/statev1MetricUsage"
          }
        },
        "type": "object"
      },
      "statev1MonitorStatus": {
        "description": "The state of one monitor under the request's filters, rolled up from its\nfiring alerts that match them. A monitor whose firing alerts the filters all\nexclude is reported as passing. A passing monitor has a `RESOLVED` firing\nstatus, no severity and no signals.",
        "properties": {
          "firing_status": {
            "allOf": [
              {
                "$ref": "#/components/schemas/datav1FiringStatus"
              }
            ],
            "description": "`FIRING` when the monitor has at least one firing alert matching the\nrequest's filters, and `RESOLVED` when it has none. `RESOLVED` does not\nmean the monitor has no firing alerts outside the filters."
          },
          "monitor_slug": {
            "description": "The slug of the monitor.",
            "type": "string"
          },
          "muted": {
            "description": "True when every matching firing alert is muted.",
            "type": "boolean"
          },
          "severity": {
            "allOf": [
              {
                "$ref": "#/components/schemas/datav1Severity"
              }
            ],
            "description": "The most severe matching unmuted alert, or the most severe matching alert\nwhen all are muted. Unset when the monitor is passing."
          },
          "signals": {
            "description": "The monitor's firing signals that match the filters, ordered by their\nlabels. Set only with `include_signals`.",
            "items": {
              "$ref": "#/components/schemas/statev1SignalStatus"
            },
            "type": "array"
          }
        },
        "type": "object"
      },
      "statev1RuleEvaluation": {
        "properties": {
          "count": {
            "description": "The number of rule evaluation issues occurred over last 5 minutes.",
            "format": "int32",
            "type": "integer"
          },
          "detected_at": {
            "description": "Timestamp when the rule evaluation issues are detected.\nRule evaluations issues are aggregated over last 5 minute leading up to detected_at.",
            "format": "date-time",
            "type": "string"
          },
          "message": {
            "description": "Detailed message related to rule evaluation issue. See \"Admin \u003e Evaluation failures\" in the Palo Alto Networks documentation for more information.",
            "type": "string"
          },
          "rule_slug": {
            "description": "Unique identifier of the rule.",
            "type": "string"
          },
          "rule_type": {
            "allOf": [
              {
                "$ref": "#/components/schemas/RuleEvaluationRuleType"
              }
            ],
            "description": "Type of the rule.",
            "example": "MONITOR"
          },
          "severity": {
            "allOf": [
              {
                "$ref": "#/components/schemas/statev1RuleEvaluationSeverity"
              }
            ],
            "description": "Severity of the rule evaluation issue. WARNING-severity issues are only returned when\ninclude_warnings is set on the request.",
            "example": "SEVERITY_ERROR"
          }
        },
        "type": "object"
      },
      "statev1RuleEvaluationSeverity": {
        "description": "Severity of the rule evaluation issue.\n\n - SEVERITY_ERROR: A hard evaluation failure.\n - SEVERITY_WARNING: A non-fatal warning; the evaluation succeeded but something needs attention.",
        "enum": [
          "SEVERITY_ERROR",
          "SEVERITY_WARNING"
        ],
        "type": "string"
      },
      "statev1SeverityStatus": {
        "description": "The firing alert of one severity of a signal.",
        "properties": {
          "muted": {
            "description": "Whether notifications for the alert are muted.",
            "type": "boolean"
          },
          "severity": {
            "allOf": [
              {
                "$ref": "#/components/schemas/datav1Severity"
              }
            ],
            "description": "The severity the alert fired at."
          }
        },
        "type": "object"
      },
      "statev1SignalStatus": {
        "description": "One firing signal of a monitor.",
        "properties": {
          "severities": {
            "description": "The signal's firing severities, most severe first.",
            "items": {
              "$ref": "#/components/schemas/statev1SeverityStatus"
            },
            "type": "array"
          },
          "signal_labels": {
            "additionalProperties": {
              "type": "string"
            },
            "description": "The labels of the signal.",
            "type": "object"
          }
        },
        "type": "object"
      }
    },
    "securitySchemes": {
      "ApiKeyAuth": {
        "description": "Chronosphere API token",
        "in": "header",
        "name": "API-Token",
        "type": "apiKey"
      }
    }
  },
  "info": {
    "description": "\nThe State API provides HTTP/JSON REST endpoints for accessing the runtime state\nof the Chronosphere system.\n\nUse this link to download the raw Swagger specification:\n\u003ca href=\"/api/v1/state/swagger.json\"\u003e/api/v1/state/swagger.json\u003c/a\u003e\n",
    "title": "State V1 API",
    "version": "v1"
  },
  "openapi": "3.0.3",
  "paths": {
    "/api/v1/state/metric-usages-by-label-name": {
      "get": {
        "operationId": "ListMetricUsagesByLabelName",
        "parameters": [
          {
            "description": "Sets the preferred number of items to return per page. If set to `0`, the\nserver will use its default value. Regardless of the value specified, clients\nmust never assume how many items will be returned.",
            "in": "query",
            "name": "page.max_size",
            "schema": {
              "format": "int64",
              "type": "integer"
            }
          },
          {
            "description": "An opaque page token that identifies which page the client should request.\nAn empty value indicates the first page.",
            "in": "query",
            "name": "page.token",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "order.ascending",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "in": "query",
            "name": "order.by",
            "schema": {
              "enum": [
                "VALUABLE",
                "DPPS",
                "UTILITY",
                "REFERENCES",
                "EXECUTIONS",
                "UNIQUE_VALUES",
                "UNIQUE_USERS"
              ],
              "type": "string"
            }
          },
          {
            "description": "Controls the time range over which query executions are included in usages. Defaults to `2592000` (30 days).",
            "in": "query",
            "name": "lookback_secs",
            "schema": {
              "format": "int32",
              "type": "integer"
            }
          },
          {
            "description": "Glob match string for filtering results by label name.",
            "in": "query",
            "name": "label_name_glob",
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "If `true`, responses include the fields `reference_counts_by_type` and `query_execution_counts_by_type`. If `false`, these fields are returned empty.",
            "in": "query",
            "name": "include_counts_by_type",
            "schema": {
              "type": "boolean"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/statev1ListMetricUsagesByLabelNameResponse"
                }
              }
            },
            "description": "A successful response."
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/apiError"
                }
              }
            },
            "description": "An unexpected error response."
          }
        },
        "tags": [
          "MetricUsagesByLabelName"
        ]
      }
    },
    "/api/v1/state/metric-usages-by-metric-name": {
      "get": {
        "operationId": "ListMetricUsagesByMetricName",
        "parameters": [
          {
            "description": "Sets the preferred number of items to return per page. If set to `0`, the\nserver will use its default value. Regardless of the value specified, clients\nmust never assume how many items will be returned.",
            "in": "query",
            "name": "page.max_size",
            "schema": {
              "format": "int64",
              "type": "integer"
            }
          },
          {
            "description": "An opaque page token that identifies which page the client should request.\nAn empty value indicates the first page.",
            "in": "query",
            "name": "page.token",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "order.ascending",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "in": "query",
            "name": "order.by",
            "schema": {
              "enum": [
                "VALUABLE",
                "DPPS",
                "UTILITY",
                "REFERENCES",
                "EXECUTIONS",
                "UNIQUE_VALUES",
                "UNIQUE_USERS"
              ],
              "type": "string"
            }
          },
          {
            "description": "Controls the time range over which query executions are included in usages. Defaults to `2592000` (30 days).",
            "in": "query",
            "name": "lookback_secs",
            "schema": {
              "format": "int32",
              "type": "integer"
            }
          },
          {
            "description": "Glob match string for filtering results by metric name.",
            "in": "query",
            "name": "metric_name_glob",
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "If `true`, responses include the fields `reference_counts_by_type` and `query_execution_counts_by_type`. If `false`, these fields are returned empty.",
            "in": "query",
            "name": "include_counts_by_type",
            "schema": {
              "type": "boolean"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/statev1ListMetricUsagesByMetricNameResponse"
                }
              }
            },
            "description": "A successful response."
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/apiError"
                }
              }
            },
            "description": "An unexpected error response."
          }
        },
        "tags": [
          "MetricUsagesByMetricName"
        ]
      }
    },
    "/api/v1/state/monitor-statuses": {
      "post": {
        "description": "Lists monitors that have at least one firing alert matching the request's\nfilters, and how they are firing, plus each requested monitor that is\npassing under those filters. A read served by POST, because its label\nfilters cannot be expressed as query parameters.",
        "operationId": "ListMonitorStatuses",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/statev1ListMonitorStatusesRequest"
              }
            }
          },
          "required": true,
          "x-originalParamName": "body"
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/statev1ListMonitorStatusesResponse"
                }
              }
            },
            "description": "A successful response."
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/apiError"
                }
              }
            },
            "description": "An unexpected error response."
          }
        },
        "tags": [
          "MonitorStatuses"
        ]
      }
    },
    "/api/v1/state/rule-evaluations": {
      "get": {
        "operationId": "ListRuleEvaluations",
        "parameters": [
          {
            "description": "Sets the preferred number of items to return per page. If set to `0`, the\nserver will use its default value. Regardless of the value specified, clients\nmust never assume how many items will be returned.",
            "in": "query",
            "name": "page.max_size",
            "schema": {
              "format": "int64",
              "type": "integer"
            }
          },
          {
            "description": "An opaque page token that identifies which page the client should request.\nAn empty value indicates the first page.",
            "in": "query",
            "name": "page.token",
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "When false (default), only failures are returned. Set true to also include non-fatal warnings.",
            "in": "query",
            "name": "include_warnings",
            "schema": {
              "type": "boolean"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/statev1ListRuleEvaluationsResponse"
                }
              }
            },
            "description": "A successful response."
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/apiError"
                }
              }
            },
            "description": "An unexpected error response."
          }
        },
        "tags": [
          "RuleEvaluations"
        ]
      }
    }
  },
  "security": [
    {
      "ApiKeyAuth": []
    }
  ],
  "servers": [
    {
      "url": "https://{tenant}.chronosphere.io",
      "variables": {
        "tenant": {
          "default": "tenant",
          "description": "tenant ID assigned by the service provider"
        }
      }
    }
  ],
  "tags": [
    {
      "name": "StateV1"
    }
  ]
}