Consent Manager

  • Your Privacy

  • Strictly Necessary Cookies

  • Performance Cookies

  • Targeting Cookies

  • Functional Cookies

Your Privacy

When you visit any website, it may store or retrieve information on your browser, mostly in the form of cookies. This information might be about you, your preferences or your device and is mostly used to make the site work as you expect it to. The information does not usually directly identify you, but it can give you a more personalized web experience. Because we respect your right to privacy, you can choose not to allow some types of cookies. Click on the different category headings to find out more and change our default settings. However, blocking some types of cookies may impact your experience of the site and the services we are able to offer. For more information on the information we collect and how we use it see the Website Privacy Statement.

Strictly Necessary Cookies

Always Active

These cookies are necessary for the website to function and cannot be switched off in our systems. They are usually only set in response to actions made by you which amount to a request for services, such as setting your privacy preferences, logging in or filling in forms. You can set your browser to block or alert you about these cookies, but some parts of the site will not then work. These cookies do not store any personally identifiable information.

Performance Cookies

Off On

These cookies allow us to count visits and traffic sources so we can measure and improve the performance of our site. They help us to know which pages are the most and least popular and see how visitors move around the site. All information these cookies collect is aggregated and therefore anonymous. If you do not allow these cookies we will not know when you have visited our site, and will not be able to monitor its performance.

Targeting Cookies

Off On

These cookies may be set through our site by our advertising partners. They may be used by those companies to build a profile of your interests and show you relevant adverts on other sites. They do not store directly personal information, but are based on uniquely identifying your browser and internet device. If you do not allow these cookies, you will experience less targeted advertising.

Functional Cookies

These cookies enable the website to provide enhanced functionality and personalization. They may be set by us or by third party providers whose services we have added to our pages. If you do not allow these cookies then some or all of these services may not function properly.

Your Privacy [`dialog closed`]

By continuing to use our website, you acknowledge the use of cookies. Privacy Statement | Change Settings

Cookies allow us to optimise your use of our website. We also use third-party cookies for advertising and analytics. Please read our Privacy Statement and Website Privacy Statement for more information on how we use cookies.

DEVELOPER REFERENCE

Search Results

×Clear
  • Overview

    • Welcome
    • Authentication
    • Account Context
    • Response Formats
    • Time Ranges
    • Response Status Codes
    • Rate Limits
    • Pagination
    • Change Policy
    • API Change Summary
  • Tests

    • Test List
    • Test List by Type
    • Test Details
    • Test Metadata
    • Creating a Test
    • Updating a Test
    • Deleting a Test
    • Saved Events
  • Test Data

    • (Network) End-to-End Metrics
    • (Network) Path Visualization
    • (Network) Detailed Path Trace
    • (Network) BGP Metrics
    • (Network) BGP Route Information
    • (Web) HTTP Server
    • (Web) Page Load
    • (Web) Page Load Component Detail
    • (Web) Transactions
    • (Web) Transaction Detail
    • (Web) Transaction Component Detail
    • (DNS) Domain Trace
    • (DNS) Server Metrics
    • (DNS) DNSSEC
    • (Voice) Metrics
  • Agents & Monitors

    • Agent List
    • Agent Details
    • Updating an Agent
    • Deleting an Agent
    • BGP Monitor List
  • Alerts

    • Alert Rules
    • Active Alerts
    • Alert Detail
  • Labels

    • Labels List
    • Labels list by type
    • Label details
    • Label details (by label type)
    • Creating a label
    • Updating a label
    • Deleting a label
  • User Management

    • Account Groups List

  • APIv6  |  APIv7 (preview)

  • Product Documentation
  • Customer Success Center
  • Public GitHub Repository

Try ThousandEyes Now! Sign Up

Agents & Monitors

GET /v5/agents Agent List

Returns a list of all agents available to your account in ThousandEyes, including both Enterprise and Cloud agents.

Optional Parameters

  • agentTypes=CLOUD|ENTERPRISE|ENTERPRISE_CLUSTER optional, specifies the type of agents requested. Accepts either a single allowed value or a comma-separated list of allowed values
  • format=json|xml optional, specifies the format of output requested. See Output Formats for more information
  • aid={accountId} optional and requires the user to be assigned to the target account, specifies the account context of the request, obtained from the /accounts endpoint. Specifying this parameter without the user to be assigned to the target account will result in an error response. See Account Context for more information

