{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/thousandeyes/json-schema/thousandeyes-tests-api-http-server-test-request-schema.json",
  "title": "Tests_API_HttpServerTestRequest",
  "x-generated": "2026-11-25",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/thousandeyes-http-server-tests-api-openapi.yml#/components/schemas/Tests_API_HttpServerTestRequest",
  "allOf": [
    {
      "$ref": "#/$defs/Tests_API_UnexpandedHttpServerTest"
    },
    {
      "$ref": "#/$defs/Tests_API_TestRequest"
    },
    {
      "$ref": "#/$defs/Tests_API_MonitorsRequest"
    }
  ],
  "$defs": {
    "Tests_API_AgentInterfaces": {
      "type": "object",
      "properties": {
        "ipAddress": {
          "type": "string",
          "description": "IP address of the agent interface."
        },
        "agentId": {
          "type": "string",
          "description": "The agent ID of the enterprise agent for the test."
        }
      }
    },
    "Tests_API_BaseRequest": {
      "type": "object",
      "properties": {
        "labels": {
          "type": "array",
          "description": "Contains list of test label IDs (get `labelId` from `/labels` endpoint)",
          "writeOnly": true,
          "readOnly": false,
          "items": {
            "type": "string"
          }
        },
        "tags": {
          "type": "array",
          "description": "Contains list of test tag IDs (get `id` from `/tags` endpoint).",
          "writeOnly": true,
          "readOnly": false,
          "items": {
            "type": "string"
          }
        },
        "sharedWithAccounts": {
          "type": "array",
          "description": "Contains list of account group IDs. Test is shared with the listed account groups (get `aid` from `/account-groups` endpoint)",
          "writeOnly": true,
          "readOnly": false,
          "items": {
            "type": "string"
          }
        },
        "alertRules": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "List of alert rules IDs to apply to the test (get `ruleId` from `/alerts/rules` endpoint. If `alertsEnabled` is set to `true` and `alertRules` is not included on test creation or update, applicable user default alert rules will be used)",
          "writeOnly": true,
          "readOnly": false
        }
      }
    },
    "Tests_API_Enabled": {
      "type": "boolean",
      "description": "Test is enabled.",
      "default": true
    },
    "Tests_API_HttpServerBaseProperties": {
      "type": "object",
      "properties": {
        "authType": {
          "$ref": "#/$defs/Tests_API_TestAuthType"
        },
        "agentInterfaces": {
          "$ref": "#/$defs/Tests_API_AgentInterfaces"
        },
        "bandwidthMeasurements": {
          "$ref": "#/$defs/Tests_API_TestBandwidthMeasurements"
        },
        "clientCertificate": {
          "$ref": "#/$defs/Tests_API_TestClientCertificate"
        },
        "contentRegex": {
          "type": "string",
          "description": "Content regex, this field does not require escaping."
        },
        "customHeaders": {
          "$ref": "#/$defs/Tests_API_TestCustomHeaders"
        },
        "desiredStatusCode": {
          "$ref": "#/$defs/Tests_API_TestDesiredStatusCode"
        },
        "distributedTracing": {
          "$ref": "#/$defs/Tests_API_TestDistributedTracing"
        },
        "downloadLimit": {
          "type": "integer",
          "description": "Specifies maximum number of bytes to download from the target object."
        },
        "dnsOverride": {
          "type": "string",
          "format": "ipv4",
          "description": "IP address to use for DNS override."
        },
        "httpTargetTime": {
          "$ref": "#/$defs/Tests_API_TestHttpTargetTime"
        },
        "httpTimeLimit": {
          "$ref": "#/$defs/Tests_API_TestHttpTimeLimit"
        },
        "httpVersion": {
          "$ref": "#/$defs/Tests_API_TestHttpVersion"
        },
        "includeHeaders": {
          "$ref": "#/$defs/Tests_API_TestIncludeHeaders"
        },
        "mtuMeasurements": {
          "$ref": "#/$defs/Tests_API_TestMtuMeasurements"
        },
        "networkMeasurements": {
          "$ref": "#/$defs/Tests_API_TestNetworkMeasurements"
        },
        "numPathTraces": {
          "$ref": "#/$defs/Tests_API_TestNumPathTraces"
        },
        "oAuth": {
          "$ref": "#/$defs/Tests_API_OAuth"
        },
        "password": {
          "$ref": "#/$defs/Tests_API_TestPassword"
        },
        "pathTraceMode": {
          "$ref": "#/$defs/Tests_API_TestPathTraceMode"
        },
        "probeMode": {
          "$ref": "#/$defs/Tests_API_TestProbeMode"
        },
        "protocol": {
          "$ref": "#/$defs/Tests_API_TestProtocol"
        },
        "sslVersion": {
          "$ref": "#/$defs/Tests_API_TestSslVersion"
        },
        "sslVersionId": {
          "$ref": "#/$defs/Tests_API_TestSslVersionId"
        },
        "url": {
          "$ref": "#/$defs/Tests_API_TestUrl"
        },
        "useNtlm": {
          "$ref": "#/$defs/Tests_API_TestUseNtlm"
        },
        "userAgent": {
          "$ref": "#/$defs/Tests_API_TestUserAgent"
        },
        "username": {
          "$ref": "#/$defs/Tests_API_TestUsername"
        },
        "verifyCertificate": {
          "$ref": "#/$defs/Tests_API_TestVerifyCertificate"
        },
        "allowUnsafeLegacyRenegotiation": {
          "$ref": "#/$defs/Tests_API_TestAllowUnsafeLegacyRenegotiation"
        },
        "followRedirects": {
          "$ref": "#/$defs/Tests_API_TestFollowRedirects"
        },
        "fixedPacketRate": {
          "$ref": "#/$defs/Tests_API_TestFixedPacketRate"
        },
        "overrideAgentProxy": {
          "$ref": "#/$defs/Tests_API_TestOverrideAgentProxy"
        },
        "overrideProxyId": {
          "$ref": "#/$defs/Tests_API_TestOverrideProxyId"
        },
        "collectProxyNetworkData": {
          "$ref": "#/$defs/Tests_API_TestCollectProxyNetworkData"
        },
        "vaultCredentials": {
          "type": "array",
          "description": "List of credential IDs that are stored in an external vault.",
          "items": {
            "$ref": "#/$defs/Tests_API_TestVaultCredential"
          }
        }
      }
    },
    "Tests_API_HttpServerProperties": {
      "allOf": [
        {
          "$ref": "#/$defs/Tests_API_HttpServerBaseProperties"
        },
        {
          "type": "object",
          "required": [
            "url"
          ],
          "properties": {
            "headers": {
              "$ref": "#/$defs/Tests_API_TestHeaders"
            },
            "downloadLimit": {
              "type": "integer",
              "description": "Specifies maximum number of bytes to download from the target object."
            },
            "dnsOverride": {
              "type": "string",
              "format": "ipv4",
              "description": "IP address to use for DNS override."
            },
            "randomizedStartTime": {
              "$ref": "#/$defs/Tests_API_TestRandomizedStartTime"
            },
            "requestMethod": {
              "$ref": "#/$defs/Tests_API_RequestMethod"
            },
            "postBody": {
              "type": "string",
              "description": "Enter the body for the HTTP POST request in this field. No special escaping is required. If content is provided and `requestMethod` is not specified, `requestMethod` is automatically set to `post`."
            },
            "ipv6Policy": {
              "$ref": "#/$defs/Tests_API_TestIpv6Policy"
            },
            "type": {
              "$ref": "#/$defs/Tests_API_TestHttpType"
            }
          }
        }
      ]
    },
    "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"
        }
      }
    },
    "Tests_API_MonitorsRequest": {
      "type": "object",
      "properties": {
        "monitors": {
          "type": "array",
          "description": "Contains list of BGP monitor IDs (get `monitorId` from `/monitors` endpoint)",
          "writeOnly": true,
          "readOnly": false,
          "items": {
            "type": "string"
          }
        }
      }
    },
    "Tests_API_OAuth": {
      "type": "object",
      "properties": {
        "testUrl": {
          "$ref": "#/$defs/Tests_API_TestUrl"
        },
        "requestMethod": {
          "$ref": "#/$defs/Tests_API_RequestMethod"
        },
        "postBody": {
          "type": "string",
          "description": "Enter the OAuth body for the HTTP POST request in this field when using OAuth as the authentication mechanism. No special escaping is required. The value is saved only when `requestMethod` is set to `post`."
        },
        "headers": {
          "type": "string",
          "description": "Request headers used for OAuth."
        },
        "authType": {
          "$ref": "#/$defs/Tests_API_OAuthAuthType"
        },
        "username": {
          "type": "string",
          "description": "OAuth username"
        },
        "password": {
          "type": "string",
          "description": "OAuth password",
          "writeOnly": true
        }
      },
      "description": "Use this only if you want to use OAuth as the authentication mechanism."
    },
    "Tests_API_OAuthAuthType": {
      "type": "string",
      "description": "HTTP authentication type used for the OAuth request.",
      "enum": [
        "none",
        "basic",
        "ntlm"
      ],
      "default": "none"
    },
    "Tests_API_RequestMethod": {
      "type": "string",
      "enum": [
        "get",
        "post"
      ],
      "description": "HTTP request method."
    },
    "Tests_API_TestAgentRequest": {
      "type": "object",
      "required": [
        "agentId"
      ],
      "properties": {
        "agentId": {
          "type": "string",
          "description": "The agent ID. Get `agentId` from `/agents` endpoint."
        },
        "sourceIpAddress": {
          "type": "string",
          "description": "The IP address from the `ipAddresses` field in agent details, used for interface selection. Get `ipAddresses` from the `/agents` endpoint."
        }
      }
    },
    "Tests_API_TestAgentsRequest": {
      "type": "array",
      "description": "Contains list of Agent IDs (get `agentId` from `/agents` endpoint).",
      "items": {
        "$ref": "#/$defs/Tests_API_TestAgentRequest"
      }
    },
    "Tests_API_TestAllowUnsafeLegacyRenegotiation": {
      "type": "boolean",
      "description": "Allows TLS renegotiation with servers not supporting RFC 5746. Default Set to true to allow unsafe legacy renegotiation.",
      "default": true
    },
    "Tests_API_TestAuthType": {
      "type": "string",
      "description": "HTTP authentication type.",
      "enum": [
        "none",
        "basic",
        "ntlm",
        "kerberos",
        "oauth"
      ],
      "default": "none"
    },
    "Tests_API_TestBandwidthMeasurements": {
      "type": "boolean",
      "description": "Set to `true` to enable bandwidth measurements, only applies to Enterprise agents assigned to the test."
    },
    "Tests_API_TestBgpMeasurements": {
      "type": "boolean",
      "description": "Set to `true` to enable bgp measurements.",
      "default": true
    },
    "Tests_API_TestClientCertificate": {
      "type": "string",
      "description": "String representation (containing newline characters) of client certificate, the private key must be placed first, then the certificate."
    },
    "Tests_API_TestCollectProxyNetworkData": {
      "type": "boolean",
      "description": "Indicates whether network data to the proxy should be collected.",
      "default": false
    },
    "Tests_API_TestCreatedBy": {
      "type": "string",
      "description": "User that created the test.",
      "readOnly": true
    },
    "Tests_API_TestCreatedDate": {
      "type": "string",
      "format": "date-time",
      "description": "UTC created date (ISO date-time format).",
      "readOnly": true
    },
    "Tests_API_TestCustomHeaders": {
      "type": "object",
      "properties": {
        "root": {
          "type": "object",
          "description": "Use these HTTP headers for root server request.",
          "additionalProperties": {
            "type": "string"
          }
        },
        "domains": {
          "type": "object",
          "description": "Use these HTTP headers for the specified domains.",
          "additionalProperties": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            }
          }
        },
        "all": {
          "type": "object",
          "description": "Use these HTTP headers for all domains.",
          "additionalProperties": {
            "type": "string"
          }
        }
      }
    },
    "Tests_API_TestDesiredStatusCode": {
      "type": "string",
      "description": "Specify the HTTP status code value that indicates a successful response. The default value accepts any 2xx or 3xx status code.",
      "default": "default"
    },
    "Tests_API_TestDistributedTracing": {
      "type": "boolean",
      "description": "Adds distributed tracing headers to API requests using B3 and W3C standards."
    },
    "Tests_API_TestFixedPacketRate": {
      "type": "integer",
      "minimum": 0,
      "maximum": 100,
      "description": "Sets packets rate sent to measure the network in packets per second."
    },
    "Tests_API_TestFollowRedirects": {
      "type": "boolean",
      "description": "To disable following HTTP/301 or HTTP/302 redirect directives, set this parameter to `false`.",
      "default": true
    },
    "Tests_API_TestHeaders": {
      "type": "array",
      "description": "HTTP request headers used.",
      "items": {
        "type": "string"
      }
    },
    "Tests_API_TestHttpTargetTime": {
      "type": "integer",
      "minimum": 100,
      "maximum": 5000,
      "description": "Target time for HTTP server completion, specified in milliseconds."
    },
    "Tests_API_TestHttpTimeLimit": {
      "type": "integer",
      "minimum": 5,
      "maximum": 60,
      "description": "HTTP time limit in seconds.",
      "default": 5
    },
    "Tests_API_TestHttpType": {
      "type": "string",
      "readOnly": true
    },
    "Tests_API_TestHttpVersion": {
      "type": "integer",
      "minimum": 1,
      "maximum": 2,
      "description": "HTTP protocol version. Set to '2' to prefer HTTP/2, or '1' to use only HTTP/1.1.",
      "default": 2
    },
    "Tests_API_TestIncludeHeaders": {
      "type": "boolean",
      "description": "Set to `true` to capture response headers for objects loaded by the test.",
      "default": true
    },
    "Tests_API_TestInterval": {
      "type": "integer",
      "enum": [
        60,
        120,
        300,
        600,
        900,
        1800,
        3600
      ],
      "description": "Interval between test runs in seconds.",
      "default": 60
    },
    "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"
    },
    "Tests_API_TestLinks": {
      "type": "object",
      "description": "A list of links that can be accessed to get more information",
      "properties": {
        "self": {
          "$ref": "#/$defs/Tests_API_TestSelfLink"
        },
        "testResults": {
          "$ref": "#/$defs/Tests_API_TestResults"
        }
      },
      "readOnly": true
    },
    "Tests_API_TestMtuMeasurements": {
      "type": "boolean",
      "description": "Set `true` to measure MTU sizes on network from agents to the target."
    },
    "Tests_API_TestNetworkMeasurements": {
      "type": "boolean",
      "description": "Enable or disable network measurements. Set to true to enable or false to disable network measurements.",
      "default": true
    },
    "Tests_API_TestNumPathTraces": {
      "type": "integer",
      "minimum": 1,
      "maximum": 10,
      "description": "Number of path traces executed by the agent.",
      "default": 3
    },
    "Tests_API_TestOverrideAgentProxy": {
      "type": "boolean",
      "description": "Flag indicating if a proxy other than the default should be used. To override the default proxy for agents, set to `true` and specify a value for `overrideProxyId`.",
      "default": false
    },
    "Tests_API_TestOverrideProxyId": {
      "type": "string",
      "description": "ID of the proxy to be used if the default proxy is overridden."
    },
    "Tests_API_TestPassword": {
      "type": "string",
      "description": "Password for Basic/NTLM authentication.",
      "writeOnly": true
    },
    "Tests_API_TestPathTraceMode": {
      "type": "string",
      "enum": [
        "classic",
        "in-session"
      ],
      "description": "Select `inSession` to perform the path trace within a TCP session.",
      "default": "classic"
    },
    "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"
    },
    "Tests_API_TestProtocol": {
      "type": "string",
      "enum": [
        "tcp",
        "icmp",
        "udp"
      ],
      "description": "Protocol used by dependent network tests (end-to-end, path trace, PMTUD).",
      "default": "tcp"
    },
    "Tests_API_TestRandomizedStartTime": {
      "type": "boolean",
      "description": "Indicates whether agents should randomize the start time in each test round.",
      "default": false
    },
    "Tests_API_TestRequest": {
      "allOf": [
        {
          "$ref": "#/$defs/Tests_API_BaseRequest"
        },
        {
          "type": "object",
          "properties": {
            "agents": {
              "$ref": "#/$defs/Tests_API_TestAgentsRequest"
            }
          }
        }
      ],
      "required": [
        "agents"
      ]
    },
    "Tests_API_TestResults": {
      "type": "array",
      "description": "Reference to the test results.",
      "items": {
        "$ref": "#/$defs/Tests_API_Link"
      }
    },
    "Tests_API_TestSelfLink": {
      "allOf": [
        {
          "$ref": "#/$defs/Tests_API_Link"
        },
        {
          "description": "Reference to the test."
        }
      ]
    },
    "Tests_API_TestSslVersion": {
      "type": "string",
      "description": "Reflects the verbose SSL protocol version used by a test.",
      "readOnly": true
    },
    "Tests_API_TestSslVersionId": {
      "type": "string",
      "description": "SSL version options:\n\n* Use '0' for automatic selection.\n* Use '3' for SSLv3.\n* Use '4' for TLS v1.0.\n* Use '5' for TLS v1.1.\n* Use '6' for TLS v1.2.\n* Use '7' for TLS v1.3.\n",
      "enum": [
        "0",
        "3",
        "4",
        "5",
        "6",
        "7"
      ],
      "default": "0"
    },
    "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
    },
    "Tests_API_TestUrl": {
      "type": "string",
      "description": "Target for the test."
    },
    "Tests_API_TestUseNtlm": {
      "type": "boolean",
      "description": "Set to true to use NTLM, false to use Basic Authentication. Requires username and password to be set."
    },
    "Tests_API_TestUsePublicBgp": {
      "type": "boolean",
      "description": "Indicate if all available public BGP monitors should be used, when ommited defaults to `bgpMeasurements` value.",
      "default": true
    },
    "Tests_API_TestUserAgent": {
      "type": "string",
      "description": "User-agent string to be provided during the test."
    },
    "Tests_API_TestUsername": {
      "type": "string",
      "description": "Username for Basic/NTLM authentication."
    },
    "Tests_API_TestVaultCredential": {
      "type": "object",
      "properties": {
        "secretId": {
          "type": "string",
          "description": "UUID of the configured secret."
        },
        "target": {
          "$ref": "#/$defs/Tests_API_TestVaultCredentialTarget"
        }
      }
    },
    "Tests_API_TestVaultCredentialTarget": {
      "type": "string",
      "enum": [
        "username",
        "password",
        "script"
      ],
      "description": "The target setting that the credential should be used for."
    },
    "Tests_API_TestVerifyCertificate": {
      "type": "boolean",
      "description": "Ignore or acknowledge certificate errors. Set to false to ignore certificate errors.",
      "default": false
    },
    "Tests_API_UnexpandedHttpServerTest": {
      "allOf": [
        {
          "$ref": "#/$defs/Tests_API_UnexpandedTest"
        },
        {
          "$ref": "#/$defs/Tests_API_UnexpandedInstantTest"
        },
        {
          "$ref": "#/$defs/Tests_API_HttpServerProperties"
        },
        {
          "type": "object",
          "required": [
            "interval"
          ],
          "properties": {
            "bgpMeasurements": {
              "$ref": "#/$defs/Tests_API_TestBgpMeasurements"
            },
            "usePublicBgp": {
              "$ref": "#/$defs/Tests_API_TestUsePublicBgp"
            }
          }
        }
      ]
    },
    "Tests_API_UnexpandedInstantTest": {
      "type": "object",
      "properties": {
        "createdBy": {
          "$ref": "#/$defs/Tests_API_TestCreatedBy"
        },
        "createdDate": {
          "$ref": "#/$defs/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/Tests_API_TestType"
        },
        "_links": {
          "$ref": "#/$defs/Tests_API_TestLinks"
        }
      }
    },
    "Tests_API_UnexpandedTest": {
      "type": "object",
      "properties": {
        "interval": {
          "$ref": "#/$defs/Tests_API_TestInterval"
        },
        "alertsEnabled": {
          "type": "boolean",
          "description": "Indicates if alerts are enabled."
        },
        "enabled": {
          "$ref": "#/$defs/Tests_API_Enabled"
        }
      }
    }
  }
}