{ "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "https://raw.githubusercontent.com/api-evangelist/harness/main/json-schema/harness-alert-list-response-schema.json", "title": "AlertListResponse", "x-generated": "2026-10-04", "x-method": "derived", "x-generator": "derive-json-schema.py", "x-source": "openapi/harness-autostopping-alerts-api-openapi.yml#/components/schemas/AlertListResponse", "type": "object", "required": [ "response" ], "properties": { "response": { "type": "object", "required": [ "records", "total", "pages" ], "properties": { "records": { "type": "array", "description": "List of alerts matching the search criteria", "items": { "$ref": "#/$defs/Alert" } }, "total": { "type": "integer", "description": "Total number of alerts matching the criteria" }, "pages": { "type": "integer", "description": "Total number of pages" } } } }, "$defs": { "Alert": { "type": "object", "properties": { "id": { "type": "string", "description": "Unique identifier of the alert" }, "account_id": { "type": "string", "description": "ID of the account this alert belongs to" }, "name": { "type": "string", "description": "Name of the alert" }, "enabled": { "type": "boolean", "description": "Whether the alert is enabled" }, "entity_type": { "type": "string", "description": "Type of entity the alert is associated with", "enum": [ "autostopping_rule" ] }, "recipients": { "type": "array", "description": "List of notification recipients", "items": { "$ref": "#/$defs/AlertRecipient" } }, "events": { "type": "array", "description": "List of events that trigger the alert", "items": { "$ref": "#/$defs/AlertEvent" } }, "created_at": { "type": "string", "format": "date-time", "description": "Timestamp when the alert was created" }, "updated_at": { "type": "string", "format": "date-time", "description": "Timestamp when the alert was last updated" }, "associated_entities": { "type": "array", "description": "List of entities associated with this alert", "items": { "$ref": "#/$defs/AlertEntity" } } } }, "AlertEntity": { "description": "Defines which entities (AutoStopping rules) the alert applies to. Use 'all' to apply to all rules, or 'specific' with entity_id to target specific rules.", "oneOf": [ { "$ref": "#/$defs/AlertEntityAll" }, { "$ref": "#/$defs/AlertEntitySpecific" } ] }, "AlertEntityAll": { "type": "object", "description": "Apply alert to all AutoStopping rules in the account", "required": [ "relation_type" ], "properties": { "id": { "type": "string", "description": "Unique identifier of the alert entity (auto-generated, not required in requests)" }, "alert_id": { "type": "string", "description": "ID of the parent alert (auto-generated, not required in requests)" }, "relation_type": { "type": "string", "description": "Must be 'all' to apply alert to all AutoStopping rules", "enum": [ "all" ] } } }, "AlertEntitySpecific": { "type": "object", "description": "Apply alert to a specific AutoStopping rule by ID", "required": [ "relation_type", "entity_id" ], "properties": { "id": { "type": "string", "description": "Unique identifier of the alert entity (auto-generated, not required in requests)" }, "alert_id": { "type": "string", "description": "ID of the parent alert (auto-generated, not required in requests)" }, "relation_type": { "type": "string", "description": "Must be 'specific' to target individual rules", "enum": [ "specific" ] }, "entity_id": { "type": "string", "description": "ID of the specific AutoStopping rule. This is the rule ID (numeric string)." } } }, "AlertEvent": { "type": "object", "required": [ "id", "event" ], "properties": { "id": { "type": "string", "description": "Unique identifier for this event configuration. Can be any string to identify this event entry." }, "event": { "type": "string", "description": "Type of event that triggers the alert", "enum": [ "autostopping_warmup_failed", "autostopping_cooldown_failed", "autostopping_rule_created", "autostopping_rule_updated", "autostopping_rule_deleted" ] } } }, "AlertRecipient": { "type": "object", "required": [ "type", "ids" ], "properties": { "type": { "type": "string", "description": "Type of notification channel", "enum": [ "email", "slack" ] }, "ids": { "type": "array", "description": "List of recipient identifiers. For email: email addresses. For slack: Slack channel IDs or webhook URLs.", "items": { "type": "string" } } } } } }