Request

  • no request body

Example

$curl https://api.thousandeyes.com/v5/agents.json \ -u {email}:{authToken}

Response

Sends back an array of agents, specifying agentId, which can be used by other areas of the API. The agent’s public IP addresses will be shown, along with last. If an agent is an Enterprise agent, the agent’s public and private IP addresses will be shown, as well as the public network in which the agent is located.

FieldData TypeUnitsNotes
agentIdintegern/aunique ID of agent
agentNamestringn/adisplay name of the agent
agentTypestringn/aCloud, Enterprise or Enterprise Cluster, shows the type of agent
countryIdstringn/aISO-3166-1 alpha-2 country code of the agent
clusterMembersarrayn/aif an enterprise agent is clustered, detailed information about each cluster member will be shown as array entries in the clusterMembers field. This field is not shown for Enterprise Agents in standalone mode, or for Cloud Agents.
ipAddressesarrayn/aarray of ipAddress entries
groupsarrayn/aarray of label objects - see Labels for more information.
locationstringn/alocation of the agent
prefixstringn/aNetwork prefix, expressed in CIDR format (Enterprise Agents only)
enabledbooleann/a1 for enabled, 0 for disabled (Enterprise Agents only)
networkstringn/aname of the autonomous system in which the Agent is found (Enterprise Agents only)
lastSeendateTimen/ayyyy-MM-dd hh:mm:ss, expressed in UTC (Enterprise Agents only)
agentStatestringn/aOnline, Offline or Disabled (standalone Enterprise Agents only)
verifySslCertificatesbooleann/a1 for enabled, 0 for disabled (Enterprise Agents only)
keepBrowserCachebooleann/a1 for enabled, 0 for disabled (Enterprise Agents only)
utilizationintegerpercentageshows overall utilization percentage (online Enterprise Agents only)

if the AgentType is Enterprise Cluster, a clusterMembers field will be available, which is an array of clusterMember objects, containing the following fields:

FieldData TypeUnitsNotes
namestringn/aname of the cluster member
ipAddressesarrayn/aarray of ipAddress entries
publicIpAddressesarrayn/aarray of ipAddress entries
prefixstringn/aNetwork prefix, expressed in CIDR format (Enterprise Agents only)
networkstringn/aname of the autonomous system in which the Agent is found (Enterprise Agents only)
lastSeendateTimen/ayyyy-MM-dd hh:mm:ss, expressed in UTC (Enterprise Agents only)
agentStatestringn/aeither Online or Offline
utilizationintegerpercentageshows overall utilization percentage

Header

HTTP/1.1 200 OK Date: Thu, 07 Nov 2013 07:32:48 GMT Server: Apache/2.2.22 (Ubuntu) Transfer-Encoding: chunked Content-Type: application/json

Body

{ "agents": [ { "agentId": 6, "agentName": "Fremont, CA (v6)", "agentType": "Cloud", "countryId": "US", "ipAddresses": [ "2600:3c01::f03c:91ff:feae:4f96" ], "location": "San Francisco Area" }, { "agentId": 11, "agentName": "London, UK", "agentType": "Cloud", "countryId": "GB", "ipAddresses": [ "176.58.99.46", "178.79.138.106" ], "location": "City of London, United Kingdom" }, { "agentId": 29, "agentName": "Sample Enterprise Agent", "location": "United States", "countryId": "US", "prefix": "38.0.0.0/8", "ipAddresses": [ "10.100.50.25" ], "publicIpAddresses": [ "38.122.6.66" ], "network": "Cogent Communications (AS 174)", "agentType": "Enterprise", "lastSeen": "2015-02-05 23:23:33", "agentState": "Online" }, { "agentId": 1975, "agentName": "Duke cluster", "location": "San Francisco Bay Area", "countryId": "US", "enabled": 1, "verifySslCertificates": 1, "keepBrowserCache": 0, "clusterMembers": [ { "name": "duke_agent3.thousandeyes.net", "ipAddresses": [ "172.17.0.2" ], "publicIpAddresses": [ "38.122.6.66" ], "prefix": "38.0.0.0/8", "utilization": 1, "network": "Cogent Communications (AS 174)", "lastSeen": "2015-07-15 17:16:11", "agentState": "Online" }, [...] ], "agentType": "Enterprise Cluster" } ] }

