{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/thousandeyes/json-schema/thousandeyes-instant-tests-api-agent-to-server-instant-test-request-schema.json",
  "title": "Instant_Tests_API_AgentToServerInstantTestRequest",
  "x-generated": "2026-11-25",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/thousandeyes-agent-to-server-instant-tests-api-openapi.yml#/components/schemas/Instant_Tests_API_AgentToServerInstantTestRequest",
  "allOf": [
    {
      "$ref": "#/$defs/Instant_Tests_API_UnexpandedInstantTest"
    },
    {
      "$ref": "#/$defs/Instant_Tests_API_AgentToServerProperties"
    },
    {
      "$ref": "#/$defs/Instant_Tests_API_InstantTestRequest"
    }
  ],
  "$defs": {
    "Instant_Tests_API_AgentToServerProperties": {
      "allOf": [
        {
          "$ref": "#/$defs/Instant_Tests_API_AgentToServerWritablePropertyFields"
        },
        {
          "type": "object",
          "properties": {
            "type": {
              "$ref": "#/$defs/Instant_Tests_API_AgentToServerTestType"
            }
          },
          "required": [
            "server"
          ]
        }
      ]
    },
    "Instant_Tests_API_AgentToServerTestType": {
      "type": "string",
      "readOnly": true
    },
    "Instant_Tests_API_AgentToServerWritablePropertyFields": {
      "type": "object",
      "properties": {
        "bandwidthMeasurements": {
          "$ref": "#/$defs/Instant_Tests_API_TestBandwidthMeasurements"
        },
        "continuousMode": {
          "type": "boolean",
          "description": "To enable continuous monitoring, set this parameter to `true` to. \nWhen continuous monitoring is enabled, the following actions occur:\n* `fixedPacketRate` is enforced\n* `bandwidthMeasurements` are disabled\n* If the `protocol` is set to `tcp`, `probeMode` is set to `syn`.\n"
        },
        "fixedPacketRate": {
          "type": "integer",
          "minimum": 0,
          "maximum": 100,
          "description": "If continuousMode is `false`, set the fixedPacketRate to a value between 10-100. If `continuousMode` is `true`, set the `fixedPacketRate` to `1`"
        },
        "mtuMeasurements": {
          "$ref": "#/$defs/Instant_Tests_API_TestMtuMeasurements"
        },
        "numPathTraces": {
          "$ref": "#/$defs/Instant_Tests_API_TestNumPathTraces"
        },
        "pathTraceMode": {
          "$ref": "#/$defs/Instant_Tests_API_TestPathTraceMode"
        },
        "probeMode": {
          "$ref": "#/$defs/Instant_Tests_API_TestProbeMode"
        },
        "protocol": {
          "$ref": "#/$defs/Instant_Tests_API_TestProtocol"
        },
        "randomizedStartTime": {
          "$ref": "#/$defs/Instant_Tests_API_TestRandomizedStartTime"
        },
        "server": {
          "type": "string",
          "description": "The target name or IP address. If a port is set for the test, it is appended to the target name or IP address using a colon."
        },
        "dscp": {
          "$ref": "#/$defs/Instant_Tests_API_TestDscp"
        },
        "dscpId": {
          "$ref": "#/$defs/Instant_Tests_API_TestDscpId"
        },
        "ipv6Policy": {
          "$ref": "#/$defs/Instant_Tests_API_TestIpv6Policy"
        },
        "pingPayloadSize": {
          "type": "integer",
          "minimum": 0,
          "maximum": 1400,
          "description": "Payload size (not total packet size) for the end-to-end metric's probes, ping payload size allows values from 0 to 1400 bytes. When set to null, payload sizes are 0 bytes for ICMP-based tests and 1 byte for TCP-based tests."
        },
        "networkMeasurements": {
          "type": "boolean",
          "description": "View packet loss in 1-second intervals. This is only available for 1-minute interval tests. Set to `true` to enable network measurements.",
          "default": false
        }
      }
    },
    "Instant_Tests_API_InstantTestRequest": {
      "type": "object",
      "properties": {
        "labels": {
          "type": "array",
          "description": "A list of test label identifiers (get `labelId` from `/labels` endpoint).",
          "writeOnly": true,
          "readOnly": false,
          "items": {
            "type": "string"
          }
        },
        "tags": {
          "type": "array",
          "description": "A list of test tag identifiers (get `id` from `/tags` endpoint).",
          "writeOnly": true,
          "readOnly": false,
          "items": {
            "type": "string"
          }
        },
        "sharedWithAccounts": {
          "type": "array",
          "description": "A list of account group identifiers that the test is shared with (get `aid` from `/account-groups` endpoint).",
          "writeOnly": true,
          "readOnly": false,
          "items": {
            "type": "string"
          }
        },
        "agents": {
          "type": "array",
          "description": "A list of objects with `agentId` (required) and `sourceIpAddress` (optional).",
          "items": {
            "$ref": "#/$defs/Instant_Tests_API_TestAgent"
          }
        }
      },
      "required": [
        "agents"
      ]
    },
    "Instant_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"
        }
      }
    },
    "Instant_Tests_API_TestAgent": {
      "type": "object",
      "properties": {
        "agentId": {
          "type": "string",
          "description": "Identifier for the agent (get `agentId` from `/agents` endpoint)."
        },
        "sourceIpAddress": {
          "type": "string",
          "description": "IP address from the agent's `ipAddresses` field (get `ipAddresses` from `/agents` endpoint). Used for interface selection."
        }
      }
    },
    "Instant_Tests_API_TestBandwidthMeasurements": {
      "type": "boolean",
      "description": "Set to `true` to enable bandwidth measurements, only applies to Enterprise agents assigned to the test."
    },
    "Instant_Tests_API_TestCreatedBy": {
      "type": "string",
      "description": "User that created the test.",
      "readOnly": true
    },
    "Instant_Tests_API_TestCreatedDate": {
      "type": "string",
      "format": "date-time",
      "description": "UTC created date (ISO date-time format).",
      "readOnly": true
    },
    "Instant_Tests_API_TestDscp": {
      "type": "string",
      "description": "DSCP label.",
      "readOnly": true
    },
    "Instant_Tests_API_TestDscpId": {
      "type": "string",
      "enum": [
        "0",
        "8",
        "16",
        "24",
        "32",
        "40",
        "48",
        "56",
        "10",
        "12",
        "14",
        "18",
        "20",
        "22",
        "26",
        "28",
        "30",
        "34",
        "36",
        "38",
        "46",
        "44"
      ],
      "description": "DSCP ID [to see list for acceptable values](https://docs.thousandeyes.com/product-documentation/tests/dscp-options-in-network-tests)",
      "default": "0"
    },
    "Instant_Tests_API_TestIpv6Policy": {
      "type": "string",
      "enum": [
        "force-ipv4",
        "prefer-ipv6",
        "force-ipv6",
        "use-agent-policy"
      ],
      "description": "IP version policy. Overrides the IPv6 policy configured at the agent level.",
      "default": "use-agent-policy"
    },
    "Instant_Tests_API_TestLinks": {
      "type": "object",
      "description": "A list of links that can be accessed to get more information",
      "properties": {
        "self": {
          "$ref": "#/$defs/Instant_Tests_API_TestSelfLink"
        },
        "testResults": {
          "$ref": "#/$defs/Instant_Tests_API_TestResults"
        }
      },
      "readOnly": true
    },
    "Instant_Tests_API_TestMtuMeasurements": {
      "type": "boolean",
      "description": "Set `true` to measure MTU sizes on network from agents to the target."
    },
    "Instant_Tests_API_TestNumPathTraces": {
      "type": "integer",
      "minimum": 1,
      "maximum": 10,
      "description": "Number of path traces executed by the agent.",
      "default": 3
    },
    "Instant_Tests_API_TestPathTraceMode": {
      "type": "string",
      "enum": [
        "classic",
        "in-session"
      ],
      "description": "Select `inSession` to perform the path trace within a TCP session.",
      "default": "classic"
    },
    "Instant_Tests_API_TestProbeMode": {
      "type": "string",
      "enum": [
        "auto",
        "sack",
        "syn"
      ],
      "description": "Probe mode used by network test, only valid when the protocol is set to TCP.",
      "default": "auto"
    },
    "Instant_Tests_API_TestProtocol": {
      "type": "string",
      "enum": [
        "tcp",
        "icmp",
        "udp"
      ],
      "description": "Protocol used by dependent network tests (end-to-end, path trace, PMTUD).",
      "default": "tcp"
    },
    "Instant_Tests_API_TestRandomizedStartTime": {
      "type": "boolean",
      "description": "Indicates whether agents should randomize the start time in each test round.",
      "default": false
    },
    "Instant_Tests_API_TestResults": {
      "type": "array",
      "description": "Reference to the test results.",
      "items": {
        "$ref": "#/$defs/Instant_Tests_API_Link"
      }
    },
    "Instant_Tests_API_TestSelfLink": {
      "allOf": [
        {
          "$ref": "#/$defs/Instant_Tests_API_Link"
        },
        {
          "description": "Reference to the test."
        }
      ]
    },
    "Instant_Tests_API_TestType": {
      "type": "string",
      "enum": [
        "api",
        "agent-to-agent",
        "agent-to-server",
        "bgp",
        "http-server",
        "page-load",
        "web-transactions",
        "ftp-server",
        "dns-trace",
        "dns-server",
        "dnssec",
        "sip-server",
        "voice"
      ],
      "description": "This is a read only value, as test type is implicit in the test creation url.",
      "readOnly": true
    },
    "Instant_Tests_API_UnexpandedInstantTest": {
      "type": "object",
      "properties": {
        "createdBy": {
          "$ref": "#/$defs/Instant_Tests_API_TestCreatedBy"
        },
        "createdDate": {
          "$ref": "#/$defs/Instant_Tests_API_TestCreatedDate"
        },
        "description": {
          "type": "string",
          "description": "A description of the test."
        },
        "liveShare": {
          "type": "boolean",
          "description": "Indicates if the test is shared with the account group.",
          "readOnly": true
        },
        "modifiedBy": {
          "type": "string",
          "description": "User that modified the test.",
          "readOnly": true
        },
        "modifiedDate": {
          "type": "string",
          "format": "date-time",
          "description": "UTC last modification date (ISO date-time format).",
          "readOnly": true
        },
        "savedEvent": {
          "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
        },
        "testId": {
          "type": "string",
          "description": "Each test is assigned an unique ID; this is used to access test information and results from other endpoints.",
          "readOnly": true
        },
        "testName": {
          "type": "string",
          "description": "The name of the test. Test name must be unique."
        },
        "type": {
          "$ref": "#/$defs/Instant_Tests_API_TestType"
        },
        "_links": {
          "$ref": "#/$defs/Instant_Tests_API_TestLinks"
        }
      }
    }
  }
}