{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/thousandeyes/json-schema/thousandeyes-agents-api-notification-rule-detail-schema.json",
  "title": "Agents_API_NotificationRuleDetail",
  "x-generated": "2026-11-25",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/thousandeyes-cloud-and-enterprise-agent-notification-rules-api-openapi.yml#/components/schemas/Agents_API_NotificationRuleDetail",
  "allOf": [
    {
      "$ref": "#/$defs/Agents_API_NotificationRule"
    },
    {
      "type": "object",
      "properties": {
        "notifications": {
          "$ref": "#/$defs/Agents_API_AgentNotification"
        },
        "agents": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/Agents_API_AgentResponse"
          }
        },
        "_links": {
          "$ref": "#/$defs/Agents_API_SelfLinks"
        }
      }
    }
  ],
  "$defs": {
    "Agents_API_AgentBase": {
      "type": "object",
      "properties": {
        "ipAddresses": {
          "type": "array",
          "description": "Array of private IP addresses.",
          "readOnly": true,
          "items": {
            "type": "string"
          }
        },
        "publicIpAddresses": {
          "type": "array",
          "description": "Array of public IP addresses.",
          "readOnly": true,
          "items": {
            "type": "string"
          }
        },
        "network": {
          "type": "string",
          "description": "Network (including ASN) of agent’s public IP.",
          "readOnly": true
        }
      }
    },
    "Agents_API_AgentNotification": {
      "type": "object",
      "description": "Alert notification object.",
      "properties": {
        "email": {
          "$ref": "#/$defs/Agents_API_AlertEmail"
        },
        "thirdParty": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/Agents_API_AlertIntegrationBase"
          }
        },
        "webhook": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/Agents_API_AlertIntegrationBase"
          }
        }
      }
    },
    "Agents_API_AgentResponse": {
      "allOf": [
        {
          "required": [
            "agentType"
          ],
          "properties": {
            "agentType": {
              "$ref": "#/$defs/Agents_API_CloudEnterpriseAgentType"
            }
          }
        },
        {
          "$ref": "#/$defs/Agents_API_SimpleAgent"
        }
      ]
    },
    "Agents_API_AlertEmail": {
      "type": "object",
      "properties": {
        "message": {
          "type": "string",
          "description": "Message used for email notification."
        },
        "recipients": {
          "type": "array",
          "description": "List of recipients emails that will be notified.",
          "items": {
            "type": "string"
          }
        }
      }
    },
    "Agents_API_AlertIntegrationBase": {
      "type": "object",
      "properties": {
        "integrationId": {
          "type": "string",
          "description": "Unique ID of the integration."
        },
        "integrationName": {
          "type": "string",
          "description": "Name of the integration."
        },
        "integrationType": {
          "$ref": "#/$defs/Agents_API_AlertIntegrationType"
        },
        "target": {
          "type": "string",
          "description": "Target URL of the integration."
        },
        "authMethod": {
          "type": "string",
          "description": "(PagerDuty only) Authentication method."
        },
        "authUser": {
          "type": "string",
          "description": "(PagerDuty only) Authentication user."
        },
        "authToken": {
          "type": "string",
          "description": "(PagerDuty only) Authentication token."
        },
        "channel": {
          "type": "string",
          "description": "(Slack only) Slack `#channel` or `@user`."
        }
      }
    },
    "Agents_API_AlertIntegrationType": {
      "type": "string",
      "description": "Type of the alert integration",
      "enum": [
        "pager-duty",
        "slack"
      ]
    },
    "Agents_API_CloudEnterpriseAgentType": {
      "type": "string",
      "description": "Type of the agent.",
      "enum": [
        "cloud",
        "enterprise-cluster",
        "enterprise"
      ],
      "readOnly": true
    },
    "Agents_API_Coordinates": {
      "type": "object",
      "description": "Geographic coordinates for agent location.",
      "properties": {
        "latitude": {
          "type": "number",
          "format": "double",
          "description": "The latitude of the agent location in decimal degrees",
          "readOnly": true
        },
        "longitude": {
          "type": "number",
          "format": "double",
          "description": "The longitude of the agent location in decimal degrees",
          "readOnly": true
        }
      }
    },
    "Agents_API_Link": {
      "type": "object",
      "description": "A hyperlink from the containing resource to a URI.",
      "required": [
        "href"
      ],
      "properties": {
        "href": {
          "type": "string",
          "description": "Its value is either a URI [RFC3986] or a URI template [RFC6570]."
        },
        "templated": {
          "type": "boolean",
          "description": "Should be true when the link object's \"href\" property is a URI template."
        },
        "type": {
          "type": "string",
          "description": "Used as a hint to indicate the media type expected when dereferencing the target resource."
        },
        "deprecation": {
          "type": "string",
          "description": "Its presence indicates that the link is to be deprecated at a future date. Its value is a URL that should provide further information about the deprecation."
        },
        "name": {
          "type": "string",
          "description": "Its value may be used as a secondary key for selecting link objects that share the same relation type."
        },
        "profile": {
          "type": "string",
          "description": "A URI that hints about the profile of the target resource."
        },
        "title": {
          "type": "string",
          "description": "Intended for labelling the link with a human-readable identifier"
        },
        "hreflang": {
          "type": "string",
          "description": "Indicates the language of the target resource"
        }
      }
    },
    "Agents_API_NetworkProviderInfo": {
      "type": "object",
      "description": "Information about the network provider that owns the agent's public IP prefix.",
      "readOnly": true,
      "properties": {
        "asn": {
          "type": "integer",
          "format": "int64",
          "description": "Autonomous System Number (ASN) announcing the agent's public IP prefix.",
          "readOnly": true
        },
        "name": {
          "type": "string",
          "description": "Name of the network provider organization.",
          "readOnly": true
        },
        "type": {
          "$ref": "#/$defs/Agents_API_NetworkProviderType"
        }
      }
    },
    "Agents_API_NetworkProviderType": {
      "type": "string",
      "description": "Classification of the agent's network provider.",
      "enum": [
        "unknown",
        "isp",
        "cdn",
        "stub",
        "cloud-provider",
        "carrier"
      ],
      "readOnly": true
    },
    "Agents_API_NotificationRule": {
      "type": "object",
      "properties": {
        "ruleId": {
          "type": "string",
          "description": "Agent notification rule ID",
          "readOnly": true
        },
        "ruleName": {
          "type": "string",
          "description": "Name of the agent notification rule"
        },
        "expression": {
          "type": "string",
          "description": "Expression of agent notification rule"
        },
        "notifyOnClear": {
          "type": "boolean",
          "description": "Send notification when notification clears"
        },
        "isDefault": {
          "type": "boolean",
          "description": "Agent notification rule will be automatically included on all new Enterprise Agents."
        }
      }
    },
    "Agents_API_SelfLinks": {
      "type": "object",
      "description": "A links object containing the self link.",
      "readOnly": true,
      "properties": {
        "self": {
          "$ref": "#/$defs/Agents_API_Link"
        }
      }
    },
    "Agents_API_SimpleAgent": {
      "type": "object",
      "allOf": [
        {
          "$ref": "#/$defs/Agents_API_AgentBase"
        },
        {
          "type": "object",
          "properties": {
            "agentId": {
              "type": "string",
              "description": "Unique ID of the agent.",
              "readOnly": true
            },
            "agentName": {
              "type": "string",
              "description": "Name of the agent."
            },
            "location": {
              "type": "string",
              "description": "Location of the agent.",
              "readOnly": true
            },
            "countryId": {
              "type": "string",
              "description": "2-digit ISO country code",
              "readOnly": true
            },
            "coordinates": {
              "$ref": "#/$defs/Agents_API_Coordinates"
            },
            "networkProviderInfo": {
              "allOf": [
                {
                  "$ref": "#/$defs/Agents_API_NetworkProviderInfo"
                }
              ],
              "readOnly": true
            },
            "enabled": {
              "type": "boolean",
              "description": "Flag indicating if the agent is enabled."
            },
            "verifySslCertificates": {
              "type": "boolean",
              "description": "Flag indicating if has normal SSL operations or  if instead it's set to ignore SSL errors on browserbot-based tests.",
              "readOnly": true
            },
            "prefix": {
              "type": "string",
              "description": "Prefix containing agents public IP address.",
              "readOnly": true
            }
          }
        }
      ]
    }
  }
}