For error responses, see the response status codes documentation.

GET /v5/agents/{agentId} Agent Details

Returns details for an agent, including assigned tests. Enterprise agents show utilization data and assigned accounts.

Optional Parameters

  • format=json|xml optional, specifies the format of output requested. See Output Formats for more information
  • aid={accountId} optional and requires the user to be assigned to the target account, specifies the account context of the request, obtained from the /accounts endpoint. Specifying this parameter without the user to be assigned to the target account will result in an error response. See Account Context for more information

Request

  • no request body

Example

$curl https://api.thousandeyes.com/v5/agents/966.json \ -u {email}:{authToken}

Response

Sends back agent details for an agent. For Enterprise Agents, additional details, including a list of accounts to which the agent is assigned, and utilization details will be shown. Metadata is shown below:

FieldData TypeUnitsNotes
agentIdintegern/aunique ID of agent
agentNamestringn/adisplay name of the agent
locationstringn/alocation of the agent
countryIdstringn/aISO-3166-1 alpha-2 country code of the agent
prefixstringn/aNetwork prefix, expressed in CIDR format (Enterprise Agents only)
utilizationintegerpercentageshows overall utilization percentage
ipAddressesarrayn/aarray of ipAddress entries
groupsarrayn/aarray of label objects - see Labels for more information.
enabledbooleann/a1 for enabled, 0 for disabled
accountsarrayn/alist of accounts to which the agent is assigned, showing aid and accountName fields
testsarrayn/alist of tests assigned to the agent, expressed in the same format as /tests endpoint
networkstringn/aname of the autonomous system in which the Agent is found
agentTypestringn/aeither Cloud, Enterprise, or Enterprise Cluster, shows the type of agent
lastSeendateTimen/ayyyy-MM-dd hh:mm:ss, expressed in UTC (Enterprise Agents only)
agentStatestringn/aOnline, Offline or Disabled (standalone Enterprise Agents only)

Header

HTTP/1.1 200 OK Date: Thu, 07 Nov 2013 07:32:48 GMT Server: Apache/2.2.22 (Ubuntu) Transfer-Encoding: chunked Content-Type: application/json

Body

{ "agents": [ { "agentId": 966, "agentName": "ubuntu1404-x64", "location": "San Francisco Bay Area", "countryId": "US", "prefix": "50.128.0.0/9", "utilization": 1, "ipAddresses": [ "192.168.1.223" ], "publicIpAddresses": [ "50.184.189.59" ], "enabled": 1, "accounts": [ { "aid": 315, "accountName": "Documentation" }, { "aid": 362, "accountName": "Enterprise Agents Dashboard" } ], "tests": [ { "createdDate": "2015-02-03 21:55:13", "modifiedDate": "2015-05-05 00:21:10", "createdBy": "API Sandbox User (noreply@thousandeyes.com)", "modifiedBy": "API Sandbox User (noreply@thousandeyes.com)", "enabled": 1, "savedEvent": 0, "testId": 12065, "testName": "My Google DNS test", "type": "dns-server", "interval": 300, "domain": "google.com A", "networkMeasurements": 1, "mtuMeasurements": 1, "bandwidthMeasurements": 0, "bgpMeasurements": 1, "alertsEnabled": 0, "liveShare": 0, "recursiveQueries": 0, "dnsServers": [ { "serverId": 130, "serverName": "ns2.google.com." } ], "apiLinks": [...] }, ... ], "network": "Comcast Cable Communications, Inc. (AS 7922)", "agentType": "Enterprise", "lastSeen": "2015-05-10 18:41:00", "agentState": "Online" } ] }

For error responses, see the response status codes documentation.

POST /v5/agents/{agentId}/update Updating an Agent

Updates Enterprise Agent details. Users can update the agent display name, as well as change test and account assignments.

This endpoint can only be used for Enterprise Agents, and only for users in a role that permits modification of Enterprise Agents.

