{
  "$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-tests-schema.json",
  "title": "Endpoint_Tests_API_EndpointAgentToServerTests",
  "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_EndpointAgentToServerTests",
  "type": "object",
  "properties": {
    "tests": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/Endpoint_Tests_API_EndpointAgentToServerTest"
      }
    },
    "_links": {
      "$ref": "#/$defs/Endpoint_Tests_API_SelfLinks"
    }
  },
  "$defs": {
    "Endpoint_Tests_API_AccountGroupId": {
      "type": "string",
      "description": "A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint."
    },
    "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_EndpointAgentLabelsSelectorConfig": {
      "type": "object",
      "description": "Agent labels selection object.",
      "readOnly": true,
      "deprecated": true,
      "properties": {
        "agentSelectorType": {
          "$ref": "#/$defs/Endpoint_Tests_API_EndpointAgentLabelsSelectorType"
        },
        "maxMachines": {
          "$ref": "#/$defs/Endpoint_Tests_API_EndpointTestMaxMachines"
        },
        "endpointAgentLabels": {
          "$ref": "#/$defs/Endpoint_Tests_API_EndpointAgentLabels"
        },
        "tagIds": {
          "$ref": "#/$defs/Endpoint_Tests_API_TagIds"
        }
      },
      "required": [
        "agentSelectorType"
      ]
    },
    "Endpoint_Tests_API_EndpointAgentLabelsSelectorType": {
      "type": "string",
      "pattern": "^agent-labels$"
    },
    "Endpoint_Tests_API_EndpointAgentSelectorConfig": {
      "type": "object",
      "description": "Agents selection object based on agentSelectorType.",
      "readOnly": true,
      "oneOf": [
        {
          "$ref": "#/$defs/Endpoint_Tests_API_EndpointAllAgentsSelectorConfig"
        },
        {
          "$ref": "#/$defs/Endpoint_Tests_API_EndpointSpecificAgentsSelectorConfig"
        },
        {
          "$ref": "#/$defs/Endpoint_Tests_API_EndpointAgentLabelsSelectorConfig"
        },
        {
          "$ref": "#/$defs/Endpoint_Tests_API_EndpointAgentTagsSelectorConfig"
        }
      ],
      "required": [
        "agentSelectorType"
      ]
    },
    "Endpoint_Tests_API_EndpointAgentTagsSelectorConfig": {
      "type": "object",
      "description": "Agent tags selection object.",
      "readOnly": true,
      "properties": {
        "agentSelectorType": {
          "$ref": "#/$defs/Endpoint_Tests_API_EndpointAgentTagsSelectorType"
        },
        "maxMachines": {
          "$ref": "#/$defs/Endpoint_Tests_API_EndpointTestMaxMachines"
        },
        "endpointAgentLabels": {
          "$ref": "#/$defs/Endpoint_Tests_API_EndpointAgentLabels"
        },
        "tagIds": {
          "$ref": "#/$defs/Endpoint_Tests_API_TagIds"
        }
      },
      "required": [
        "agentSelectorType"
      ]
    },
    "Endpoint_Tests_API_EndpointAgentTagsSelectorType": {
      "type": "string",
      "pattern": "^agent-tags$"
    },
    "Endpoint_Tests_API_EndpointAgentToServerTest": {
      "allOf": [
        {
          "$ref": "#/$defs/Endpoint_Tests_API_EndpointTest"
        },
        {
          "type": "object",
          "properties": {
            "type": {
              "$ref": "#/$defs/Endpoint_Tests_API_EndpointAgentToServerType"
            }
          }
        }
      ]
    },
    "Endpoint_Tests_API_EndpointAgentToServerType": {
      "type": "string",
      "description": "Type of test being queried.",
      "pattern": "^agent-to-server$",
      "readOnly": true
    },
    "Endpoint_Tests_API_EndpointAllAgentsSelectorConfig": {
      "type": "object",
      "description": "Any agent selection object.",
      "readOnly": true,
      "properties": {
        "agentSelectorType": {
          "$ref": "#/$defs/Endpoint_Tests_API_EndpointAllAgentsSelectorType"
        },
        "maxMachines": {
          "$ref": "#/$defs/Endpoint_Tests_API_EndpointTestMaxMachines"
        }
      },
      "required": [
        "agentSelectorType"
      ]
    },
    "Endpoint_Tests_API_EndpointAllAgentsSelectorType": {
      "type": "string",
      "pattern": "^all-agents$"
    },
    "Endpoint_Tests_API_EndpointIpVersionOut": {
      "description": "For reading current network test configurations, the IP version of the test. Values include V4_ONLY, V6_ONLY, V6_PREFER, and OS_DEFAULT.",
      "type": "string"
    },
    "Endpoint_Tests_API_EndpointScheduledTestType": {
      "type": "string",
      "enum": [
        "agent-to-server",
        "http-server"
      ],
      "description": "Type of test being queried.",
      "readOnly": true
    },
    "Endpoint_Tests_API_EndpointSpecificAgentsSelectorConfig": {
      "type": "object",
      "description": "Specific agents selection object.",
      "readOnly": true,
      "properties": {
        "agentSelectorType": {
          "$ref": "#/$defs/Endpoint_Tests_API_EndpointSpecificAgentsSelectorType"
        },
        "maxMachines": {
          "$ref": "#/$defs/Endpoint_Tests_API_EndpointTestMaxMachines"
        },
        "agents": {
          "$ref": "#/$defs/Endpoint_Tests_API_EndpointTestAgents"
        }
      },
      "required": [
        "agentSelectorType"
      ]
    },
    "Endpoint_Tests_API_EndpointSpecificAgentsSelectorType": {
      "type": "string",
      "pattern": "^specific-agents$"
    },
    "Endpoint_Tests_API_EndpointTest": {
      "type": "object",
      "required": [
        "type"
      ],
      "properties": {
        "aid": {
          "$ref": "#/$defs/Endpoint_Tests_API_AccountGroupId"
        },
        "_links": {
          "$ref": "#/$defs/Endpoint_Tests_API_EndpointTestLinks"
        },
        "agentSelectorConfig": {
          "$ref": "#/$defs/Endpoint_Tests_API_EndpointAgentSelectorConfig"
        },
        "createdDate": {
          "$ref": "#/$defs/Endpoint_Tests_API_TestCreatedDate"
        },
        "isPrioritized": {
          "$ref": "#/$defs/Endpoint_Tests_API_TestIsPrioritized"
        },
        "interval": {
          "$ref": "#/$defs/Endpoint_Tests_API_TestInterval"
        },
        "isEnabled": {
          "$ref": "#/$defs/Endpoint_Tests_API_TestIsEnabled"
        },
        "isSavedEvent": {
          "$ref": "#/$defs/Endpoint_Tests_API_TestIsSavedEvent"
        },
        "hasPathTraceInSession": {
          "$ref": "#/$defs/Endpoint_Tests_API_TestHasPathTraceInSession"
        },
        "labels": {
          "$ref": "#/$defs/Endpoint_Tests_API_TestLabels"
        },
        "modifiedDate": {
          "type": "string",
          "format": "date-time",
          "description": "UTC last modification date (ISO date-time format).",
          "readOnly": true
        },
        "networkMeasurements": {
          "$ref": "#/$defs/Endpoint_Tests_API_TestNetworkMeasurements"
        },
        "protocol": {
          "$ref": "#/$defs/Endpoint_Tests_API_EndpointTestProtocol"
        },
        "ipVersion": {
          "$ref": "#/$defs/Endpoint_Tests_API_EndpointIpVersionOut"
        },
        "server": {
          "type": "string",
          "description": "Target domain name or IP address."
        },
        "testId": {
          "type": "string",
          "description": "Each test is assigned a unique ID to access test data from other endpoints.",
          "readOnly": true
        },
        "testName": {
          "$ref": "#/$defs/Endpoint_Tests_API_TestName"
        },
        "type": {
          "$ref": "#/$defs/Endpoint_Tests_API_EndpointScheduledTestType"
        },
        "tcpProbeMode": {
          "$ref": "#/$defs/Endpoint_Tests_API_TestProbeModeResponse"
        },
        "port": {
          "$ref": "#/$defs/Endpoint_Tests_API_EndpointTestPort"
        }
      }
    },
    "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_EndpointTestLinks": {
      "type": "object",
      "description": "A list of links that can be accessed to get more information.",
      "properties": {
        "self": {
          "$ref": "#/$defs/Endpoint_Tests_API_EndpointTestSelfLink"
        },
        "testResults": {
          "$ref": "#/$defs/Endpoint_Tests_API_ScheduledTestResults"
        }
      },
      "readOnly": true
    },
    "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_EndpointTestSelfLink": {
      "allOf": [
        {
          "description": "A reference to the test."
        },
        {
          "$ref": "#/$defs/Endpoint_Tests_API_Link"
        }
      ]
    },
    "Endpoint_Tests_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"
        }
      }
    },
    "Endpoint_Tests_API_ScheduledTestResults": {
      "type": "array",
      "description": "Reference to the test results.",
      "items": {
        "$ref": "#/$defs/Endpoint_Tests_API_Link"
      }
    },
    "Endpoint_Tests_API_SelfLinks": {
      "type": "object",
      "description": "A links object containing the self link.",
      "readOnly": true,
      "properties": {
        "self": {
          "$ref": "#/$defs/Endpoint_Tests_API_Link"
        }
      }
    },
    "Endpoint_Tests_API_TagIds": {
      "type": "array",
      "description": "List of tag IDs (obtained from `/tags` endpoint).",
      "items": {
        "type": "string",
        "format": "uuid"
      }
    },
    "Endpoint_Tests_API_TestCreatedDate": {
      "type": "string",
      "format": "date-time",
      "description": "UTC created date (ISO date-time format).",
      "readOnly": true
    },
    "Endpoint_Tests_API_TestHasPathTraceInSession": {
      "type": "boolean",
      "description": "Enables \"in session\" path trace. When enabled, this option initiates a TCP session with the target server and sends path trace packets within the established TCP session."
    },
    "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_TestIsEnabled": {
      "type": "boolean",
      "description": "Indicates if test is enabled.",
      "default": true
    },
    "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_TestIsSavedEvent": {
      "type": "boolean",
      "description": "Indicates if the test is a saved event.\n\n**Note**: **Saved Events** are now called **Private Snapshots** in the user interface. This change does not affect API.\n",
      "readOnly": true
    },
    "Endpoint_Tests_API_TestLabel": {
      "type": "object",
      "properties": {
        "labelId": {
          "type": "string",
          "description": "Label ID."
        },
        "name": {
          "type": "string",
          "description": "Name of the label."
        },
        "isBuiltin": {
          "type": "boolean",
          "description": "Value indicating if the label in question is BuiltIn (Account Admin, Organization Admin, Regular User)."
        }
      }
    },
    "Endpoint_Tests_API_TestLabels": {
      "type": "array",
      "description": "Labels to which the test is assigned. This field is not returned for Instant Tests.",
      "readOnly": true,
      "items": {
        "$ref": "#/$defs/Endpoint_Tests_API_TestLabel"
      }
    },
    "Endpoint_Tests_API_TestName": {
      "type": "string",
      "description": "Name of the test."
    },
    "Endpoint_Tests_API_TestNetworkMeasurements": {
      "type": "boolean",
      "description": "Enable or disable network measurements. Set to true to enable or false to disable network measurements.",
      "default": true
    },
    "Endpoint_Tests_API_TestProbeModeResponse": {
      "type": "string",
      "enum": [
        "auto",
        "sack",
        "syn",
        "syn-pcap",
        "syn-socket",
        "unknown"
      ],
      "description": "Probe mode returned by network test APIs, only valid when the protocol is set to TCP. Configuration responses return user-selectable values, while result responses may also return resolved driver values.",
      "default": "auto"
    }
  }
}