{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/thousandeyes/json-schema/thousandeyes-endpoint-tests-api-endpoint-agent-to-server-test-request-schema.json",
  "title": "Endpoint_Tests_API_EndpointAgentToServerTestRequest",
  "x-generated": "2026-11-25",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/thousandeyes-agent-to-server-endpoint-scheduled-tests-api-openapi.yml#/components/schemas/Endpoint_Tests_API_EndpointAgentToServerTestRequest",
  "allOf": [
    {
      "$ref": "#/$defs/Endpoint_Tests_API_EndpointAgentToServerInstantTest"
    },
    {
      "type": "object",
      "properties": {
        "isPrioritized": {
          "$ref": "#/$defs/Endpoint_Tests_API_TestIsPrioritized"
        },
        "interval": {
          "$ref": "#/$defs/Endpoint_Tests_API_TestInterval"
        },
        "protocol": {
          "$ref": "#/$defs/Endpoint_Tests_API_EndpointTestProtocol"
        }
      }
    }
  ],
  "$defs": {
    "Endpoint_Tests_API_EndpointAgentLabels": {
      "type": "array",
      "deprecated": true,
      "description": "Deprecated. Use `tagIds` instead.\n\nList of endpoint agent label IDs (obtained from `/endpoint/labels` endpoint), required when `agentSelectorType` is set to `agent-labels`.\n",
      "items": {
        "type": "string"
      }
    },
    "Endpoint_Tests_API_EndpointAgentToServerInstantTest": {
      "allOf": [
        {
          "$ref": "#/$defs/Endpoint_Tests_API_EndpointInstantTest"
        },
        {
          "type": "object",
          "required": [
            "server"
          ],
          "properties": {
            "serverName": {
              "type": "string",
              "deprecated": true,
              "description": "A server address without a protocol or IP address. **Deprecated, use `server` instead**."
            },
            "server": {
              "type": "string",
              "description": "Target domain name or IP address."
            },
            "port": {
              "$ref": "#/$defs/Endpoint_Tests_API_EndpointTestPort"
            }
          }
        }
      ]
    },
    "Endpoint_Tests_API_EndpointInstantTest": {
      "type": "object",
      "required": [
        "testName"
      ],
      "properties": {
        "agentSelectorType": {
          "$ref": "#/$defs/Endpoint_Tests_API_EndpointTestAgentSelectorType"
        },
        "agents": {
          "$ref": "#/$defs/Endpoint_Tests_API_EndpointTestAgents"
        },
        "endpointAgentLabels": {
          "$ref": "#/$defs/Endpoint_Tests_API_EndpointAgentLabels"
        },
        "tagIds": {
          "$ref": "#/$defs/Endpoint_Tests_API_TagIds"
        },
        "maxMachines": {
          "$ref": "#/$defs/Endpoint_Tests_API_EndpointTestMaxMachines"
        },
        "testName": {
          "$ref": "#/$defs/Endpoint_Tests_API_TestName"
        },
        "ipVersion": {
          "$ref": "#/$defs/Endpoint_Tests_API_EndpointIpVersionIn"
        }
      }
    },
    "Endpoint_Tests_API_EndpointIpVersionIn": {
      "description": "For configuring network tests, the IP version of the test.",
      "type": "string",
      "enum": [
        "V4_ONLY",
        "V6_ONLY",
        "V6_PREFER",
        "OS_DEFAULT"
      ]
    },
    "Endpoint_Tests_API_EndpointTestAgentSelectorType": {
      "type": "string",
      "enum": [
        "all-agents",
        "specific-agents",
        "agent-labels",
        "agent-tags"
      ],
      "description": "Specifies how agents are selected for the endpoint test.\n\nAgents can be selected from:\n  - all available agents\n  - a specific list of agents\n  - agents matching tags\n  - agents matching labels (deprecated)\n",
      "default": "all-agents"
    },
    "Endpoint_Tests_API_EndpointTestAgents": {
      "type": "array",
      "description": "List of endpoint agent IDs (obtained from `/endpoint/agents` endpoint). Required when `agentSelectorType` is set to `specific-agent`.",
      "items": {
        "type": "string",
        "format": "uuid"
      }
    },
    "Endpoint_Tests_API_EndpointTestMaxMachines": {
      "type": "integer",
      "description": "Maximum number of agents which can execute the test.",
      "default": 25
    },
    "Endpoint_Tests_API_EndpointTestPort": {
      "type": "integer",
      "description": "Port number.",
      "default": 443
    },
    "Endpoint_Tests_API_EndpointTestProtocol": {
      "type": "string",
      "enum": [
        "icmp",
        "icmp-with-tcp-connect",
        "tcp",
        "prefer-tcp",
        "ast-autodetect",
        "autodetect"
      ],
      "description": "Protocol requested for the test.",
      "default": "icmp"
    },
    "Endpoint_Tests_API_TagIds": {
      "type": "array",
      "description": "List of tag IDs (obtained from `/tags` endpoint).",
      "items": {
        "type": "string",
        "format": "uuid"
      }
    },
    "Endpoint_Tests_API_TestInterval": {
      "type": "integer",
      "enum": [
        60,
        120,
        300,
        600,
        900,
        1800,
        3600
      ],
      "description": "Interval between test runs in seconds.",
      "default": 60
    },
    "Endpoint_Tests_API_TestIsPrioritized": {
      "type": "boolean",
      "description": "Indicates whether the test should be prioritized when the number of tests assigned to an agent exceeds the license limit.",
      "default": false
    },
    "Endpoint_Tests_API_TestName": {
      "type": "string",
      "description": "Name of the test."
    }
  }
}