Important notes related to agent modification on tests:

  • if an agent is removed from a test, the modification date for tests using that agent at the time it was removed will be changed.
  • If an agent is removed from an entire account, then all tests using this agent in the removed account will be updated to reflect the removed agent.
  • If a removed agent is the final remaining agent on a test, then the test will be disabled when the agent is removed.

Optional Parameters

  • format=json|xml optional, specifies the format of output requested. See Output Formats for more information
  • aid={accountId} optional and requires the user to be assigned to the target account, specifies the account context of the request, obtained from the /accounts endpoint. Specifying this parameter without the user to be assigned to the target account will result in an error response. See Account Context for more information

Request

  • {agentId} corresponds the unique ID of an enterprise agent, obtained from the /agents endpoint

Post Data

When POSTing data to the /agents/{agentId}/update endpoint, users can update the following fields:

  • agentName string representation of an agent. No two agents can have the same display name.
  • accounts an array of account objects containing only an aid value, in the format { aid: integer }. See /accounts to pull a list of account IDs
  • tests an array of test objects containing only a testId value in the format { testId: integer }. See /tests to pull a list of tests available in the current account context.

Example

$curl https://api.thousandeyes.com/v5/agents/966/update \ -d '{ "agentName": "my updated agent name", \ "accounts": [\ {"aid": 315}, {"aid": 362} ], "tests": [\ {"testId": 12065} {"testId": 817}, }' \ -H "Content-Type: application/json" \ -u {email}:{authToken}

Response

If an agent is successfully edited, an HTTP/200 OK response will be returned, and the agent’s assigned accounts / tests will change; the newly updated agent data will be returned. See the example below:

FieldData TypeUnitsNotes
agentIdintegern/aunique ID of agent
agentNamestringn/adisplay name of the agent
locationstringn/alocation of the agent
countryIdstringn/aISO-3166-1 alpha-2 country code of the agent
prefixstringn/aNetwork prefix, expressed in CIDR format
utilizationfloatpercentageutilization of the agent, expressed in decimal format, where 0 = 0% and 1 = 100% utilization
ipAddressesarrayn/aarray of ipAddress entries
groupsarrayn/aarray of label objects - see Labels for more information.
enabledbooleann/a1 for enabled, 0 for disabled
accountsarrayn/alist of accounts to which the agent is assigned, expressed in the same format as /accounts endpoint
testsarrayn/alist of tests assigned to the agent, expressed in the same format as /tests endpoint
networkstringn/aname of the autonomous system in which the Agent is found
agentTypestringn/aeither Cloud or Enterprise, shows the type of agent
lastSeendateTimen/ayyyy-MM-dd hh:mm:ss, expressed in UTC
agentStatestringn/aeither Online or Offline

Header

HTTP/1.1 200 OK Date: Thu, 14 May 2015 23:18:04 GMT Server: Apache Vary: Accept-Encoding Strict-Transport-Security: max-age=31536000 X-Frame-Options: sameorigin Transfer-Encoding: chunked Content-Type: text/xml

Body

{ "agents": [ { "agentId": 966, "agentName": "ubuntu1404-x64", "location": "San Francisco Bay Area", "countryId": "US", "prefix": "50.128.0.0/9", "utilization": 1, "ipAddresses": [ "192.168.1.223" ], "publicIpAddresses": [ "50.184.189.59" ], "enabled": 1, "accounts": [ { "aid": 315, "accountName": "Documentation" }, { "aid": 362, "accountName": "Enterprise Agents Dashboard" } ], "tests": [ { "createdDate": "2015-02-03 21:55:13", "modifiedDate": "2015-05-14 23:18:03", "createdBy": "API Sandbox User (noreply@thousandeyes.com)", "modifiedBy": "API Sandbox User (noreply@thousandeyes.com)", "enabled": 1, "savedEvent": 0, "testId": 12065, "testName": "My Google DNS test", "type": "dns-server", "interval": 300, "domain": "google.com A", "networkMeasurements": 1, "mtuMeasurements": 1, "bandwidthMeasurements": 0, "bgpMeasurements": 1, "alertsEnabled": 0, "liveShare": 0, "recursiveQueries": 0, "dnsServers": [ { "serverId": 130, "serverName": "ns2.google.com." } ], "apiLinks": [...] }, { "enabled": 1, "testId": 817, "savedEvent": 0, "liveShare": 0, "testName": "http://www.thousandeyes.com", "type": "http-server", "interval": 900, "url": "http://www.thousandeyes.com", "networkMeasurements": 1, "createdBy": "API Sandbox User (noreply@thousandeyes.com)", "modifiedBy": "API Sandbox User (noreply@thousandeyes.com)", "createdDate": "2012-06-28 19:33:12", "modifiedDate": "2015-05-14 23:18:03", "apiLinks": [...] } ], "network": "Comcast Cable Communications, Inc. (AS 7922)", "agentType": "Enterprise", "lastSeen": "2015-05-14 23:18:00", "agentState": "Online" } ] }

