{"type":"api","title":"List API tests","meta":{"id":"/apps/pubhub/media/000-v7-apis/5b3454a4300b838cc17f7b2cdc0690fdd15058d5/78f45443-a63d-31b5-a066-5ca5d2bfbb18","info":{"description":"This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests.\n","title":"Tests API","version":"7.0.34"},"security":[{"BearerAuth":[]}],"tags":[{"description":"Get all tests","name":"Tests"},{"description":"Agent to Server test management operations","name":"Agent to Server Tests"},{"description":"Agent to Agent test management operations","name":"Agent to Agent Tests"},{"description":"BGP test management operations","name":"BGP Tests"},{"description":"DNS Server test management operations","name":"DNS Server Tests"},{"description":"DNS Trace test management operations","name":"DNS Trace Tests"},{"description":"DNSSEC test management operations","name":"DNSSEC Tests"},{"description":"HTTP Server test management operations","name":"HTTP Server Tests"},{"description":"Page Load test management operations","name":"Page Load Tests"},{"description":"Web Transactions test management operations","name":"Web Transaction Tests"},{"description":"API test management operations","name":"API Tests"},{"description":"FTP Server test management operations","name":"FTP Server Tests"},{"description":"SIP Server test management operations","name":"SIP Server Tests"},{"description":"Voice test management operations","name":"Voice Tests"},{"name":"Path Visualization Interface Groups"}],"externalDocs":{"description":"Find out more about Cloud and Enterprise Agent-Based Tests","url":"https://docs.thousandeyes.com/product-documentation/internet-and-wan-monitoring/tests#cloud-and-enterprise-agent-based-tests"},"openapi":"3.0.1","servers":[{"description":"ThousandEyes API production URL","url":"https://api.thousandeyes.com/v7"}],"securitySchemes":{"BearerAuth":{"description":"Bearer authentication token","scheme":"bearer","type":"http"}}},"spec":{"description":"Returns a list of all API tests and saved events.","operationId":"getApiTests","parameters":[{"description":"A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response.","in":"query","name":"aid","required":false,"schema":{"example":"1234","type":"string"}}],"responses":{"200":{"content":{"application/hal+json":{"schema":{"properties":{"tests":{"items":{"properties":{"interval":{"default":60,"description":"Interval between test runs in seconds.","enum":[60,120,300,600,900,1800,3600],"example":60,"type":"integer","$$ref":"#/components/schemas/TestInterval"},"alertsEnabled":{"description":"Indicates if alerts are enabled.","example":true,"type":"boolean"},"enabled":{"default":true,"description":"Test is enabled.","example":true,"type":"boolean"},"createdBy":{"description":"User that created the test.","example":"user@user.com","readOnly":true,"type":"string"},"createdDate":{"description":"UTC created date (ISO date-time format).","example":"2022-07-17T22:00:54Z","format":"date-time","readOnly":true,"type":"string"},"description":{"description":"A description of the test.","example":"ThousandEyes Test","type":"string"},"liveShare":{"description":"Indicates if the test is shared with the account group.","example":false,"readOnly":true,"type":"boolean"},"modifiedBy":{"description":"User that modified the test.","example":"user@user.com","readOnly":true,"type":"string"},"modifiedDate":{"description":"UTC last modification date (ISO date-time format).","example":"2022-07-17T22:00:54Z","format":"date-time","readOnly":true,"type":"string"},"savedEvent":{"description":"Indicates if the test is a saved event.","readOnly":true,"type":"boolean"},"testId":{"description":"Each test is assigned an unique ID; this is used to access test information and results from other endpoints.","example":"281474976710706","readOnly":true,"type":"string"},"testName":{"description":"The name of the test. Test name must be unique.","example":"ThousandEyes Test","type":"string"},"type":{"description":"This is a read only value, as test type is implicit in the test creation url.","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"],"example":"api","readOnly":true,"type":"string","$$ref":"#/components/schemas/TestType"},"_links":{"description":"A list of links that can be accessed to get more information","properties":{"self":{"description":"Reference to the test.","properties":{"href":{"description":"Its value is either a URI [RFC3986] or a URI template [RFC6570].","example":"https://api.thousandeyes.com/v7/link/to/resource/id","type":"string"},"templated":{"description":"Should be true when the link object's \"href\" property is a URI template.","type":"boolean"},"type":{"description":"Used as a hint to indicate the media type expected when dereferencing the target resource.","type":"string"},"deprecation":{"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.","type":"string"},"name":{"description":"Its value may be used as a secondary key for selecting link objects that share the same relation type.","type":"string"},"profile":{"description":"A URI that hints about the profile of the target resource.","type":"string"},"title":{"description":"Intended for labelling the link with a human-readable identifier","type":"string"},"hreflang":{"description":"Indicates the language of the target resource","type":"string"}},"required":["href"],"type":"object","$$ref":"#/components/schemas/TestSelfLink","example":{"href":"https://api.thousandeyes.com/v7/tests/{type}/281474976710706"}},"testResults":{"description":"Reference to the test results.","example":[{"href":"https://api.thousandeyes.com/v7/test-results/281474976710706/network"},{"href":"https://api.thousandeyes.com/v7/test-results/281474976710706/path-vis"}],"items":{"description":"A hyperlink from the containing resource to a URI.","properties":{"href":{"description":"Its value is either a URI [RFC3986] or a URI template [RFC6570].","example":"https://api.thousandeyes.com/v7/link/to/resource/id","type":"string"},"templated":{"description":"Should be true when the link object's \"href\" property is a URI template.","type":"boolean"},"type":{"description":"Used as a hint to indicate the media type expected when dereferencing the target resource.","type":"string"},"deprecation":{"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.","type":"string"},"name":{"description":"Its value may be used as a secondary key for selecting link objects that share the same relation type.","type":"string"},"profile":{"description":"A URI that hints about the profile of the target resource.","type":"string"},"title":{"description":"Intended for labelling the link with a human-readable identifier","type":"string"},"hreflang":{"description":"Indicates the language of the target resource","type":"string"}},"required":["href"],"type":"object","$$ref":"#/components/schemas/Link"},"type":"array"}},"readOnly":true,"type":"object","$$ref":"#/components/schemas/TestLinks"},"collectProxyNetworkData":{"default":false,"description":"Indicates whether network data to the proxy should be collected.","example":false,"type":"boolean"},"followRedirects":{"default":true,"description":"To disable following HTTP/301 or HTTP/302 redirect directives, set this parameter to `false`.","example":true,"type":"boolean"},"mtuMeasurements":{"description":"Set `true` to measure MTU sizes on network from agents to the target.","example":false,"type":"boolean"},"networkMeasurements":{"default":true,"description":"Enable or disable network measurements. Set to true to enable or false to disable network measurements.","example":true,"type":"boolean"},"numPathTraces":{"default":3,"description":"Number of path traces executed by the agent.","example":3,"maximum":10,"minimum":1,"type":"integer"},"overrideAgentProxy":{"default":false,"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`.","example":false,"type":"boolean"},"overrideProxyId":{"description":"ID of the proxy to be used if the default proxy is overridden.","example":"281474976710706","type":"string"},"pathTraceMode":{"default":"classic","description":"Select `inSession` to perform the path trace within a TCP session.","enum":["classic","in-session"],"example":"classic","type":"string","$$ref":"#/components/schemas/TestPathTraceMode"},"predefinedVariables":{"items":{"properties":{"name":{"description":"Variable name. Must be unique.","example":"myUsername","type":"string"},"value":{"description":"Variable value, will be treated as string.","example":"ThousandEyesAccountUserName","type":"string"}},"type":"object","$$ref":"#/components/schemas/ApiPredefinedVariable"},"type":"array"},"probeMode":{"default":"auto","description":"Probe mode used by network test, only valid when the protocol is set to TCP.","enum":["auto","sack","syn"],"example":"auto","type":"string","$$ref":"#/components/schemas/TestProbeMode"},"protocol":{"default":"tcp","description":"Protocol used by dependent network tests (end-to-end, path trace, PMTUD).","enum":["tcp","icmp","udp"],"example":"tcp","type":"string","$$ref":"#/components/schemas/TestProtocol"},"randomizedStartTime":{"default":false,"description":"Indicates whether agents should randomize the start time in each test round.","example":false,"type":"boolean"},"requests":{"items":{"properties":{"assertions":{"description":"List of assertion objects.","items":{"properties":{"name":{"description":"Set to `status-code` to assert the response status code. Set to `response-body` to assert data is present in the response body. Use `ApiRequestAssertion` to set the value for the assertion.","enum":["status-code","response-body"],"example":"status-code","type":"string","$$ref":"#/components/schemas/ApiRequestAssertionName"},"operator":{"description":"If `name = status-code``, accepted values are [is, is-not]. If `name = response-body``, accepted values are [includes, not-includes]`.","enum":["is","is-not","includes","not-includes"],"example":"is","type":"string","$$ref":"#/components/schemas/ApiRequestAssertionOperator"},"value":{"description":"The value of the assertion. If name = `status-code`, the status code to assert. If name = `response-body`, the lookup value to assert.","example":"200","type":"string"}},"type":"object","$$ref":"#/components/schemas/ApiRequestAssertion"},"type":"array"},"authType":{"default":"none","description":"Will override the Authorization request header.","enum":["none","basic","bearer-token","oauth2"],"example":"none","type":"string","$$ref":"#/components/schemas/ApiRequestAuthType"},"bearerToken":{"description":"The bearer token if `authType = bearer-token`.","example":"abcd-1234-...","type":"string","writeOnly":true},"body":{"description":"POST/PUT request body. Must be in JSON format.","type":"string"},"clientAuthentication":{"description":"The OAuth2 client authentication location type.","enum":["basic-auth-header","in-body"],"example":"basic-auth-header","type":"string","$$ref":"#/components/schemas/ApiClientAuthentication"},"clientId":{"description":"The application ID used when `authType` is set to \"oauth2\".","example":"client-id","type":"string","writeOnly":true},"clientSecret":{"description":"The private client secret used when `authType` is set to \"oauth2\".","example":"client-secret","type":"string","writeOnly":true},"collectApiResponse":{"default":true,"description":"Set to `true` if API response body should be collected and saved. Set to `false` if API response body should not be saved.","example":true,"type":"boolean"},"headers":{"description":"Array of API Request Header objects.","items":{"properties":{"key":{"description":"Request header key.","example":"x-custom-header","type":"string"},"value":{"description":"Request header value. Supports variables `{{variableName}}`.","example":"keep-alive","type":"string"}},"type":"object","$$ref":"#/components/schemas/ApiRequestHeader"},"type":"array"},"method":{"description":"HTTP request method.","enum":["get","post","put","delete","patch"],"example":"get","type":"string","$$ref":"#/components/schemas/ApiRequestMethod"},"name":{"description":"API step name, must be unique.","example":"Step 1","type":"string"},"password":{"description":"The password if `authType = basic`.","example":"basic_pw123","type":"string","writeOnly":true},"scope":{"description":"Application-specific scope values for the access token when `authType` is \"oauth2\".","example":"read, write, deploy","type":"string"},"tokenUrl":{"description":"The endpoint used to request the access token when `authType` is \"oauth2\".","example":"https://id.cisco.com/oauth2/default/v1/token","type":"string"},"url":{"description":"Request url. Supports variables in the format `{{variableName}}`.","example":"https://api.thousandeyes.com/v7/status","type":"string"},"username":{"description":"The username if `authType = basic`.","example":"ThousandEyesUserName","type":"string"},"variables":{"description":"Array of API post request variable objects.","items":{"properties":{"name":{"description":"Variable name","example":"myTestName","type":"string"},"value":{"description":"The JSON path of data within the Response Body to assign to this variable.","example":"tests[0].name","type":"string"}},"type":"object","$$ref":"#/components/schemas/ApiRequestVariable"},"type":"array"},"waitTimeMs":{"description":"Post request delay before executing the next API requests, in milliseconds.","example":0,"type":"integer"}},"required":["name","url"],"type":"object","$$ref":"#/components/schemas/ApiRequest"},"type":"array"},"sslVersionId":{"default":"0","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","enum":["0","3","4","5","6"],"example":"0","type":"string","$$ref":"#/components/schemas/TestSslVersionId"},"targetTime":{"description":"Target time for completion metric, defaults to 50% of time limit specified in seconds. (0 means default behavior)","example":1,"maximum":60,"minimum":0,"type":"integer"},"timeLimit":{"default":30,"description":"Time limit for transaction in seconds. Exceeding this limit will result in a Timeout error.","maximum":180,"minimum":5,"type":"integer"},"url":{"description":"Target for the test.","example":"www.thousandeyes.com","type":"string"},"bgpMeasurements":{"default":true,"description":"Set to `true` to enable bgp measurements.","example":true,"type":"boolean","$$ref":"#/components/schemas/TestBgpMeasurements"},"usePublicBgp":{"default":true,"description":"Indicate if all available public BGP monitors should be used, when ommited defaults to `bgpMeasurements` value.","example":true,"type":"boolean","$$ref":"#/components/schemas/TestUsePublicBgp"}},"type":"object","$$ref":"#/components/schemas/UnexpandedApiTest","required":["requests","url","interval"]},"type":"array"},"_links":{"description":"A links object containing the self link.","properties":{"self":{"description":"A hyperlink from the containing resource to a URI.","properties":{"href":{"description":"Its value is either a URI [RFC3986] or a URI template [RFC6570].","example":"https://api.thousandeyes.com/v7/link/to/resource/id","type":"string"},"templated":{"description":"Should be true when the link object's \"href\" property is a URI template.","type":"boolean"},"type":{"description":"Used as a hint to indicate the media type expected when dereferencing the target resource.","type":"string"},"deprecation":{"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.","type":"string"},"name":{"description":"Its value may be used as a secondary key for selecting link objects that share the same relation type.","type":"string"},"profile":{"description":"A URI that hints about the profile of the target resource.","type":"string"},"title":{"description":"Intended for labelling the link with a human-readable identifier","type":"string"},"hreflang":{"description":"Indicates the language of the target resource","type":"string"}},"required":["href"],"type":"object","$$ref":"#/components/schemas/Link"}},"readOnly":true,"type":"object","$$ref":"#/components/schemas/SelfLinks"}},"type":"object","$$ref":"#/components/schemas/ApiTests"}}},"description":"OK"},"401":{"content":{"application/problem+json":{"schema":{"properties":{"error":{"example":"invalid_token","type":"string"},"error_description":{"example":"Invalid access token","type":"string"}},"type":"object","$$ref":"#/components/schemas/UnauthorizedError"}}},"description":"Unauthorized"},"403":{"content":{"application/problem+json":{"schema":{"properties":{"type":{"description":"A URI reference that identifies the problem type. When this member is not present, its value is assumed to be \"about:blank\".","type":"string"},"title":{"description":"A short, human-readable summary of the problem type.","type":"string"},"status":{"description":"The HTTP status code generated by the origin server for this occurrence of the problem.","type":"integer"},"detail":{"description":"A human-readable explanation specific to this occurrence of the problem.","type":"string"},"instance":{"description":"A URI reference that identifies the specific occurrence of the problem.","type":"string"}},"type":"object","$$ref":"#/components/schemas/Error"}}},"description":"Insufficient permissions to query endpoint"},"404":{"content":{"application/problem+json":{"example":{"type":"about:blank","title":"URI Resource Not Found","status":404,"detail":"Details explaining if the 404 error is related to an invalid URI or a wrong ID","instance":"/v7"},"schema":{"properties":{"type":{"description":"A URI reference that identifies the problem type. When this member is not present, its value is assumed to be \"about:blank\".","type":"string"},"title":{"description":"A short, human-readable summary of the problem type.","type":"string"},"status":{"description":"The HTTP status code generated by the origin server for this occurrence of the problem.","type":"integer"},"detail":{"description":"A human-readable explanation specific to this occurrence of the problem.","type":"string"},"instance":{"description":"A URI reference that identifies the specific occurrence of the problem.","type":"string"}},"type":"object","$$ref":"#/components/schemas/Error"}}},"description":"Not found"},"429":{"content":{"application/problem+json":{"schema":{"properties":{"type":{"description":"A URI reference that identifies the problem type. When this member is not present, its value is assumed to be \"about:blank\".","type":"string"},"title":{"description":"A short, human-readable summary of the problem type.","type":"string"},"status":{"description":"The HTTP status code generated by the origin server for this occurrence of the problem.","type":"integer"},"detail":{"description":"A human-readable explanation specific to this occurrence of the problem.","type":"string"},"instance":{"description":"A URI reference that identifies the specific occurrence of the problem.","type":"string"}},"type":"object","$$ref":"#/components/schemas/Error"}}},"description":"Exhausted rate limit for the organization"},"500":{"content":{"application/problem+json":{"example":{"type":"about:blank","title":"Internal server error","status":500,"detail":"Optional detail about the internal error message.","instance":"/v7"},"schema":{"properties":{"type":{"description":"A URI reference that identifies the problem type. When this member is not present, its value is assumed to be \"about:blank\".","type":"string"},"title":{"description":"A short, human-readable summary of the problem type.","type":"string"},"status":{"description":"The HTTP status code generated by the origin server for this occurrence of the problem.","type":"integer"},"detail":{"description":"A human-readable explanation specific to this occurrence of the problem.","type":"string"},"instance":{"description":"A URI reference that identifies the specific occurrence of the problem.","type":"string"}},"type":"object","$$ref":"#/components/schemas/Error"}}},"description":"Internal server error"},"502":{"content":{"application/problem+json":{"schema":{"properties":{"type":{"description":"A URI reference that identifies the problem type. When this member is not present, its value is assumed to be \"about:blank\".","type":"string"},"title":{"description":"A short, human-readable summary of the problem type.","type":"string"},"status":{"description":"The HTTP status code generated by the origin server for this occurrence of the problem.","type":"integer"},"detail":{"description":"A human-readable explanation specific to this occurrence of the problem.","type":"string"},"instance":{"description":"A URI reference that identifies the specific occurrence of the problem.","type":"string"}},"type":"object","$$ref":"#/components/schemas/Error"}}},"description":"Bad Gateway"},"default":{"description":"An error occurred"}},"summary":"List API tests","tags":["API Tests"],"__originalOperationId":"getApiTests","security":[{"BearerAuth":[]}],"method":"get","path":"/tests/api"}}