mirror of
https://github.com/thousandeyes/thousandeyes-sdk-python.git
synced 2026-08-04 08:56:50 +00:00
2515 lines
96 KiB
Python
2515 lines
96 KiB
Python
# coding: utf-8
|
|
|
|
"""
|
|
Endpoint Agents API
|
|
|
|
**Note:** The Endpoint Agents Transfer APIs are not available for ThousandEyes for Government instance. Manage ThousandEyes Endpoint Agents using this API. For more information about Endpoint Agents, see [Endpoint Agents](https://docs.thousandeyes.com/product-documentation/global-vantage-points/endpoint-agents).
|
|
|
|
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
|
|
Do not edit the class manually.
|
|
""" # noqa: E501
|
|
|
|
|
|
import json
|
|
|
|
from sdk_test_support.mock_server_types import ErrorResponseExpectation, OperationExpectation
|
|
|
|
OPERATION_MANIFEST = {
|
|
|
|
"get_endpoint_agent_log_items": OperationExpectation(
|
|
operation_id="get_endpoint_agent_log_items",
|
|
method="GET",
|
|
path="/endpoint/agents/{agentId}/logs",
|
|
path_param_examples={
|
|
"agentId": 'agent_id_example',
|
|
},
|
|
success_status=200,
|
|
success_body=json.loads("""
|
|
|
|
{
|
|
"_links" : {
|
|
"next" : {
|
|
"hreflang" : "hreflang",
|
|
"templated" : true,
|
|
"profile" : "profile",
|
|
"name" : "name",
|
|
"href" : "https://api.thousandeyes.com/v7/link/to/resource/id",
|
|
"type" : "type",
|
|
"deprecation" : "deprecation",
|
|
"title" : "title"
|
|
},
|
|
"self" : {
|
|
"hreflang" : "hreflang",
|
|
"templated" : true,
|
|
"profile" : "profile",
|
|
"name" : "name",
|
|
"href" : "https://api.thousandeyes.com/v7/link/to/resource/id",
|
|
"type" : "type",
|
|
"deprecation" : "deprecation",
|
|
"title" : "title"
|
|
}
|
|
},
|
|
"logs" : [ {
|
|
"wifiLogItem" : {
|
|
"bssidFrom" : "00:11:22:33:44:54",
|
|
"bssid" : "00:11:22:33:44:55",
|
|
"failure" : {
|
|
"code" : 4,
|
|
"context" : "WPA authentication failed",
|
|
"type" : "auth"
|
|
},
|
|
"logItemType" : "wifi-connect",
|
|
"channel" : "36",
|
|
"physicalMode" : "802.11ac",
|
|
"physicalModeFrom" : "802.11n",
|
|
"ssid" : "CorpWiFi",
|
|
"channelFrom" : "11"
|
|
},
|
|
"agentLogItemType" : "wifi",
|
|
"onlineOfflineLogItem" : {
|
|
"logItemType" : "online"
|
|
},
|
|
"id" : "8d23f1b7-74ef-4e0c-925c-58601fc0662d",
|
|
"vpnLogItem" : {
|
|
"logItemType" : "vpn-connect",
|
|
"vpnServerName" : "vpn-us-west",
|
|
"vpnType" : "cisco-anyconnect",
|
|
"vpnServerAddress" : "192.0.2.10"
|
|
},
|
|
"stateChangesLogItem" : {
|
|
"logItemType" : "enabled"
|
|
},
|
|
"timestampMs" : 1709240000000
|
|
}, {
|
|
"wifiLogItem" : {
|
|
"bssidFrom" : "00:11:22:33:44:54",
|
|
"bssid" : "00:11:22:33:44:55",
|
|
"failure" : {
|
|
"code" : 4,
|
|
"context" : "WPA authentication failed",
|
|
"type" : "auth"
|
|
},
|
|
"logItemType" : "wifi-connect",
|
|
"channel" : "36",
|
|
"physicalMode" : "802.11ac",
|
|
"physicalModeFrom" : "802.11n",
|
|
"ssid" : "CorpWiFi",
|
|
"channelFrom" : "11"
|
|
},
|
|
"agentLogItemType" : "wifi",
|
|
"onlineOfflineLogItem" : {
|
|
"logItemType" : "online"
|
|
},
|
|
"id" : "8d23f1b7-74ef-4e0c-925c-58601fc0662d",
|
|
"vpnLogItem" : {
|
|
"logItemType" : "vpn-connect",
|
|
"vpnServerName" : "vpn-us-west",
|
|
"vpnType" : "cisco-anyconnect",
|
|
"vpnServerAddress" : "192.0.2.10"
|
|
},
|
|
"stateChangesLogItem" : {
|
|
"logItemType" : "enabled"
|
|
},
|
|
"timestampMs" : 1709240000000
|
|
} ]
|
|
}
|
|
|
|
"""),
|
|
|
|
success_content_type="application/json",
|
|
|
|
request_body_example=None,
|
|
error_responses={
|
|
|
|
"400": ErrorResponseExpectation(
|
|
status=400,
|
|
body=json.loads("""
|
|
{
|
|
"instance" : "instance",
|
|
"detail" : "detail",
|
|
"type" : "type",
|
|
"title" : "title",
|
|
"errors" : [ {
|
|
"code" : "code",
|
|
"field" : "field",
|
|
"message" : "message"
|
|
}, {
|
|
"code" : "code",
|
|
"field" : "field",
|
|
"message" : "message"
|
|
} ],
|
|
"status" : 0
|
|
}"""),
|
|
content_type="application/json",
|
|
),
|
|
|
|
"401": ErrorResponseExpectation(
|
|
status=401,
|
|
body=json.loads("""
|
|
{
|
|
"error_description" : "Invalid access token",
|
|
"error" : "invalid_token"
|
|
}"""),
|
|
content_type="application/json",
|
|
),
|
|
|
|
"403": ErrorResponseExpectation(
|
|
status=403,
|
|
body=json.loads("""
|
|
{
|
|
"instance" : "instance",
|
|
"detail" : "detail",
|
|
"type" : "type",
|
|
"title" : "title",
|
|
"status" : 6
|
|
}"""),
|
|
content_type="application/json",
|
|
),
|
|
|
|
"429": ErrorResponseExpectation(
|
|
status=429,
|
|
body=json.loads("""
|
|
{
|
|
"instance" : "instance",
|
|
"detail" : "detail",
|
|
"type" : "type",
|
|
"title" : "title",
|
|
"status" : 6
|
|
}"""),
|
|
content_type="application/json",
|
|
),
|
|
|
|
"500": ErrorResponseExpectation(
|
|
status=500,
|
|
body=json.loads("""
|
|
{
|
|
"instance" : "instance",
|
|
"detail" : "detail",
|
|
"type" : "type",
|
|
"title" : "title",
|
|
"status" : 6
|
|
}"""),
|
|
content_type="application/json",
|
|
),
|
|
|
|
"502": ErrorResponseExpectation(
|
|
status=502,
|
|
body=json.loads("""
|
|
{
|
|
"instance" : "instance",
|
|
"detail" : "detail",
|
|
"type" : "type",
|
|
"title" : "title",
|
|
"status" : 6
|
|
}"""),
|
|
content_type="application/json",
|
|
),
|
|
|
|
},
|
|
),
|
|
|
|
"delete_endpoint_agent": OperationExpectation(
|
|
operation_id="delete_endpoint_agent",
|
|
method="DELETE",
|
|
path="/endpoint/agents/{agentId}",
|
|
path_param_examples={
|
|
"agentId": 'agent_id_example',
|
|
},
|
|
success_status=204,
|
|
success_body=None,
|
|
success_content_type="application/json",
|
|
request_body_example=None,
|
|
error_responses={
|
|
|
|
"401": ErrorResponseExpectation(
|
|
status=401,
|
|
body=json.loads("""
|
|
{
|
|
"error_description" : "Invalid access token",
|
|
"error" : "invalid_token"
|
|
}"""),
|
|
content_type="application/json",
|
|
),
|
|
|
|
"403": ErrorResponseExpectation(
|
|
status=403,
|
|
body=json.loads("""
|
|
{
|
|
"instance" : "instance",
|
|
"detail" : "detail",
|
|
"type" : "type",
|
|
"title" : "title",
|
|
"status" : 6
|
|
}"""),
|
|
content_type="application/json",
|
|
),
|
|
|
|
"404": ErrorResponseExpectation(
|
|
status=404,
|
|
body=json.loads("""
|
|
{
|
|
"instance" : "instance",
|
|
"detail" : "detail",
|
|
"type" : "type",
|
|
"title" : "title",
|
|
"status" : 6
|
|
}"""),
|
|
content_type="application/json",
|
|
),
|
|
|
|
"429": ErrorResponseExpectation(
|
|
status=429,
|
|
body=json.loads("""
|
|
{
|
|
"instance" : "instance",
|
|
"detail" : "detail",
|
|
"type" : "type",
|
|
"title" : "title",
|
|
"status" : 6
|
|
}"""),
|
|
content_type="application/json",
|
|
),
|
|
|
|
},
|
|
),
|
|
|
|
"disable_endpoint_agent": OperationExpectation(
|
|
operation_id="disable_endpoint_agent",
|
|
method="POST",
|
|
path="/endpoint/agents/{agentId}/disable",
|
|
path_param_examples={
|
|
"agentId": 'agent_id_example',
|
|
},
|
|
success_status=200,
|
|
success_body=json.loads("""
|
|
|
|
{
|
|
"npcapVersion" : "npcapVersion",
|
|
"asnDetails" : {
|
|
"asName" : "Virgin Media Limited",
|
|
"asNumber" : 5089
|
|
},
|
|
"clients" : [ {
|
|
"browserExtensions" : [ {
|
|
"browser" : "edge",
|
|
"profile" : "Profile 1",
|
|
"active" : true,
|
|
"error" : "",
|
|
"version" : "0.123.0",
|
|
"enabled" : true
|
|
}, {
|
|
"browser" : "edge",
|
|
"profile" : "Profile 1",
|
|
"active" : true,
|
|
"error" : "",
|
|
"version" : "0.123.0",
|
|
"enabled" : true
|
|
} ],
|
|
"userProfile" : {
|
|
"userName" : "joeblogs32",
|
|
"userPrincipalName" : "joeblogs32@c.com"
|
|
}
|
|
}, {
|
|
"browserExtensions" : [ {
|
|
"browser" : "edge",
|
|
"profile" : "Profile 1",
|
|
"active" : true,
|
|
"error" : "",
|
|
"version" : "0.123.0",
|
|
"enabled" : true
|
|
}, {
|
|
"browser" : "edge",
|
|
"profile" : "Profile 1",
|
|
"active" : true,
|
|
"error" : "",
|
|
"version" : "0.123.0",
|
|
"enabled" : true
|
|
} ],
|
|
"userProfile" : {
|
|
"userName" : "joeblogs32",
|
|
"userPrincipalName" : "joeblogs32@c.com"
|
|
}
|
|
} ],
|
|
"agentType" : "endpoint",
|
|
"_links" : {
|
|
"self" : {
|
|
"hreflang" : "hreflang",
|
|
"templated" : true,
|
|
"profile" : "profile",
|
|
"name" : "name",
|
|
"href" : "https://api.thousandeyes.com/v7/link/to/resource/id",
|
|
"type" : "type",
|
|
"deprecation" : "deprecation",
|
|
"title" : "title"
|
|
}
|
|
},
|
|
"batteryMetrics" : {
|
|
"batteryHealthNormalizedPercent" : 0.92,
|
|
"batteryLevel" : "medium",
|
|
"batteryLevelNormalizedPercent" : 0.3
|
|
},
|
|
"publicIP" : "88.45.2.123",
|
|
"tcpDriverAvailable" : true,
|
|
"platform" : "mac",
|
|
"manufacturer" : "Apple, Inc.",
|
|
"targetVersion" : "0.123.4",
|
|
"cellularProfile" : {
|
|
"rssi" : -10,
|
|
"advertisedNetworkSubtype" : "LTE/HSPA",
|
|
"carrierName" : "T-Mobile",
|
|
"rsrq" : -30,
|
|
"rsrp" : -30,
|
|
"advertisedNetworkGen" : "2g, 3g, 4g, 5g",
|
|
"rscp" : -30,
|
|
"networkGen" : "2g, 3g, 4g, 5g",
|
|
"networkSubtype" : "LTE/HSPA",
|
|
"sinr" : 20
|
|
},
|
|
"nicModel" : "Intel(R) Wi-Fi 6 AX200 160MHz",
|
|
"createdAt" : "2022-05-26T23:37:16Z",
|
|
"numberOfClients" : 3,
|
|
"licenseType" : "essentials",
|
|
"osVersion" : "Version 10.15.2 (Build 19C57)",
|
|
"computerName" : "DESKJET-123",
|
|
"freeDiskSpaceNormalized" : 0.41,
|
|
"model" : "MacBookAir7,2",
|
|
"id" : "861b7557-cd57-4bbb-b648-00bddf88ef49",
|
|
"nicDriverVersion" : "22.250.0.9",
|
|
"serialNumber" : "xaab2ba4-d40f-4e80-9363-7e4826556055",
|
|
"externalMetadata" : [ {
|
|
"key" : "anyConnectDeviceId",
|
|
"value" : "DF434343D"
|
|
}, {
|
|
"key" : "anyConnectDeviceId",
|
|
"value" : "DF434343D"
|
|
} ],
|
|
"version" : "0.123.4",
|
|
"vpnProfiles" : [ {
|
|
"vpnClientNetworkRange" : [ "10.100.0.0/22" ],
|
|
"vpnGatewayAddress" : "vpnGatewayAddress",
|
|
"vpnType" : "cisco-anyconnect",
|
|
"interfaceName" : "interfaceName",
|
|
"vpnClientAddresses" : [ "10.100.0.10" ]
|
|
}, {
|
|
"vpnClientNetworkRange" : [ "10.100.0.0/22" ],
|
|
"vpnGatewayAddress" : "vpnGatewayAddress",
|
|
"vpnType" : "cisco-anyconnect",
|
|
"interfaceName" : "interfaceName",
|
|
"vpnClientAddresses" : [ "10.100.0.10" ]
|
|
} ],
|
|
"lastSeen" : "2022-05-26T23:37:16Z",
|
|
"deleted" : true,
|
|
"totalMemory" : "16384 MB",
|
|
"kernelVersion" : "Darwin 19.2.0",
|
|
"name" : "Office Printer",
|
|
"location" : {
|
|
"locationName" : "London",
|
|
"latitude" : 51.51279,
|
|
"longitude" : -0.09184
|
|
},
|
|
"aid" : "",
|
|
"status" : "enabled",
|
|
"networkInterfaceProfiles" : [ {
|
|
"ethernetProfile" : {
|
|
"linkSpeed" : 0
|
|
},
|
|
"hardwareType" : "wireless",
|
|
"interfaceName" : "en0",
|
|
"addressProfiles" : [ {
|
|
"prefixLength" : 24,
|
|
"addressType" : "unique-local",
|
|
"ipAddress" : "2001:db8:3333:4444:5555:6666:7777:8888",
|
|
"routerHardwareAddress" : "5c:b1:3e:46:1c:84",
|
|
"gateway" : "192.168.0.254"
|
|
}, {
|
|
"prefixLength" : 24,
|
|
"addressType" : "unique-local",
|
|
"ipAddress" : "2001:db8:3333:4444:5555:6666:7777:8888",
|
|
"routerHardwareAddress" : "5c:b1:3e:46:1c:84",
|
|
"gateway" : "192.168.0.254"
|
|
} ],
|
|
"wirelessProfile" : {
|
|
"rssi" : -36,
|
|
"bssid" : "00:11:22:aa:bb:cc",
|
|
"channel" : 48,
|
|
"phyMode" : "802.11ac",
|
|
"ssid" : "GuestWiFi"
|
|
}
|
|
}, {
|
|
"ethernetProfile" : {
|
|
"linkSpeed" : 0
|
|
},
|
|
"hardwareType" : "wireless",
|
|
"interfaceName" : "en0",
|
|
"addressProfiles" : [ {
|
|
"prefixLength" : 24,
|
|
"addressType" : "unique-local",
|
|
"ipAddress" : "2001:db8:3333:4444:5555:6666:7777:8888",
|
|
"routerHardwareAddress" : "5c:b1:3e:46:1c:84",
|
|
"gateway" : "192.168.0.254"
|
|
}, {
|
|
"prefixLength" : 24,
|
|
"addressType" : "unique-local",
|
|
"ipAddress" : "2001:db8:3333:4444:5555:6666:7777:8888",
|
|
"routerHardwareAddress" : "5c:b1:3e:46:1c:84",
|
|
"gateway" : "192.168.0.254"
|
|
} ],
|
|
"wirelessProfile" : {
|
|
"rssi" : -36,
|
|
"bssid" : "00:11:22:aa:bb:cc",
|
|
"channel" : 48,
|
|
"phyMode" : "802.11ac",
|
|
"ssid" : "GuestWiFi"
|
|
}
|
|
} ]
|
|
}
|
|
|
|
"""),
|
|
|
|
success_content_type="application/json",
|
|
|
|
request_body_example=None,
|
|
error_responses={
|
|
|
|
"401": ErrorResponseExpectation(
|
|
status=401,
|
|
body=json.loads("""
|
|
{
|
|
"error_description" : "Invalid access token",
|
|
"error" : "invalid_token"
|
|
}"""),
|
|
content_type="application/json",
|
|
),
|
|
|
|
"403": ErrorResponseExpectation(
|
|
status=403,
|
|
body=json.loads("""
|
|
{
|
|
"instance" : "instance",
|
|
"detail" : "detail",
|
|
"type" : "type",
|
|
"title" : "title",
|
|
"status" : 6
|
|
}"""),
|
|
content_type="application/json",
|
|
),
|
|
|
|
"404": ErrorResponseExpectation(
|
|
status=404,
|
|
body=json.loads("""
|
|
{
|
|
"instance" : "instance",
|
|
"detail" : "detail",
|
|
"type" : "type",
|
|
"title" : "title",
|
|
"status" : 6
|
|
}"""),
|
|
content_type="application/json",
|
|
),
|
|
|
|
"429": ErrorResponseExpectation(
|
|
status=429,
|
|
body=json.loads("""
|
|
{
|
|
"instance" : "instance",
|
|
"detail" : "detail",
|
|
"type" : "type",
|
|
"title" : "title",
|
|
"status" : 6
|
|
}"""),
|
|
content_type="application/json",
|
|
),
|
|
|
|
},
|
|
),
|
|
|
|
"enable_endpoint_agent": OperationExpectation(
|
|
operation_id="enable_endpoint_agent",
|
|
method="POST",
|
|
path="/endpoint/agents/{agentId}/enable",
|
|
path_param_examples={
|
|
"agentId": 'agent_id_example',
|
|
},
|
|
success_status=200,
|
|
success_body=json.loads("""
|
|
|
|
{
|
|
"npcapVersion" : "npcapVersion",
|
|
"asnDetails" : {
|
|
"asName" : "Virgin Media Limited",
|
|
"asNumber" : 5089
|
|
},
|
|
"clients" : [ {
|
|
"browserExtensions" : [ {
|
|
"browser" : "edge",
|
|
"profile" : "Profile 1",
|
|
"active" : true,
|
|
"error" : "",
|
|
"version" : "0.123.0",
|
|
"enabled" : true
|
|
}, {
|
|
"browser" : "edge",
|
|
"profile" : "Profile 1",
|
|
"active" : true,
|
|
"error" : "",
|
|
"version" : "0.123.0",
|
|
"enabled" : true
|
|
} ],
|
|
"userProfile" : {
|
|
"userName" : "joeblogs32",
|
|
"userPrincipalName" : "joeblogs32@c.com"
|
|
}
|
|
}, {
|
|
"browserExtensions" : [ {
|
|
"browser" : "edge",
|
|
"profile" : "Profile 1",
|
|
"active" : true,
|
|
"error" : "",
|
|
"version" : "0.123.0",
|
|
"enabled" : true
|
|
}, {
|
|
"browser" : "edge",
|
|
"profile" : "Profile 1",
|
|
"active" : true,
|
|
"error" : "",
|
|
"version" : "0.123.0",
|
|
"enabled" : true
|
|
} ],
|
|
"userProfile" : {
|
|
"userName" : "joeblogs32",
|
|
"userPrincipalName" : "joeblogs32@c.com"
|
|
}
|
|
} ],
|
|
"agentType" : "endpoint",
|
|
"_links" : {
|
|
"self" : {
|
|
"hreflang" : "hreflang",
|
|
"templated" : true,
|
|
"profile" : "profile",
|
|
"name" : "name",
|
|
"href" : "https://api.thousandeyes.com/v7/link/to/resource/id",
|
|
"type" : "type",
|
|
"deprecation" : "deprecation",
|
|
"title" : "title"
|
|
}
|
|
},
|
|
"batteryMetrics" : {
|
|
"batteryHealthNormalizedPercent" : 0.92,
|
|
"batteryLevel" : "medium",
|
|
"batteryLevelNormalizedPercent" : 0.3
|
|
},
|
|
"publicIP" : "88.45.2.123",
|
|
"tcpDriverAvailable" : true,
|
|
"platform" : "mac",
|
|
"manufacturer" : "Apple, Inc.",
|
|
"targetVersion" : "0.123.4",
|
|
"cellularProfile" : {
|
|
"rssi" : -10,
|
|
"advertisedNetworkSubtype" : "LTE/HSPA",
|
|
"carrierName" : "T-Mobile",
|
|
"rsrq" : -30,
|
|
"rsrp" : -30,
|
|
"advertisedNetworkGen" : "2g, 3g, 4g, 5g",
|
|
"rscp" : -30,
|
|
"networkGen" : "2g, 3g, 4g, 5g",
|
|
"networkSubtype" : "LTE/HSPA",
|
|
"sinr" : 20
|
|
},
|
|
"nicModel" : "Intel(R) Wi-Fi 6 AX200 160MHz",
|
|
"createdAt" : "2022-05-26T23:37:16Z",
|
|
"numberOfClients" : 3,
|
|
"licenseType" : "essentials",
|
|
"osVersion" : "Version 10.15.2 (Build 19C57)",
|
|
"computerName" : "DESKJET-123",
|
|
"freeDiskSpaceNormalized" : 0.41,
|
|
"model" : "MacBookAir7,2",
|
|
"id" : "861b7557-cd57-4bbb-b648-00bddf88ef49",
|
|
"nicDriverVersion" : "22.250.0.9",
|
|
"serialNumber" : "xaab2ba4-d40f-4e80-9363-7e4826556055",
|
|
"externalMetadata" : [ {
|
|
"key" : "anyConnectDeviceId",
|
|
"value" : "DF434343D"
|
|
}, {
|
|
"key" : "anyConnectDeviceId",
|
|
"value" : "DF434343D"
|
|
} ],
|
|
"version" : "0.123.4",
|
|
"vpnProfiles" : [ {
|
|
"vpnClientNetworkRange" : [ "10.100.0.0/22" ],
|
|
"vpnGatewayAddress" : "vpnGatewayAddress",
|
|
"vpnType" : "cisco-anyconnect",
|
|
"interfaceName" : "interfaceName",
|
|
"vpnClientAddresses" : [ "10.100.0.10" ]
|
|
}, {
|
|
"vpnClientNetworkRange" : [ "10.100.0.0/22" ],
|
|
"vpnGatewayAddress" : "vpnGatewayAddress",
|
|
"vpnType" : "cisco-anyconnect",
|
|
"interfaceName" : "interfaceName",
|
|
"vpnClientAddresses" : [ "10.100.0.10" ]
|
|
} ],
|
|
"lastSeen" : "2022-05-26T23:37:16Z",
|
|
"deleted" : true,
|
|
"totalMemory" : "16384 MB",
|
|
"kernelVersion" : "Darwin 19.2.0",
|
|
"name" : "Office Printer",
|
|
"location" : {
|
|
"locationName" : "London",
|
|
"latitude" : 51.51279,
|
|
"longitude" : -0.09184
|
|
},
|
|
"aid" : "",
|
|
"status" : "enabled",
|
|
"networkInterfaceProfiles" : [ {
|
|
"ethernetProfile" : {
|
|
"linkSpeed" : 0
|
|
},
|
|
"hardwareType" : "wireless",
|
|
"interfaceName" : "en0",
|
|
"addressProfiles" : [ {
|
|
"prefixLength" : 24,
|
|
"addressType" : "unique-local",
|
|
"ipAddress" : "2001:db8:3333:4444:5555:6666:7777:8888",
|
|
"routerHardwareAddress" : "5c:b1:3e:46:1c:84",
|
|
"gateway" : "192.168.0.254"
|
|
}, {
|
|
"prefixLength" : 24,
|
|
"addressType" : "unique-local",
|
|
"ipAddress" : "2001:db8:3333:4444:5555:6666:7777:8888",
|
|
"routerHardwareAddress" : "5c:b1:3e:46:1c:84",
|
|
"gateway" : "192.168.0.254"
|
|
} ],
|
|
"wirelessProfile" : {
|
|
"rssi" : -36,
|
|
"bssid" : "00:11:22:aa:bb:cc",
|
|
"channel" : 48,
|
|
"phyMode" : "802.11ac",
|
|
"ssid" : "GuestWiFi"
|
|
}
|
|
}, {
|
|
"ethernetProfile" : {
|
|
"linkSpeed" : 0
|
|
},
|
|
"hardwareType" : "wireless",
|
|
"interfaceName" : "en0",
|
|
"addressProfiles" : [ {
|
|
"prefixLength" : 24,
|
|
"addressType" : "unique-local",
|
|
"ipAddress" : "2001:db8:3333:4444:5555:6666:7777:8888",
|
|
"routerHardwareAddress" : "5c:b1:3e:46:1c:84",
|
|
"gateway" : "192.168.0.254"
|
|
}, {
|
|
"prefixLength" : 24,
|
|
"addressType" : "unique-local",
|
|
"ipAddress" : "2001:db8:3333:4444:5555:6666:7777:8888",
|
|
"routerHardwareAddress" : "5c:b1:3e:46:1c:84",
|
|
"gateway" : "192.168.0.254"
|
|
} ],
|
|
"wirelessProfile" : {
|
|
"rssi" : -36,
|
|
"bssid" : "00:11:22:aa:bb:cc",
|
|
"channel" : 48,
|
|
"phyMode" : "802.11ac",
|
|
"ssid" : "GuestWiFi"
|
|
}
|
|
} ]
|
|
}
|
|
|
|
"""),
|
|
|
|
success_content_type="application/json",
|
|
|
|
request_body_example=None,
|
|
error_responses={
|
|
|
|
"401": ErrorResponseExpectation(
|
|
status=401,
|
|
body=json.loads("""
|
|
{
|
|
"error_description" : "Invalid access token",
|
|
"error" : "invalid_token"
|
|
}"""),
|
|
content_type="application/json",
|
|
),
|
|
|
|
"403": ErrorResponseExpectation(
|
|
status=403,
|
|
body=json.loads("""
|
|
{
|
|
"instance" : "instance",
|
|
"detail" : "detail",
|
|
"type" : "type",
|
|
"title" : "title",
|
|
"status" : 6
|
|
}"""),
|
|
content_type="application/json",
|
|
),
|
|
|
|
"404": ErrorResponseExpectation(
|
|
status=404,
|
|
body=json.loads("""
|
|
{
|
|
"instance" : "instance",
|
|
"detail" : "detail",
|
|
"type" : "type",
|
|
"title" : "title",
|
|
"status" : 6
|
|
}"""),
|
|
content_type="application/json",
|
|
),
|
|
|
|
"429": ErrorResponseExpectation(
|
|
status=429,
|
|
body=json.loads("""
|
|
{
|
|
"instance" : "instance",
|
|
"detail" : "detail",
|
|
"type" : "type",
|
|
"title" : "title",
|
|
"status" : 6
|
|
}"""),
|
|
content_type="application/json",
|
|
),
|
|
|
|
},
|
|
),
|
|
|
|
"filter_endpoint_agents": OperationExpectation(
|
|
operation_id="filter_endpoint_agents",
|
|
method="POST",
|
|
path="/endpoint/agents/filter",
|
|
path_param_examples={
|
|
},
|
|
success_status=200,
|
|
success_body=json.loads("""
|
|
|
|
{
|
|
"_links" : {
|
|
"next" : {
|
|
"hreflang" : "hreflang",
|
|
"templated" : true,
|
|
"profile" : "profile",
|
|
"name" : "name",
|
|
"href" : "https://api.thousandeyes.com/v7/link/to/resource/id",
|
|
"type" : "type",
|
|
"deprecation" : "deprecation",
|
|
"title" : "title"
|
|
}
|
|
},
|
|
"totalAgents" : 1,
|
|
"agents" : [ {
|
|
"npcapVersion" : "npcapVersion",
|
|
"asnDetails" : {
|
|
"asName" : "Virgin Media Limited",
|
|
"asNumber" : 5089
|
|
},
|
|
"clients" : [ {
|
|
"browserExtensions" : [ {
|
|
"browser" : "edge",
|
|
"profile" : "Profile 1",
|
|
"active" : true,
|
|
"error" : "",
|
|
"version" : "0.123.0",
|
|
"enabled" : true
|
|
}, {
|
|
"browser" : "edge",
|
|
"profile" : "Profile 1",
|
|
"active" : true,
|
|
"error" : "",
|
|
"version" : "0.123.0",
|
|
"enabled" : true
|
|
} ],
|
|
"userProfile" : {
|
|
"userName" : "joeblogs32",
|
|
"userPrincipalName" : "joeblogs32@c.com"
|
|
}
|
|
}, {
|
|
"browserExtensions" : [ {
|
|
"browser" : "edge",
|
|
"profile" : "Profile 1",
|
|
"active" : true,
|
|
"error" : "",
|
|
"version" : "0.123.0",
|
|
"enabled" : true
|
|
}, {
|
|
"browser" : "edge",
|
|
"profile" : "Profile 1",
|
|
"active" : true,
|
|
"error" : "",
|
|
"version" : "0.123.0",
|
|
"enabled" : true
|
|
} ],
|
|
"userProfile" : {
|
|
"userName" : "joeblogs32",
|
|
"userPrincipalName" : "joeblogs32@c.com"
|
|
}
|
|
} ],
|
|
"agentType" : "endpoint",
|
|
"_links" : {
|
|
"self" : {
|
|
"hreflang" : "hreflang",
|
|
"templated" : true,
|
|
"profile" : "profile",
|
|
"name" : "name",
|
|
"href" : "https://api.thousandeyes.com/v7/link/to/resource/id",
|
|
"type" : "type",
|
|
"deprecation" : "deprecation",
|
|
"title" : "title"
|
|
}
|
|
},
|
|
"batteryMetrics" : {
|
|
"batteryHealthNormalizedPercent" : 0.92,
|
|
"batteryLevel" : "medium",
|
|
"batteryLevelNormalizedPercent" : 0.3
|
|
},
|
|
"publicIP" : "88.45.2.123",
|
|
"tcpDriverAvailable" : true,
|
|
"platform" : "mac",
|
|
"manufacturer" : "Apple, Inc.",
|
|
"targetVersion" : "0.123.4",
|
|
"cellularProfile" : {
|
|
"rssi" : -10,
|
|
"advertisedNetworkSubtype" : "LTE/HSPA",
|
|
"carrierName" : "T-Mobile",
|
|
"rsrq" : -30,
|
|
"rsrp" : -30,
|
|
"advertisedNetworkGen" : "2g, 3g, 4g, 5g",
|
|
"rscp" : -30,
|
|
"networkGen" : "2g, 3g, 4g, 5g",
|
|
"networkSubtype" : "LTE/HSPA",
|
|
"sinr" : 20
|
|
},
|
|
"nicModel" : "Intel(R) Wi-Fi 6 AX200 160MHz",
|
|
"createdAt" : "2022-05-26T23:37:16Z",
|
|
"numberOfClients" : 3,
|
|
"licenseType" : "essentials",
|
|
"osVersion" : "Version 10.15.2 (Build 19C57)",
|
|
"computerName" : "DESKJET-123",
|
|
"freeDiskSpaceNormalized" : 0.41,
|
|
"model" : "MacBookAir7,2",
|
|
"id" : "861b7557-cd57-4bbb-b648-00bddf88ef49",
|
|
"nicDriverVersion" : "22.250.0.9",
|
|
"serialNumber" : "xaab2ba4-d40f-4e80-9363-7e4826556055",
|
|
"externalMetadata" : [ {
|
|
"key" : "anyConnectDeviceId",
|
|
"value" : "DF434343D"
|
|
}, {
|
|
"key" : "anyConnectDeviceId",
|
|
"value" : "DF434343D"
|
|
} ],
|
|
"version" : "0.123.4",
|
|
"vpnProfiles" : [ {
|
|
"vpnClientNetworkRange" : [ "10.100.0.0/22" ],
|
|
"vpnGatewayAddress" : "vpnGatewayAddress",
|
|
"vpnType" : "cisco-anyconnect",
|
|
"interfaceName" : "interfaceName",
|
|
"vpnClientAddresses" : [ "10.100.0.10" ]
|
|
}, {
|
|
"vpnClientNetworkRange" : [ "10.100.0.0/22" ],
|
|
"vpnGatewayAddress" : "vpnGatewayAddress",
|
|
"vpnType" : "cisco-anyconnect",
|
|
"interfaceName" : "interfaceName",
|
|
"vpnClientAddresses" : [ "10.100.0.10" ]
|
|
} ],
|
|
"lastSeen" : "2022-05-26T23:37:16Z",
|
|
"deleted" : true,
|
|
"totalMemory" : "16384 MB",
|
|
"kernelVersion" : "Darwin 19.2.0",
|
|
"name" : "Office Printer",
|
|
"location" : {
|
|
"locationName" : "London",
|
|
"latitude" : 51.51279,
|
|
"longitude" : -0.09184
|
|
},
|
|
"aid" : "",
|
|
"status" : "enabled",
|
|
"networkInterfaceProfiles" : [ {
|
|
"ethernetProfile" : {
|
|
"linkSpeed" : 0
|
|
},
|
|
"hardwareType" : "wireless",
|
|
"interfaceName" : "en0",
|
|
"addressProfiles" : [ {
|
|
"prefixLength" : 24,
|
|
"addressType" : "unique-local",
|
|
"ipAddress" : "2001:db8:3333:4444:5555:6666:7777:8888",
|
|
"routerHardwareAddress" : "5c:b1:3e:46:1c:84",
|
|
"gateway" : "192.168.0.254"
|
|
}, {
|
|
"prefixLength" : 24,
|
|
"addressType" : "unique-local",
|
|
"ipAddress" : "2001:db8:3333:4444:5555:6666:7777:8888",
|
|
"routerHardwareAddress" : "5c:b1:3e:46:1c:84",
|
|
"gateway" : "192.168.0.254"
|
|
} ],
|
|
"wirelessProfile" : {
|
|
"rssi" : -36,
|
|
"bssid" : "00:11:22:aa:bb:cc",
|
|
"channel" : 48,
|
|
"phyMode" : "802.11ac",
|
|
"ssid" : "GuestWiFi"
|
|
}
|
|
}, {
|
|
"ethernetProfile" : {
|
|
"linkSpeed" : 0
|
|
},
|
|
"hardwareType" : "wireless",
|
|
"interfaceName" : "en0",
|
|
"addressProfiles" : [ {
|
|
"prefixLength" : 24,
|
|
"addressType" : "unique-local",
|
|
"ipAddress" : "2001:db8:3333:4444:5555:6666:7777:8888",
|
|
"routerHardwareAddress" : "5c:b1:3e:46:1c:84",
|
|
"gateway" : "192.168.0.254"
|
|
}, {
|
|
"prefixLength" : 24,
|
|
"addressType" : "unique-local",
|
|
"ipAddress" : "2001:db8:3333:4444:5555:6666:7777:8888",
|
|
"routerHardwareAddress" : "5c:b1:3e:46:1c:84",
|
|
"gateway" : "192.168.0.254"
|
|
} ],
|
|
"wirelessProfile" : {
|
|
"rssi" : -36,
|
|
"bssid" : "00:11:22:aa:bb:cc",
|
|
"channel" : 48,
|
|
"phyMode" : "802.11ac",
|
|
"ssid" : "GuestWiFi"
|
|
}
|
|
} ]
|
|
}, {
|
|
"npcapVersion" : "npcapVersion",
|
|
"asnDetails" : {
|
|
"asName" : "Virgin Media Limited",
|
|
"asNumber" : 5089
|
|
},
|
|
"clients" : [ {
|
|
"browserExtensions" : [ {
|
|
"browser" : "edge",
|
|
"profile" : "Profile 1",
|
|
"active" : true,
|
|
"error" : "",
|
|
"version" : "0.123.0",
|
|
"enabled" : true
|
|
}, {
|
|
"browser" : "edge",
|
|
"profile" : "Profile 1",
|
|
"active" : true,
|
|
"error" : "",
|
|
"version" : "0.123.0",
|
|
"enabled" : true
|
|
} ],
|
|
"userProfile" : {
|
|
"userName" : "joeblogs32",
|
|
"userPrincipalName" : "joeblogs32@c.com"
|
|
}
|
|
}, {
|
|
"browserExtensions" : [ {
|
|
"browser" : "edge",
|
|
"profile" : "Profile 1",
|
|
"active" : true,
|
|
"error" : "",
|
|
"version" : "0.123.0",
|
|
"enabled" : true
|
|
}, {
|
|
"browser" : "edge",
|
|
"profile" : "Profile 1",
|
|
"active" : true,
|
|
"error" : "",
|
|
"version" : "0.123.0",
|
|
"enabled" : true
|
|
} ],
|
|
"userProfile" : {
|
|
"userName" : "joeblogs32",
|
|
"userPrincipalName" : "joeblogs32@c.com"
|
|
}
|
|
} ],
|
|
"agentType" : "endpoint",
|
|
"_links" : {
|
|
"self" : {
|
|
"hreflang" : "hreflang",
|
|
"templated" : true,
|
|
"profile" : "profile",
|
|
"name" : "name",
|
|
"href" : "https://api.thousandeyes.com/v7/link/to/resource/id",
|
|
"type" : "type",
|
|
"deprecation" : "deprecation",
|
|
"title" : "title"
|
|
}
|
|
},
|
|
"batteryMetrics" : {
|
|
"batteryHealthNormalizedPercent" : 0.92,
|
|
"batteryLevel" : "medium",
|
|
"batteryLevelNormalizedPercent" : 0.3
|
|
},
|
|
"publicIP" : "88.45.2.123",
|
|
"tcpDriverAvailable" : true,
|
|
"platform" : "mac",
|
|
"manufacturer" : "Apple, Inc.",
|
|
"targetVersion" : "0.123.4",
|
|
"cellularProfile" : {
|
|
"rssi" : -10,
|
|
"advertisedNetworkSubtype" : "LTE/HSPA",
|
|
"carrierName" : "T-Mobile",
|
|
"rsrq" : -30,
|
|
"rsrp" : -30,
|
|
"advertisedNetworkGen" : "2g, 3g, 4g, 5g",
|
|
"rscp" : -30,
|
|
"networkGen" : "2g, 3g, 4g, 5g",
|
|
"networkSubtype" : "LTE/HSPA",
|
|
"sinr" : 20
|
|
},
|
|
"nicModel" : "Intel(R) Wi-Fi 6 AX200 160MHz",
|
|
"createdAt" : "2022-05-26T23:37:16Z",
|
|
"numberOfClients" : 3,
|
|
"licenseType" : "essentials",
|
|
"osVersion" : "Version 10.15.2 (Build 19C57)",
|
|
"computerName" : "DESKJET-123",
|
|
"freeDiskSpaceNormalized" : 0.41,
|
|
"model" : "MacBookAir7,2",
|
|
"id" : "861b7557-cd57-4bbb-b648-00bddf88ef49",
|
|
"nicDriverVersion" : "22.250.0.9",
|
|
"serialNumber" : "xaab2ba4-d40f-4e80-9363-7e4826556055",
|
|
"externalMetadata" : [ {
|
|
"key" : "anyConnectDeviceId",
|
|
"value" : "DF434343D"
|
|
}, {
|
|
"key" : "anyConnectDeviceId",
|
|
"value" : "DF434343D"
|
|
} ],
|
|
"version" : "0.123.4",
|
|
"vpnProfiles" : [ {
|
|
"vpnClientNetworkRange" : [ "10.100.0.0/22" ],
|
|
"vpnGatewayAddress" : "vpnGatewayAddress",
|
|
"vpnType" : "cisco-anyconnect",
|
|
"interfaceName" : "interfaceName",
|
|
"vpnClientAddresses" : [ "10.100.0.10" ]
|
|
}, {
|
|
"vpnClientNetworkRange" : [ "10.100.0.0/22" ],
|
|
"vpnGatewayAddress" : "vpnGatewayAddress",
|
|
"vpnType" : "cisco-anyconnect",
|
|
"interfaceName" : "interfaceName",
|
|
"vpnClientAddresses" : [ "10.100.0.10" ]
|
|
} ],
|
|
"lastSeen" : "2022-05-26T23:37:16Z",
|
|
"deleted" : true,
|
|
"totalMemory" : "16384 MB",
|
|
"kernelVersion" : "Darwin 19.2.0",
|
|
"name" : "Office Printer",
|
|
"location" : {
|
|
"locationName" : "London",
|
|
"latitude" : 51.51279,
|
|
"longitude" : -0.09184
|
|
},
|
|
"aid" : "",
|
|
"status" : "enabled",
|
|
"networkInterfaceProfiles" : [ {
|
|
"ethernetProfile" : {
|
|
"linkSpeed" : 0
|
|
},
|
|
"hardwareType" : "wireless",
|
|
"interfaceName" : "en0",
|
|
"addressProfiles" : [ {
|
|
"prefixLength" : 24,
|
|
"addressType" : "unique-local",
|
|
"ipAddress" : "2001:db8:3333:4444:5555:6666:7777:8888",
|
|
"routerHardwareAddress" : "5c:b1:3e:46:1c:84",
|
|
"gateway" : "192.168.0.254"
|
|
}, {
|
|
"prefixLength" : 24,
|
|
"addressType" : "unique-local",
|
|
"ipAddress" : "2001:db8:3333:4444:5555:6666:7777:8888",
|
|
"routerHardwareAddress" : "5c:b1:3e:46:1c:84",
|
|
"gateway" : "192.168.0.254"
|
|
} ],
|
|
"wirelessProfile" : {
|
|
"rssi" : -36,
|
|
"bssid" : "00:11:22:aa:bb:cc",
|
|
"channel" : 48,
|
|
"phyMode" : "802.11ac",
|
|
"ssid" : "GuestWiFi"
|
|
}
|
|
}, {
|
|
"ethernetProfile" : {
|
|
"linkSpeed" : 0
|
|
},
|
|
"hardwareType" : "wireless",
|
|
"interfaceName" : "en0",
|
|
"addressProfiles" : [ {
|
|
"prefixLength" : 24,
|
|
"addressType" : "unique-local",
|
|
"ipAddress" : "2001:db8:3333:4444:5555:6666:7777:8888",
|
|
"routerHardwareAddress" : "5c:b1:3e:46:1c:84",
|
|
"gateway" : "192.168.0.254"
|
|
}, {
|
|
"prefixLength" : 24,
|
|
"addressType" : "unique-local",
|
|
"ipAddress" : "2001:db8:3333:4444:5555:6666:7777:8888",
|
|
"routerHardwareAddress" : "5c:b1:3e:46:1c:84",
|
|
"gateway" : "192.168.0.254"
|
|
} ],
|
|
"wirelessProfile" : {
|
|
"rssi" : -36,
|
|
"bssid" : "00:11:22:aa:bb:cc",
|
|
"channel" : 48,
|
|
"phyMode" : "802.11ac",
|
|
"ssid" : "GuestWiFi"
|
|
}
|
|
} ]
|
|
} ]
|
|
}
|
|
|
|
"""),
|
|
|
|
success_content_type="application/json",
|
|
|
|
request_body_example=json.loads("""
|
|
|
|
{
|
|
"searchSort" : [ {
|
|
"sort" : "platform",
|
|
"order" : "desc"
|
|
}, {
|
|
"sort" : "platform",
|
|
"order" : "desc"
|
|
} ],
|
|
"searchFilters" : {
|
|
"serialNumber" : [ "xaab2ba4-d40f-4e80-9363-7e4826556055", "xaab2ba4-d40f-4e80-9363-7e4826556055", "xaab2ba4-d40f-4e80-9363-7e4826556055", "xaab2ba4-d40f-4e80-9363-7e4826556055", "xaab2ba4-d40f-4e80-9363-7e4826556055" ],
|
|
"anyConnectDeviceId" : [ "JDLKSLFEIJER004334F" ],
|
|
"agentName" : [ "myagent-1234", "myagent-1234" ],
|
|
"locationSubdivision1Code" : [ "ENG", "ENG" ],
|
|
"platform" : [ "mac", "mac" ],
|
|
"licenseType" : [ "essentials", "essentials" ],
|
|
"osVersion" : [ "Version 10.15.2", "Version 10.15.2" ],
|
|
"computerName" : [ "DESKTOP-45AE8", "DESKTOP-45AE8" ],
|
|
"locationCountryISO" : [ "FR", "FR" ],
|
|
"id" : [ "861b7557-cd57-4bbb-b648-00bddf88ef49", "861b7557-cd57-4bbb-b648-00bddf88ef49" ],
|
|
"userPrincipalName" : [ "picard@c.com" ],
|
|
"locationCity" : [ "Paris", "Paris" ],
|
|
"username" : [ "picard" ]
|
|
},
|
|
"thresholdFilter" : {
|
|
"conditionalOperator" : "and",
|
|
"filters" : [ {
|
|
"name" : "last-seen-ms",
|
|
"value" : 0.8008281904610115,
|
|
"operator" : "gte"
|
|
}, {
|
|
"name" : "last-seen-ms",
|
|
"value" : 0.8008281904610115,
|
|
"operator" : "gte"
|
|
} ]
|
|
}
|
|
}
|
|
|
|
"""),
|
|
error_responses={
|
|
|
|
"400": ErrorResponseExpectation(
|
|
status=400,
|
|
body=json.loads("""
|
|
{
|
|
"instance" : "instance",
|
|
"detail" : "detail",
|
|
"type" : "type",
|
|
"title" : "title",
|
|
"errors" : [ {
|
|
"code" : "code",
|
|
"field" : "field",
|
|
"message" : "message"
|
|
}, {
|
|
"code" : "code",
|
|
"field" : "field",
|
|
"message" : "message"
|
|
} ],
|
|
"status" : 0
|
|
}"""),
|
|
content_type="application/json",
|
|
),
|
|
|
|
"401": ErrorResponseExpectation(
|
|
status=401,
|
|
body=json.loads("""
|
|
{
|
|
"error_description" : "Invalid access token",
|
|
"error" : "invalid_token"
|
|
}"""),
|
|
content_type="application/json",
|
|
),
|
|
|
|
"403": ErrorResponseExpectation(
|
|
status=403,
|
|
body=json.loads("""
|
|
{
|
|
"instance" : "instance",
|
|
"detail" : "detail",
|
|
"type" : "type",
|
|
"title" : "title",
|
|
"status" : 6
|
|
}"""),
|
|
content_type="application/json",
|
|
),
|
|
|
|
"429": ErrorResponseExpectation(
|
|
status=429,
|
|
body=json.loads("""
|
|
{
|
|
"instance" : "instance",
|
|
"detail" : "detail",
|
|
"type" : "type",
|
|
"title" : "title",
|
|
"status" : 6
|
|
}"""),
|
|
content_type="application/json",
|
|
),
|
|
|
|
},
|
|
),
|
|
|
|
"get_endpoint_agent": OperationExpectation(
|
|
operation_id="get_endpoint_agent",
|
|
method="GET",
|
|
path="/endpoint/agents/{agentId}",
|
|
path_param_examples={
|
|
"agentId": 'agent_id_example',
|
|
},
|
|
success_status=200,
|
|
success_body=json.loads("""
|
|
|
|
{
|
|
"npcapVersion" : "npcapVersion",
|
|
"asnDetails" : {
|
|
"asName" : "Virgin Media Limited",
|
|
"asNumber" : 5089
|
|
},
|
|
"clients" : [ {
|
|
"browserExtensions" : [ {
|
|
"browser" : "edge",
|
|
"profile" : "Profile 1",
|
|
"active" : true,
|
|
"error" : "",
|
|
"version" : "0.123.0",
|
|
"enabled" : true
|
|
}, {
|
|
"browser" : "edge",
|
|
"profile" : "Profile 1",
|
|
"active" : true,
|
|
"error" : "",
|
|
"version" : "0.123.0",
|
|
"enabled" : true
|
|
} ],
|
|
"userProfile" : {
|
|
"userName" : "joeblogs32",
|
|
"userPrincipalName" : "joeblogs32@c.com"
|
|
}
|
|
}, {
|
|
"browserExtensions" : [ {
|
|
"browser" : "edge",
|
|
"profile" : "Profile 1",
|
|
"active" : true,
|
|
"error" : "",
|
|
"version" : "0.123.0",
|
|
"enabled" : true
|
|
}, {
|
|
"browser" : "edge",
|
|
"profile" : "Profile 1",
|
|
"active" : true,
|
|
"error" : "",
|
|
"version" : "0.123.0",
|
|
"enabled" : true
|
|
} ],
|
|
"userProfile" : {
|
|
"userName" : "joeblogs32",
|
|
"userPrincipalName" : "joeblogs32@c.com"
|
|
}
|
|
} ],
|
|
"agentType" : "endpoint",
|
|
"_links" : {
|
|
"self" : {
|
|
"hreflang" : "hreflang",
|
|
"templated" : true,
|
|
"profile" : "profile",
|
|
"name" : "name",
|
|
"href" : "https://api.thousandeyes.com/v7/link/to/resource/id",
|
|
"type" : "type",
|
|
"deprecation" : "deprecation",
|
|
"title" : "title"
|
|
}
|
|
},
|
|
"batteryMetrics" : {
|
|
"batteryHealthNormalizedPercent" : 0.92,
|
|
"batteryLevel" : "medium",
|
|
"batteryLevelNormalizedPercent" : 0.3
|
|
},
|
|
"publicIP" : "88.45.2.123",
|
|
"tcpDriverAvailable" : true,
|
|
"platform" : "mac",
|
|
"manufacturer" : "Apple, Inc.",
|
|
"targetVersion" : "0.123.4",
|
|
"cellularProfile" : {
|
|
"rssi" : -10,
|
|
"advertisedNetworkSubtype" : "LTE/HSPA",
|
|
"carrierName" : "T-Mobile",
|
|
"rsrq" : -30,
|
|
"rsrp" : -30,
|
|
"advertisedNetworkGen" : "2g, 3g, 4g, 5g",
|
|
"rscp" : -30,
|
|
"networkGen" : "2g, 3g, 4g, 5g",
|
|
"networkSubtype" : "LTE/HSPA",
|
|
"sinr" : 20
|
|
},
|
|
"nicModel" : "Intel(R) Wi-Fi 6 AX200 160MHz",
|
|
"createdAt" : "2022-05-26T23:37:16Z",
|
|
"numberOfClients" : 3,
|
|
"licenseType" : "essentials",
|
|
"osVersion" : "Version 10.15.2 (Build 19C57)",
|
|
"computerName" : "DESKJET-123",
|
|
"freeDiskSpaceNormalized" : 0.41,
|
|
"model" : "MacBookAir7,2",
|
|
"id" : "861b7557-cd57-4bbb-b648-00bddf88ef49",
|
|
"nicDriverVersion" : "22.250.0.9",
|
|
"serialNumber" : "xaab2ba4-d40f-4e80-9363-7e4826556055",
|
|
"externalMetadata" : [ {
|
|
"key" : "anyConnectDeviceId",
|
|
"value" : "DF434343D"
|
|
}, {
|
|
"key" : "anyConnectDeviceId",
|
|
"value" : "DF434343D"
|
|
} ],
|
|
"version" : "0.123.4",
|
|
"vpnProfiles" : [ {
|
|
"vpnClientNetworkRange" : [ "10.100.0.0/22" ],
|
|
"vpnGatewayAddress" : "vpnGatewayAddress",
|
|
"vpnType" : "cisco-anyconnect",
|
|
"interfaceName" : "interfaceName",
|
|
"vpnClientAddresses" : [ "10.100.0.10" ]
|
|
}, {
|
|
"vpnClientNetworkRange" : [ "10.100.0.0/22" ],
|
|
"vpnGatewayAddress" : "vpnGatewayAddress",
|
|
"vpnType" : "cisco-anyconnect",
|
|
"interfaceName" : "interfaceName",
|
|
"vpnClientAddresses" : [ "10.100.0.10" ]
|
|
} ],
|
|
"lastSeen" : "2022-05-26T23:37:16Z",
|
|
"deleted" : true,
|
|
"totalMemory" : "16384 MB",
|
|
"kernelVersion" : "Darwin 19.2.0",
|
|
"name" : "Office Printer",
|
|
"location" : {
|
|
"locationName" : "London",
|
|
"latitude" : 51.51279,
|
|
"longitude" : -0.09184
|
|
},
|
|
"aid" : "",
|
|
"status" : "enabled",
|
|
"networkInterfaceProfiles" : [ {
|
|
"ethernetProfile" : {
|
|
"linkSpeed" : 0
|
|
},
|
|
"hardwareType" : "wireless",
|
|
"interfaceName" : "en0",
|
|
"addressProfiles" : [ {
|
|
"prefixLength" : 24,
|
|
"addressType" : "unique-local",
|
|
"ipAddress" : "2001:db8:3333:4444:5555:6666:7777:8888",
|
|
"routerHardwareAddress" : "5c:b1:3e:46:1c:84",
|
|
"gateway" : "192.168.0.254"
|
|
}, {
|
|
"prefixLength" : 24,
|
|
"addressType" : "unique-local",
|
|
"ipAddress" : "2001:db8:3333:4444:5555:6666:7777:8888",
|
|
"routerHardwareAddress" : "5c:b1:3e:46:1c:84",
|
|
"gateway" : "192.168.0.254"
|
|
} ],
|
|
"wirelessProfile" : {
|
|
"rssi" : -36,
|
|
"bssid" : "00:11:22:aa:bb:cc",
|
|
"channel" : 48,
|
|
"phyMode" : "802.11ac",
|
|
"ssid" : "GuestWiFi"
|
|
}
|
|
}, {
|
|
"ethernetProfile" : {
|
|
"linkSpeed" : 0
|
|
},
|
|
"hardwareType" : "wireless",
|
|
"interfaceName" : "en0",
|
|
"addressProfiles" : [ {
|
|
"prefixLength" : 24,
|
|
"addressType" : "unique-local",
|
|
"ipAddress" : "2001:db8:3333:4444:5555:6666:7777:8888",
|
|
"routerHardwareAddress" : "5c:b1:3e:46:1c:84",
|
|
"gateway" : "192.168.0.254"
|
|
}, {
|
|
"prefixLength" : 24,
|
|
"addressType" : "unique-local",
|
|
"ipAddress" : "2001:db8:3333:4444:5555:6666:7777:8888",
|
|
"routerHardwareAddress" : "5c:b1:3e:46:1c:84",
|
|
"gateway" : "192.168.0.254"
|
|
} ],
|
|
"wirelessProfile" : {
|
|
"rssi" : -36,
|
|
"bssid" : "00:11:22:aa:bb:cc",
|
|
"channel" : 48,
|
|
"phyMode" : "802.11ac",
|
|
"ssid" : "GuestWiFi"
|
|
}
|
|
} ]
|
|
}
|
|
|
|
"""),
|
|
|
|
success_content_type="application/json",
|
|
|
|
request_body_example=None,
|
|
error_responses={
|
|
|
|
"401": ErrorResponseExpectation(
|
|
status=401,
|
|
body=json.loads("""
|
|
{
|
|
"error_description" : "Invalid access token",
|
|
"error" : "invalid_token"
|
|
}"""),
|
|
content_type="application/json",
|
|
),
|
|
|
|
"403": ErrorResponseExpectation(
|
|
status=403,
|
|
body=json.loads("""
|
|
{
|
|
"instance" : "instance",
|
|
"detail" : "detail",
|
|
"type" : "type",
|
|
"title" : "title",
|
|
"status" : 6
|
|
}"""),
|
|
content_type="application/json",
|
|
),
|
|
|
|
"404": ErrorResponseExpectation(
|
|
status=404,
|
|
body=json.loads("""
|
|
{
|
|
"instance" : "instance",
|
|
"detail" : "detail",
|
|
"type" : "type",
|
|
"title" : "title",
|
|
"status" : 6
|
|
}"""),
|
|
content_type="application/json",
|
|
),
|
|
|
|
"429": ErrorResponseExpectation(
|
|
status=429,
|
|
body=json.loads("""
|
|
{
|
|
"instance" : "instance",
|
|
"detail" : "detail",
|
|
"type" : "type",
|
|
"title" : "title",
|
|
"status" : 6
|
|
}"""),
|
|
content_type="application/json",
|
|
),
|
|
|
|
},
|
|
),
|
|
|
|
"get_endpoint_agents": OperationExpectation(
|
|
operation_id="get_endpoint_agents",
|
|
method="GET",
|
|
path="/endpoint/agents",
|
|
path_param_examples={
|
|
},
|
|
success_status=200,
|
|
success_body=json.loads("""
|
|
|
|
{
|
|
"_links" : {
|
|
"next" : {
|
|
"hreflang" : "hreflang",
|
|
"templated" : true,
|
|
"profile" : "profile",
|
|
"name" : "name",
|
|
"href" : "https://api.thousandeyes.com/v7/link/to/resource/id",
|
|
"type" : "type",
|
|
"deprecation" : "deprecation",
|
|
"title" : "title"
|
|
},
|
|
"self" : {
|
|
"hreflang" : "hreflang",
|
|
"templated" : true,
|
|
"profile" : "profile",
|
|
"name" : "name",
|
|
"href" : "https://api.thousandeyes.com/v7/link/to/resource/id",
|
|
"type" : "type",
|
|
"deprecation" : "deprecation",
|
|
"title" : "title"
|
|
}
|
|
},
|
|
"totalAgents" : 1,
|
|
"agents" : [ {
|
|
"npcapVersion" : "npcapVersion",
|
|
"asnDetails" : {
|
|
"asName" : "Virgin Media Limited",
|
|
"asNumber" : 5089
|
|
},
|
|
"clients" : [ {
|
|
"browserExtensions" : [ {
|
|
"browser" : "edge",
|
|
"profile" : "Profile 1",
|
|
"active" : true,
|
|
"error" : "",
|
|
"version" : "0.123.0",
|
|
"enabled" : true
|
|
}, {
|
|
"browser" : "edge",
|
|
"profile" : "Profile 1",
|
|
"active" : true,
|
|
"error" : "",
|
|
"version" : "0.123.0",
|
|
"enabled" : true
|
|
} ],
|
|
"userProfile" : {
|
|
"userName" : "joeblogs32",
|
|
"userPrincipalName" : "joeblogs32@c.com"
|
|
}
|
|
}, {
|
|
"browserExtensions" : [ {
|
|
"browser" : "edge",
|
|
"profile" : "Profile 1",
|
|
"active" : true,
|
|
"error" : "",
|
|
"version" : "0.123.0",
|
|
"enabled" : true
|
|
}, {
|
|
"browser" : "edge",
|
|
"profile" : "Profile 1",
|
|
"active" : true,
|
|
"error" : "",
|
|
"version" : "0.123.0",
|
|
"enabled" : true
|
|
} ],
|
|
"userProfile" : {
|
|
"userName" : "joeblogs32",
|
|
"userPrincipalName" : "joeblogs32@c.com"
|
|
}
|
|
} ],
|
|
"agentType" : "endpoint",
|
|
"_links" : {
|
|
"self" : {
|
|
"hreflang" : "hreflang",
|
|
"templated" : true,
|
|
"profile" : "profile",
|
|
"name" : "name",
|
|
"href" : "https://api.thousandeyes.com/v7/link/to/resource/id",
|
|
"type" : "type",
|
|
"deprecation" : "deprecation",
|
|
"title" : "title"
|
|
}
|
|
},
|
|
"batteryMetrics" : {
|
|
"batteryHealthNormalizedPercent" : 0.92,
|
|
"batteryLevel" : "medium",
|
|
"batteryLevelNormalizedPercent" : 0.3
|
|
},
|
|
"publicIP" : "88.45.2.123",
|
|
"tcpDriverAvailable" : true,
|
|
"platform" : "mac",
|
|
"manufacturer" : "Apple, Inc.",
|
|
"targetVersion" : "0.123.4",
|
|
"cellularProfile" : {
|
|
"rssi" : -10,
|
|
"advertisedNetworkSubtype" : "LTE/HSPA",
|
|
"carrierName" : "T-Mobile",
|
|
"rsrq" : -30,
|
|
"rsrp" : -30,
|
|
"advertisedNetworkGen" : "2g, 3g, 4g, 5g",
|
|
"rscp" : -30,
|
|
"networkGen" : "2g, 3g, 4g, 5g",
|
|
"networkSubtype" : "LTE/HSPA",
|
|
"sinr" : 20
|
|
},
|
|
"nicModel" : "Intel(R) Wi-Fi 6 AX200 160MHz",
|
|
"createdAt" : "2022-05-26T23:37:16Z",
|
|
"numberOfClients" : 3,
|
|
"licenseType" : "essentials",
|
|
"osVersion" : "Version 10.15.2 (Build 19C57)",
|
|
"computerName" : "DESKJET-123",
|
|
"freeDiskSpaceNormalized" : 0.41,
|
|
"model" : "MacBookAir7,2",
|
|
"id" : "861b7557-cd57-4bbb-b648-00bddf88ef49",
|
|
"nicDriverVersion" : "22.250.0.9",
|
|
"serialNumber" : "xaab2ba4-d40f-4e80-9363-7e4826556055",
|
|
"externalMetadata" : [ {
|
|
"key" : "anyConnectDeviceId",
|
|
"value" : "DF434343D"
|
|
}, {
|
|
"key" : "anyConnectDeviceId",
|
|
"value" : "DF434343D"
|
|
} ],
|
|
"version" : "0.123.4",
|
|
"vpnProfiles" : [ {
|
|
"vpnClientNetworkRange" : [ "10.100.0.0/22" ],
|
|
"vpnGatewayAddress" : "vpnGatewayAddress",
|
|
"vpnType" : "cisco-anyconnect",
|
|
"interfaceName" : "interfaceName",
|
|
"vpnClientAddresses" : [ "10.100.0.10" ]
|
|
}, {
|
|
"vpnClientNetworkRange" : [ "10.100.0.0/22" ],
|
|
"vpnGatewayAddress" : "vpnGatewayAddress",
|
|
"vpnType" : "cisco-anyconnect",
|
|
"interfaceName" : "interfaceName",
|
|
"vpnClientAddresses" : [ "10.100.0.10" ]
|
|
} ],
|
|
"lastSeen" : "2022-05-26T23:37:16Z",
|
|
"deleted" : true,
|
|
"totalMemory" : "16384 MB",
|
|
"kernelVersion" : "Darwin 19.2.0",
|
|
"name" : "Office Printer",
|
|
"location" : {
|
|
"locationName" : "London",
|
|
"latitude" : 51.51279,
|
|
"longitude" : -0.09184
|
|
},
|
|
"aid" : "",
|
|
"status" : "enabled",
|
|
"networkInterfaceProfiles" : [ {
|
|
"ethernetProfile" : {
|
|
"linkSpeed" : 0
|
|
},
|
|
"hardwareType" : "wireless",
|
|
"interfaceName" : "en0",
|
|
"addressProfiles" : [ {
|
|
"prefixLength" : 24,
|
|
"addressType" : "unique-local",
|
|
"ipAddress" : "2001:db8:3333:4444:5555:6666:7777:8888",
|
|
"routerHardwareAddress" : "5c:b1:3e:46:1c:84",
|
|
"gateway" : "192.168.0.254"
|
|
}, {
|
|
"prefixLength" : 24,
|
|
"addressType" : "unique-local",
|
|
"ipAddress" : "2001:db8:3333:4444:5555:6666:7777:8888",
|
|
"routerHardwareAddress" : "5c:b1:3e:46:1c:84",
|
|
"gateway" : "192.168.0.254"
|
|
} ],
|
|
"wirelessProfile" : {
|
|
"rssi" : -36,
|
|
"bssid" : "00:11:22:aa:bb:cc",
|
|
"channel" : 48,
|
|
"phyMode" : "802.11ac",
|
|
"ssid" : "GuestWiFi"
|
|
}
|
|
}, {
|
|
"ethernetProfile" : {
|
|
"linkSpeed" : 0
|
|
},
|
|
"hardwareType" : "wireless",
|
|
"interfaceName" : "en0",
|
|
"addressProfiles" : [ {
|
|
"prefixLength" : 24,
|
|
"addressType" : "unique-local",
|
|
"ipAddress" : "2001:db8:3333:4444:5555:6666:7777:8888",
|
|
"routerHardwareAddress" : "5c:b1:3e:46:1c:84",
|
|
"gateway" : "192.168.0.254"
|
|
}, {
|
|
"prefixLength" : 24,
|
|
"addressType" : "unique-local",
|
|
"ipAddress" : "2001:db8:3333:4444:5555:6666:7777:8888",
|
|
"routerHardwareAddress" : "5c:b1:3e:46:1c:84",
|
|
"gateway" : "192.168.0.254"
|
|
} ],
|
|
"wirelessProfile" : {
|
|
"rssi" : -36,
|
|
"bssid" : "00:11:22:aa:bb:cc",
|
|
"channel" : 48,
|
|
"phyMode" : "802.11ac",
|
|
"ssid" : "GuestWiFi"
|
|
}
|
|
} ]
|
|
}, {
|
|
"npcapVersion" : "npcapVersion",
|
|
"asnDetails" : {
|
|
"asName" : "Virgin Media Limited",
|
|
"asNumber" : 5089
|
|
},
|
|
"clients" : [ {
|
|
"browserExtensions" : [ {
|
|
"browser" : "edge",
|
|
"profile" : "Profile 1",
|
|
"active" : true,
|
|
"error" : "",
|
|
"version" : "0.123.0",
|
|
"enabled" : true
|
|
}, {
|
|
"browser" : "edge",
|
|
"profile" : "Profile 1",
|
|
"active" : true,
|
|
"error" : "",
|
|
"version" : "0.123.0",
|
|
"enabled" : true
|
|
} ],
|
|
"userProfile" : {
|
|
"userName" : "joeblogs32",
|
|
"userPrincipalName" : "joeblogs32@c.com"
|
|
}
|
|
}, {
|
|
"browserExtensions" : [ {
|
|
"browser" : "edge",
|
|
"profile" : "Profile 1",
|
|
"active" : true,
|
|
"error" : "",
|
|
"version" : "0.123.0",
|
|
"enabled" : true
|
|
}, {
|
|
"browser" : "edge",
|
|
"profile" : "Profile 1",
|
|
"active" : true,
|
|
"error" : "",
|
|
"version" : "0.123.0",
|
|
"enabled" : true
|
|
} ],
|
|
"userProfile" : {
|
|
"userName" : "joeblogs32",
|
|
"userPrincipalName" : "joeblogs32@c.com"
|
|
}
|
|
} ],
|
|
"agentType" : "endpoint",
|
|
"_links" : {
|
|
"self" : {
|
|
"hreflang" : "hreflang",
|
|
"templated" : true,
|
|
"profile" : "profile",
|
|
"name" : "name",
|
|
"href" : "https://api.thousandeyes.com/v7/link/to/resource/id",
|
|
"type" : "type",
|
|
"deprecation" : "deprecation",
|
|
"title" : "title"
|
|
}
|
|
},
|
|
"batteryMetrics" : {
|
|
"batteryHealthNormalizedPercent" : 0.92,
|
|
"batteryLevel" : "medium",
|
|
"batteryLevelNormalizedPercent" : 0.3
|
|
},
|
|
"publicIP" : "88.45.2.123",
|
|
"tcpDriverAvailable" : true,
|
|
"platform" : "mac",
|
|
"manufacturer" : "Apple, Inc.",
|
|
"targetVersion" : "0.123.4",
|
|
"cellularProfile" : {
|
|
"rssi" : -10,
|
|
"advertisedNetworkSubtype" : "LTE/HSPA",
|
|
"carrierName" : "T-Mobile",
|
|
"rsrq" : -30,
|
|
"rsrp" : -30,
|
|
"advertisedNetworkGen" : "2g, 3g, 4g, 5g",
|
|
"rscp" : -30,
|
|
"networkGen" : "2g, 3g, 4g, 5g",
|
|
"networkSubtype" : "LTE/HSPA",
|
|
"sinr" : 20
|
|
},
|
|
"nicModel" : "Intel(R) Wi-Fi 6 AX200 160MHz",
|
|
"createdAt" : "2022-05-26T23:37:16Z",
|
|
"numberOfClients" : 3,
|
|
"licenseType" : "essentials",
|
|
"osVersion" : "Version 10.15.2 (Build 19C57)",
|
|
"computerName" : "DESKJET-123",
|
|
"freeDiskSpaceNormalized" : 0.41,
|
|
"model" : "MacBookAir7,2",
|
|
"id" : "861b7557-cd57-4bbb-b648-00bddf88ef49",
|
|
"nicDriverVersion" : "22.250.0.9",
|
|
"serialNumber" : "xaab2ba4-d40f-4e80-9363-7e4826556055",
|
|
"externalMetadata" : [ {
|
|
"key" : "anyConnectDeviceId",
|
|
"value" : "DF434343D"
|
|
}, {
|
|
"key" : "anyConnectDeviceId",
|
|
"value" : "DF434343D"
|
|
} ],
|
|
"version" : "0.123.4",
|
|
"vpnProfiles" : [ {
|
|
"vpnClientNetworkRange" : [ "10.100.0.0/22" ],
|
|
"vpnGatewayAddress" : "vpnGatewayAddress",
|
|
"vpnType" : "cisco-anyconnect",
|
|
"interfaceName" : "interfaceName",
|
|
"vpnClientAddresses" : [ "10.100.0.10" ]
|
|
}, {
|
|
"vpnClientNetworkRange" : [ "10.100.0.0/22" ],
|
|
"vpnGatewayAddress" : "vpnGatewayAddress",
|
|
"vpnType" : "cisco-anyconnect",
|
|
"interfaceName" : "interfaceName",
|
|
"vpnClientAddresses" : [ "10.100.0.10" ]
|
|
} ],
|
|
"lastSeen" : "2022-05-26T23:37:16Z",
|
|
"deleted" : true,
|
|
"totalMemory" : "16384 MB",
|
|
"kernelVersion" : "Darwin 19.2.0",
|
|
"name" : "Office Printer",
|
|
"location" : {
|
|
"locationName" : "London",
|
|
"latitude" : 51.51279,
|
|
"longitude" : -0.09184
|
|
},
|
|
"aid" : "",
|
|
"status" : "enabled",
|
|
"networkInterfaceProfiles" : [ {
|
|
"ethernetProfile" : {
|
|
"linkSpeed" : 0
|
|
},
|
|
"hardwareType" : "wireless",
|
|
"interfaceName" : "en0",
|
|
"addressProfiles" : [ {
|
|
"prefixLength" : 24,
|
|
"addressType" : "unique-local",
|
|
"ipAddress" : "2001:db8:3333:4444:5555:6666:7777:8888",
|
|
"routerHardwareAddress" : "5c:b1:3e:46:1c:84",
|
|
"gateway" : "192.168.0.254"
|
|
}, {
|
|
"prefixLength" : 24,
|
|
"addressType" : "unique-local",
|
|
"ipAddress" : "2001:db8:3333:4444:5555:6666:7777:8888",
|
|
"routerHardwareAddress" : "5c:b1:3e:46:1c:84",
|
|
"gateway" : "192.168.0.254"
|
|
} ],
|
|
"wirelessProfile" : {
|
|
"rssi" : -36,
|
|
"bssid" : "00:11:22:aa:bb:cc",
|
|
"channel" : 48,
|
|
"phyMode" : "802.11ac",
|
|
"ssid" : "GuestWiFi"
|
|
}
|
|
}, {
|
|
"ethernetProfile" : {
|
|
"linkSpeed" : 0
|
|
},
|
|
"hardwareType" : "wireless",
|
|
"interfaceName" : "en0",
|
|
"addressProfiles" : [ {
|
|
"prefixLength" : 24,
|
|
"addressType" : "unique-local",
|
|
"ipAddress" : "2001:db8:3333:4444:5555:6666:7777:8888",
|
|
"routerHardwareAddress" : "5c:b1:3e:46:1c:84",
|
|
"gateway" : "192.168.0.254"
|
|
}, {
|
|
"prefixLength" : 24,
|
|
"addressType" : "unique-local",
|
|
"ipAddress" : "2001:db8:3333:4444:5555:6666:7777:8888",
|
|
"routerHardwareAddress" : "5c:b1:3e:46:1c:84",
|
|
"gateway" : "192.168.0.254"
|
|
} ],
|
|
"wirelessProfile" : {
|
|
"rssi" : -36,
|
|
"bssid" : "00:11:22:aa:bb:cc",
|
|
"channel" : 48,
|
|
"phyMode" : "802.11ac",
|
|
"ssid" : "GuestWiFi"
|
|
}
|
|
} ]
|
|
} ]
|
|
}
|
|
|
|
"""),
|
|
|
|
success_content_type="application/json",
|
|
|
|
request_body_example=None,
|
|
error_responses={
|
|
|
|
"401": ErrorResponseExpectation(
|
|
status=401,
|
|
body=json.loads("""
|
|
{
|
|
"error_description" : "Invalid access token",
|
|
"error" : "invalid_token"
|
|
}"""),
|
|
content_type="application/json",
|
|
),
|
|
|
|
"403": ErrorResponseExpectation(
|
|
status=403,
|
|
body=json.loads("""
|
|
{
|
|
"instance" : "instance",
|
|
"detail" : "detail",
|
|
"type" : "type",
|
|
"title" : "title",
|
|
"status" : 6
|
|
}"""),
|
|
content_type="application/json",
|
|
),
|
|
|
|
"429": ErrorResponseExpectation(
|
|
status=429,
|
|
body=json.loads("""
|
|
{
|
|
"instance" : "instance",
|
|
"detail" : "detail",
|
|
"type" : "type",
|
|
"title" : "title",
|
|
"status" : 6
|
|
}"""),
|
|
content_type="application/json",
|
|
),
|
|
|
|
},
|
|
),
|
|
|
|
"get_endpoint_agents_connection_string": OperationExpectation(
|
|
operation_id="get_endpoint_agents_connection_string",
|
|
method="GET",
|
|
path="/endpoint/agents/connection-string",
|
|
path_param_examples={
|
|
},
|
|
success_status=200,
|
|
success_body=json.loads("""
|
|
|
|
{
|
|
"connectionString" : "D2xZSLlqo64Xe2EnYisklA==",
|
|
"_links" : {
|
|
"self" : {
|
|
"hreflang" : "hreflang",
|
|
"templated" : true,
|
|
"profile" : "profile",
|
|
"name" : "name",
|
|
"href" : "https://api.thousandeyes.com/v7/link/to/resource/id",
|
|
"type" : "type",
|
|
"deprecation" : "deprecation",
|
|
"title" : "title"
|
|
}
|
|
}
|
|
}
|
|
|
|
"""),
|
|
|
|
success_content_type="application/json",
|
|
|
|
request_body_example=None,
|
|
error_responses={
|
|
|
|
"401": ErrorResponseExpectation(
|
|
status=401,
|
|
body=json.loads("""
|
|
{
|
|
"error_description" : "Invalid access token",
|
|
"error" : "invalid_token"
|
|
}"""),
|
|
content_type="application/json",
|
|
),
|
|
|
|
"403": ErrorResponseExpectation(
|
|
status=403,
|
|
body=json.loads("""
|
|
{
|
|
"instance" : "instance",
|
|
"detail" : "detail",
|
|
"type" : "type",
|
|
"title" : "title",
|
|
"status" : 6
|
|
}"""),
|
|
content_type="application/json",
|
|
),
|
|
|
|
"429": ErrorResponseExpectation(
|
|
status=429,
|
|
body=json.loads("""
|
|
{
|
|
"instance" : "instance",
|
|
"detail" : "detail",
|
|
"type" : "type",
|
|
"title" : "title",
|
|
"status" : 6
|
|
}"""),
|
|
content_type="application/json",
|
|
),
|
|
|
|
},
|
|
),
|
|
|
|
"update_endpoint_agent": OperationExpectation(
|
|
operation_id="update_endpoint_agent",
|
|
method="PATCH",
|
|
path="/endpoint/agents/{agentId}",
|
|
path_param_examples={
|
|
"agentId": 'agent_id_example',
|
|
},
|
|
success_status=200,
|
|
success_body=json.loads("""
|
|
|
|
{
|
|
"npcapVersion" : "npcapVersion",
|
|
"asnDetails" : {
|
|
"asName" : "Virgin Media Limited",
|
|
"asNumber" : 5089
|
|
},
|
|
"clients" : [ {
|
|
"browserExtensions" : [ {
|
|
"browser" : "edge",
|
|
"profile" : "Profile 1",
|
|
"active" : true,
|
|
"error" : "",
|
|
"version" : "0.123.0",
|
|
"enabled" : true
|
|
}, {
|
|
"browser" : "edge",
|
|
"profile" : "Profile 1",
|
|
"active" : true,
|
|
"error" : "",
|
|
"version" : "0.123.0",
|
|
"enabled" : true
|
|
} ],
|
|
"userProfile" : {
|
|
"userName" : "joeblogs32",
|
|
"userPrincipalName" : "joeblogs32@c.com"
|
|
}
|
|
}, {
|
|
"browserExtensions" : [ {
|
|
"browser" : "edge",
|
|
"profile" : "Profile 1",
|
|
"active" : true,
|
|
"error" : "",
|
|
"version" : "0.123.0",
|
|
"enabled" : true
|
|
}, {
|
|
"browser" : "edge",
|
|
"profile" : "Profile 1",
|
|
"active" : true,
|
|
"error" : "",
|
|
"version" : "0.123.0",
|
|
"enabled" : true
|
|
} ],
|
|
"userProfile" : {
|
|
"userName" : "joeblogs32",
|
|
"userPrincipalName" : "joeblogs32@c.com"
|
|
}
|
|
} ],
|
|
"agentType" : "endpoint",
|
|
"_links" : {
|
|
"self" : {
|
|
"hreflang" : "hreflang",
|
|
"templated" : true,
|
|
"profile" : "profile",
|
|
"name" : "name",
|
|
"href" : "https://api.thousandeyes.com/v7/link/to/resource/id",
|
|
"type" : "type",
|
|
"deprecation" : "deprecation",
|
|
"title" : "title"
|
|
}
|
|
},
|
|
"batteryMetrics" : {
|
|
"batteryHealthNormalizedPercent" : 0.92,
|
|
"batteryLevel" : "medium",
|
|
"batteryLevelNormalizedPercent" : 0.3
|
|
},
|
|
"publicIP" : "88.45.2.123",
|
|
"tcpDriverAvailable" : true,
|
|
"platform" : "mac",
|
|
"manufacturer" : "Apple, Inc.",
|
|
"targetVersion" : "0.123.4",
|
|
"cellularProfile" : {
|
|
"rssi" : -10,
|
|
"advertisedNetworkSubtype" : "LTE/HSPA",
|
|
"carrierName" : "T-Mobile",
|
|
"rsrq" : -30,
|
|
"rsrp" : -30,
|
|
"advertisedNetworkGen" : "2g, 3g, 4g, 5g",
|
|
"rscp" : -30,
|
|
"networkGen" : "2g, 3g, 4g, 5g",
|
|
"networkSubtype" : "LTE/HSPA",
|
|
"sinr" : 20
|
|
},
|
|
"nicModel" : "Intel(R) Wi-Fi 6 AX200 160MHz",
|
|
"createdAt" : "2022-05-26T23:37:16Z",
|
|
"numberOfClients" : 3,
|
|
"licenseType" : "essentials",
|
|
"osVersion" : "Version 10.15.2 (Build 19C57)",
|
|
"computerName" : "DESKJET-123",
|
|
"freeDiskSpaceNormalized" : 0.41,
|
|
"model" : "MacBookAir7,2",
|
|
"id" : "861b7557-cd57-4bbb-b648-00bddf88ef49",
|
|
"nicDriverVersion" : "22.250.0.9",
|
|
"serialNumber" : "xaab2ba4-d40f-4e80-9363-7e4826556055",
|
|
"externalMetadata" : [ {
|
|
"key" : "anyConnectDeviceId",
|
|
"value" : "DF434343D"
|
|
}, {
|
|
"key" : "anyConnectDeviceId",
|
|
"value" : "DF434343D"
|
|
} ],
|
|
"version" : "0.123.4",
|
|
"vpnProfiles" : [ {
|
|
"vpnClientNetworkRange" : [ "10.100.0.0/22" ],
|
|
"vpnGatewayAddress" : "vpnGatewayAddress",
|
|
"vpnType" : "cisco-anyconnect",
|
|
"interfaceName" : "interfaceName",
|
|
"vpnClientAddresses" : [ "10.100.0.10" ]
|
|
}, {
|
|
"vpnClientNetworkRange" : [ "10.100.0.0/22" ],
|
|
"vpnGatewayAddress" : "vpnGatewayAddress",
|
|
"vpnType" : "cisco-anyconnect",
|
|
"interfaceName" : "interfaceName",
|
|
"vpnClientAddresses" : [ "10.100.0.10" ]
|
|
} ],
|
|
"lastSeen" : "2022-05-26T23:37:16Z",
|
|
"deleted" : true,
|
|
"totalMemory" : "16384 MB",
|
|
"kernelVersion" : "Darwin 19.2.0",
|
|
"name" : "Office Printer",
|
|
"location" : {
|
|
"locationName" : "London",
|
|
"latitude" : 51.51279,
|
|
"longitude" : -0.09184
|
|
},
|
|
"aid" : "",
|
|
"status" : "enabled",
|
|
"networkInterfaceProfiles" : [ {
|
|
"ethernetProfile" : {
|
|
"linkSpeed" : 0
|
|
},
|
|
"hardwareType" : "wireless",
|
|
"interfaceName" : "en0",
|
|
"addressProfiles" : [ {
|
|
"prefixLength" : 24,
|
|
"addressType" : "unique-local",
|
|
"ipAddress" : "2001:db8:3333:4444:5555:6666:7777:8888",
|
|
"routerHardwareAddress" : "5c:b1:3e:46:1c:84",
|
|
"gateway" : "192.168.0.254"
|
|
}, {
|
|
"prefixLength" : 24,
|
|
"addressType" : "unique-local",
|
|
"ipAddress" : "2001:db8:3333:4444:5555:6666:7777:8888",
|
|
"routerHardwareAddress" : "5c:b1:3e:46:1c:84",
|
|
"gateway" : "192.168.0.254"
|
|
} ],
|
|
"wirelessProfile" : {
|
|
"rssi" : -36,
|
|
"bssid" : "00:11:22:aa:bb:cc",
|
|
"channel" : 48,
|
|
"phyMode" : "802.11ac",
|
|
"ssid" : "GuestWiFi"
|
|
}
|
|
}, {
|
|
"ethernetProfile" : {
|
|
"linkSpeed" : 0
|
|
},
|
|
"hardwareType" : "wireless",
|
|
"interfaceName" : "en0",
|
|
"addressProfiles" : [ {
|
|
"prefixLength" : 24,
|
|
"addressType" : "unique-local",
|
|
"ipAddress" : "2001:db8:3333:4444:5555:6666:7777:8888",
|
|
"routerHardwareAddress" : "5c:b1:3e:46:1c:84",
|
|
"gateway" : "192.168.0.254"
|
|
}, {
|
|
"prefixLength" : 24,
|
|
"addressType" : "unique-local",
|
|
"ipAddress" : "2001:db8:3333:4444:5555:6666:7777:8888",
|
|
"routerHardwareAddress" : "5c:b1:3e:46:1c:84",
|
|
"gateway" : "192.168.0.254"
|
|
} ],
|
|
"wirelessProfile" : {
|
|
"rssi" : -36,
|
|
"bssid" : "00:11:22:aa:bb:cc",
|
|
"channel" : 48,
|
|
"phyMode" : "802.11ac",
|
|
"ssid" : "GuestWiFi"
|
|
}
|
|
} ]
|
|
}
|
|
|
|
"""),
|
|
|
|
success_content_type="application/json",
|
|
|
|
request_body_example=json.loads("""
|
|
|
|
{
|
|
"licenseType" : "essentials",
|
|
"name" : "Office Printer"
|
|
}
|
|
|
|
"""),
|
|
error_responses={
|
|
|
|
"401": ErrorResponseExpectation(
|
|
status=401,
|
|
body=json.loads("""
|
|
{
|
|
"error_description" : "Invalid access token",
|
|
"error" : "invalid_token"
|
|
}"""),
|
|
content_type="application/json",
|
|
),
|
|
|
|
"403": ErrorResponseExpectation(
|
|
status=403,
|
|
body=json.loads("""
|
|
{
|
|
"instance" : "instance",
|
|
"detail" : "detail",
|
|
"type" : "type",
|
|
"title" : "title",
|
|
"status" : 6
|
|
}"""),
|
|
content_type="application/json",
|
|
),
|
|
|
|
"404": ErrorResponseExpectation(
|
|
status=404,
|
|
body=json.loads("""
|
|
{
|
|
"instance" : "instance",
|
|
"detail" : "detail",
|
|
"type" : "type",
|
|
"title" : "title",
|
|
"status" : 6
|
|
}"""),
|
|
content_type="application/json",
|
|
),
|
|
|
|
"429": ErrorResponseExpectation(
|
|
status=429,
|
|
body=json.loads("""
|
|
{
|
|
"instance" : "instance",
|
|
"detail" : "detail",
|
|
"type" : "type",
|
|
"title" : "title",
|
|
"status" : 6
|
|
}"""),
|
|
content_type="application/json",
|
|
),
|
|
|
|
},
|
|
),
|
|
|
|
"transfer_endpoint_agents": OperationExpectation(
|
|
operation_id="transfer_endpoint_agents",
|
|
method="POST",
|
|
path="/endpoint/agents/transfer/bulk",
|
|
path_param_examples={
|
|
},
|
|
success_status=207,
|
|
success_body=json.loads("""
|
|
|
|
{
|
|
"items" : [ {
|
|
"status" : 200,
|
|
"detail" : "Initiated",
|
|
"request" : {
|
|
"agentId" : "5d0764ac-7e42-4ec8-a0d4-39fc53edccba",
|
|
"fromAid" : "1234",
|
|
"toAid" : "12345"
|
|
}
|
|
}, {
|
|
"status" : 400,
|
|
"detail" : "Missing from-account id",
|
|
"request" : {
|
|
"agentId" : "5d0764ac-7e42-4ec8-a0d5-39fc53ed1234",
|
|
"fromAid" : "xxx",
|
|
"toAid" : "12345"
|
|
}
|
|
}, {
|
|
"status" : 403,
|
|
"detail" : "User does not have permission on 'to' aid",
|
|
"request" : {
|
|
"agentId" : "5d0764ac-7e42-4ec8-a0d5-39fc53ed7890",
|
|
"fromAid" : "1234",
|
|
"toAid" : "12345"
|
|
}
|
|
} ]
|
|
}
|
|
|
|
"""),
|
|
|
|
success_content_type="application/json",
|
|
|
|
request_body_example=json.loads("""
|
|
|
|
{
|
|
"transfers" : [ {
|
|
"agentId" : "5d0764ac-7e42-4ec8-a0d4-39fc53edccba",
|
|
"fromAid" : "1234",
|
|
"toAid" : "12345"
|
|
}, {
|
|
"agentId" : "5d0764ac-7e42-4ec8-a0d4-39fc53edccba",
|
|
"fromAid" : "1234",
|
|
"toAid" : "12345"
|
|
} ]
|
|
}
|
|
|
|
"""),
|
|
error_responses={
|
|
|
|
"400": ErrorResponseExpectation(
|
|
status=400,
|
|
body=json.loads("""
|
|
{
|
|
"instance" : "instance",
|
|
"detail" : "detail",
|
|
"type" : "type",
|
|
"title" : "title",
|
|
"errors" : [ {
|
|
"code" : "code",
|
|
"field" : "field",
|
|
"message" : "message"
|
|
}, {
|
|
"code" : "code",
|
|
"field" : "field",
|
|
"message" : "message"
|
|
} ],
|
|
"status" : 0
|
|
}"""),
|
|
content_type="application/json",
|
|
),
|
|
|
|
"401": ErrorResponseExpectation(
|
|
status=401,
|
|
body=json.loads("""
|
|
{
|
|
"error_description" : "Invalid access token",
|
|
"error" : "invalid_token"
|
|
}"""),
|
|
content_type="application/json",
|
|
),
|
|
|
|
"403": ErrorResponseExpectation(
|
|
status=403,
|
|
body=json.loads("""
|
|
{
|
|
"instance" : "instance",
|
|
"detail" : "detail",
|
|
"type" : "type",
|
|
"title" : "title",
|
|
"status" : 6
|
|
}"""),
|
|
content_type="application/json",
|
|
),
|
|
|
|
"404": ErrorResponseExpectation(
|
|
status=404,
|
|
body=json.loads("""
|
|
{
|
|
"instance" : "instance",
|
|
"detail" : "detail",
|
|
"type" : "type",
|
|
"title" : "title",
|
|
"status" : 6
|
|
}"""),
|
|
content_type="application/json",
|
|
),
|
|
|
|
"429": ErrorResponseExpectation(
|
|
status=429,
|
|
body=json.loads("""
|
|
{
|
|
"instance" : "instance",
|
|
"detail" : "detail",
|
|
"type" : "type",
|
|
"title" : "title",
|
|
"status" : 6
|
|
}"""),
|
|
content_type="application/json",
|
|
),
|
|
|
|
},
|
|
),
|
|
|
|
"get_endpoint_proxies": OperationExpectation(
|
|
operation_id="get_endpoint_proxies",
|
|
method="GET",
|
|
path="/endpoint/proxies",
|
|
path_param_examples={
|
|
},
|
|
success_status=200,
|
|
success_body=json.loads("""
|
|
|
|
{
|
|
"proxies" : [ {
|
|
"testIds" : [ "9923667", "9923667" ],
|
|
"agentIds" : [ "861b7557-cd57-4bbb-b648-00bddf88ef49", "861b7557-cd57-4bbb-b648-00bddf88ef49" ],
|
|
"pac" : "https://example.com/proxy.pac",
|
|
"port" : 8080,
|
|
"name" : "Local Mitmproxy",
|
|
"host" : "localhost",
|
|
"type" : "static",
|
|
"userName" : "endpoint-proxy-user",
|
|
"authType" : "none",
|
|
"bypassList" : "localhost,127.0.0.1",
|
|
"proxyId" : "101498"
|
|
}, {
|
|
"testIds" : [ "9923667", "9923667" ],
|
|
"agentIds" : [ "861b7557-cd57-4bbb-b648-00bddf88ef49", "861b7557-cd57-4bbb-b648-00bddf88ef49" ],
|
|
"pac" : "https://example.com/proxy.pac",
|
|
"port" : 8080,
|
|
"name" : "Local Mitmproxy",
|
|
"host" : "localhost",
|
|
"type" : "static",
|
|
"userName" : "endpoint-proxy-user",
|
|
"authType" : "none",
|
|
"bypassList" : "localhost,127.0.0.1",
|
|
"proxyId" : "101498"
|
|
} ]
|
|
}
|
|
|
|
"""),
|
|
|
|
success_content_type="application/json",
|
|
|
|
request_body_example=None,
|
|
error_responses={
|
|
|
|
"401": ErrorResponseExpectation(
|
|
status=401,
|
|
body=json.loads("""
|
|
{
|
|
"error_description" : "Invalid access token",
|
|
"error" : "invalid_token"
|
|
}"""),
|
|
content_type="application/json",
|
|
),
|
|
|
|
"403": ErrorResponseExpectation(
|
|
status=403,
|
|
body=json.loads("""
|
|
{
|
|
"instance" : "instance",
|
|
"detail" : "detail",
|
|
"type" : "type",
|
|
"title" : "title",
|
|
"status" : 6
|
|
}"""),
|
|
content_type="application/json",
|
|
),
|
|
|
|
"429": ErrorResponseExpectation(
|
|
status=429,
|
|
body=json.loads("""
|
|
{
|
|
"instance" : "instance",
|
|
"detail" : "detail",
|
|
"type" : "type",
|
|
"title" : "title",
|
|
"status" : 6
|
|
}"""),
|
|
content_type="application/json",
|
|
),
|
|
|
|
"500": ErrorResponseExpectation(
|
|
status=500,
|
|
body=json.loads("""
|
|
{
|
|
"instance" : "instance",
|
|
"detail" : "detail",
|
|
"type" : "type",
|
|
"title" : "title",
|
|
"status" : 6
|
|
}"""),
|
|
content_type="application/json",
|
|
),
|
|
|
|
},
|
|
),
|
|
|
|
}
|