For error responses, see the response status codes documentation.

POST /v5/agents/{agentId}/delete Deleting an Agent

Deletes an Enterprise Agent from ThousandEyes. Note: this feature can only be used on Enterprise Agents.

Important notes related to agent removal:

  • if an agent is deleted, the modification date for tests using that agent at the time it was deleted will be changed.
  • If a deleted agent is the final remaining agent on a test, then the test will be disabled when the agent is removed.

Important note: if an agent is removed, it must be re-initialized to use the same machine again in different context. Virtual Appliances can be updated using the Reset State button in the Advanced tab of the agent management interface. Users running packaged versions of Linux will need to remove /var/lib/te-agent/\*.sqlite in order to reinitialize an agent.

Optional Parameters

  • format=json|xml optional, specifies the format of output requested. See Output Formats for more information

Request

  • {agentId} corresponds the unique ID of an enterprise agent, obtained from the /agents endpoint

Post Data

When POSTing data to the /agents/{agentId}/delete endpoint, users should specify an empty POST body.

Example

$curl https://api.thousandeyes.com/v5/agents/966/delete \ -d '' \ -H "Content-Type: application/json" \ -u {email}:{authToken}

Response

If an agent is successfully deleted, an HTTP/204 No Content response will be returned, and an empty JSON response will be in the body of the response.

Header

HTTP/1.1 206 No Content Date: Thu, 14 May 2015 23:18:04 GMT Server: Apache Vary: Accept-Encoding Strict-Transport-Security: max-age=31536000 X-Frame-Options: sameorigin Transfer-Encoding: chunked Content-Type: text/xml

Body

For error responses, see the response status codes documentation.

GET /v5/bgp-monitors BGP Monitor List

Returns a list of all BGP monitors available to your account in ThousandEyes, including both public and private feeds.

Optional Parameters

  • format=json|xml optional, specifies the format of output requested. See Output Formats for more information
  • aid={accountId} optional and requires the user to be assigned to the target account, specifies the account context of the request, obtained from the /accounts endpoint. Specifying this parameter without the user being assigned to the target account will result in an error response. See Account group context for more information

Request

  • no request body

Example

$curl https://api.thousandeyes.com/v5/bgp-monitors.json \ -u {email}:{authToken}

Response

Sends back an array of BGP monitors, including monitorId, which can be used by other areas of the API. The example below shows both a public and private BGP monitor.

FieldData TypeUnitsNotes
monitorIdintegern/aunique ID of BGP monitor
ipAddressstringn/aIP address of the BGP monitor
networkstringn/aname of the autonomous system in which the monitor is found
monitorTypestringn/aeither Public or Private, shows the type of monitor
monitorNamestringn/adisplay name of the BGP monitor

Header

HTTP/1.1 200 OK Date: Thu, 07 Nov 2013 07:32:48 GMT Server: Apache/2.2.22 (Ubuntu) Transfer-Encoding: chunked Content-Type: application/json

Body

{ "bgpMonitors": [ { "monitorId": 1, "ipAddress": "4.69.184.193", "network": "Level 3 Communications, Inc. (AS 3356)", "monitorType": "Public", "monitorName": "Seattle, WA" }, ..., { "monitorId": 76, "ipAddress": "166.78.186.62", "network": "AS 65314", "monitorType": "Private", "monitorName": "Private Test Peer - ThousandEyes (bgp-peering-dev, AS 65314)" } ] }

For error responses, see the response status codes documentation.

© 2023 ThousandEyes. All rights reserved.