{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/thousandeyes/json-schema/thousandeyes-administrative-api-account-group-detail-schema.json",
  "title": "Administrative_API_AccountGroupDetail",
  "x-generated": "2026-11-25",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/thousandeyes-account-groups-api-openapi.yml#/components/schemas/Administrative_API_AccountGroupDetail",
  "allOf": [
    {
      "$ref": "#/$defs/Administrative_API_CreatedAccountGroup"
    },
    {
      "type": "object",
      "properties": {
        "agents": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/Administrative_API_EnterpriseAgent"
          }
        },
        "accountToken": {
          "$ref": "#/$defs/Administrative_API_AccountGroupToken",
          "type": "string"
        }
      }
    }
  ],
  "$defs": {
    "Administrative_API_AccountGroup": {
      "type": "object",
      "properties": {
        "aid": {
          "$ref": "#/$defs/Administrative_API_AccountGroupId"
        },
        "accountGroupName": {
          "type": "string",
          "description": "Account group name"
        }
      }
    },
    "Administrative_API_AccountGroupId": {
      "type": "string",
      "description": "A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint."
    },
    "Administrative_API_AccountGroupInfo": {
      "allOf": [
        {
          "$ref": "#/$defs/Administrative_API_AccountGroup"
        },
        {
          "type": "object",
          "properties": {
            "isCurrentAccountGroup": {
              "type": "boolean",
              "description": "Indicates whether the requested aid is the context of the current account."
            },
            "isDefaultAccountGroup": {
              "type": "boolean",
              "description": "Indicates whether the aid is the default one for the requesting user."
            },
            "organizationName": {
              "type": "string",
              "description": "(Optional) The name of the organization associated with the account group."
            },
            "orgId": {
              "type": "string",
              "description": "(Optional) The ID for the organization associated with the account group."
            }
          }
        }
      ]
    },
    "Administrative_API_AccountGroupToken": {
      "type": "string",
      "description": "The account group token is an alphanumeric string used to bind an Enterprise Agent to a specific account group. This token is not a password that must be kept secret. You can retrieve your `AccountGroupToken` from the `/account-groups/{id}` endpoint."
    },
    "Administrative_API_AgentBase": {
      "type": "object",
      "properties": {
        "ipAddresses": {
          "type": "array",
          "description": "Array of private IP addresses.",
          "readOnly": true,
          "items": {
            "type": "string"
          }
        },
        "publicIpAddresses": {
          "type": "array",
          "description": "Array of public IP addresses.",
          "readOnly": true,
          "items": {
            "type": "string"
          }
        },
        "network": {
          "type": "string",
          "description": "Network (including ASN) of agent’s public IP.",
          "readOnly": true
        }
      }
    },
    "Administrative_API_AgentResponse": {
      "allOf": [
        {
          "required": [
            "agentType"
          ],
          "properties": {
            "agentType": {
              "$ref": "#/$defs/Administrative_API_CloudEnterpriseAgentType"
            }
          }
        },
        {
          "$ref": "#/$defs/Administrative_API_SimpleAgent"
        }
      ]
    },
    "Administrative_API_BaseRole": {
      "type": "object",
      "properties": {
        "name": {
          "type": "string",
          "description": "Name of the role."
        },
        "roleId": {
          "type": "string",
          "description": "Unique ID representing the role."
        },
        "isBuiltin": {
          "type": "boolean",
          "description": "Flag indicating if the role is built-in (Account Admin, Organization Admin, Regular User)."
        }
      }
    },
    "Administrative_API_CloudEnterpriseAgentType": {
      "type": "string",
      "description": "Type of the agent.",
      "enum": [
        "cloud",
        "enterprise-cluster",
        "enterprise"
      ],
      "readOnly": true
    },
    "Administrative_API_ClusterMember": {
      "allOf": [
        {
          "$ref": "#/$defs/Administrative_API_AgentBase"
        },
        {
          "type": "object",
          "properties": {
            "memberId": {
              "type": "string",
              "description": "Unique ID of the cluster member",
              "readOnly": true
            },
            "name": {
              "type": "string",
              "description": "Name of the cluster member",
              "readOnly": true
            },
            "errorDetails": {
              "type": "array",
              "description": "If an enterprise agent or a cluster member presents at least one error, the errors will be shown as an array of entries in the errorDetails field (Enterprise Agents and Enterprise Cluster members only)",
              "items": {
                "$ref": "#/$defs/Administrative_API_ErrorDetail"
              },
              "readOnly": true
            },
            "lastSeen": {
              "type": "string",
              "description": "UTC last seen date (ISO date-time format).",
              "format": "date-time",
              "readOnly": true
            },
            "agentState": {
              "$ref": "#/$defs/Administrative_API_EnterpriseAgentState"
            },
            "targetForTests": {
              "type": "string",
              "format": "ipv4",
              "description": "Test target IP address."
            },
            "serialNumber": {
              "$ref": "#/$defs/Administrative_API_EnterpriseAgentSerialNumber"
            },
            "utilization": {
              "type": "integer",
              "description": "Shows overall utilization percentage (online Enterprise Agents and Enterprise Clusters only).",
              "readOnly": true
            }
          }
        }
      ]
    },
    "Administrative_API_ClusterMembers": {
      "type": "array",
      "description": "If 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.",
      "items": {
        "$ref": "#/$defs/Administrative_API_ClusterMember"
      },
      "readOnly": true
    },
    "Administrative_API_Coordinates": {
      "type": "object",
      "description": "Geographic coordinates for agent location.",
      "properties": {
        "latitude": {
          "type": "number",
          "format": "double",
          "description": "The latitude of the agent location in decimal degrees",
          "readOnly": true
        },
        "longitude": {
          "type": "number",
          "format": "double",
          "description": "The longitude of the agent location in decimal degrees",
          "readOnly": true
        }
      }
    },
    "Administrative_API_CreatedAccountGroup": {
      "allOf": [
        {
          "$ref": "#/$defs/Administrative_API_AccountGroupInfo"
        },
        {
          "type": "object",
          "properties": {
            "users": {
              "type": "array",
              "items": {
                "$ref": "#/$defs/Administrative_API_UserAccountGroup"
              }
            },
            "_links": {
              "$ref": "#/$defs/Administrative_API_SelfLinks"
            }
          }
        }
      ]
    },
    "Administrative_API_Enabled": {
      "type": "boolean",
      "description": "Test is enabled.",
      "default": true
    },
    "Administrative_API_EnterpriseAgent": {
      "allOf": [
        {
          "$ref": "#/$defs/Administrative_API_AgentResponse"
        },
        {
          "$ref": "#/$defs/Administrative_API_EnterpriseAgentData"
        }
      ]
    },
    "Administrative_API_EnterpriseAgentData": {
      "type": "object",
      "properties": {
        "testIds": {
          "$ref": "#/$defs/Administrative_API_TestIds"
        },
        "tests": {
          "type": "array",
          "description": "List of tests. See `/tests` for more information.",
          "items": {
            "$ref": "#/$defs/Administrative_API_SimpleTest"
          }
        },
        "clusterMembers": {
          "$ref": "#/$defs/Administrative_API_ClusterMembers"
        },
        "utilization": {
          "type": "integer",
          "description": "Shows overall utilization percentage (online Enterprise Agents and Enterprise Clusters only).",
          "readOnly": true
        },
        "accountGroups": {
          "type": "array",
          "description": "List of account groups. See /accounts-groups to pull a list of account IDs",
          "items": {
            "$ref": "#/$defs/Administrative_API_AccountGroup"
          }
        },
        "ipv6Policy": {
          "$ref": "#/$defs/Administrative_API_EnterpriseAgentIpv6Policy"
        },
        "errorDetails": {
          "type": "array",
          "description": "If an enterprise agent or a cluster member presents at least one error, the errors will be shown as an array of entries in the errorDetails field (Enterprise Agents and Enterprise Cluster members only)",
          "items": {
            "$ref": "#/$defs/Administrative_API_ErrorDetail"
          },
          "readOnly": true
        },
        "hostname": {
          "type": "string",
          "description": "Fully qualified domain name of the agent (Enterprise Agents only)",
          "readOnly": true
        },
        "lastSeen": {
          "type": "string",
          "description": "UTC last seen date (ISO date-time format).",
          "format": "date-time",
          "readOnly": true
        },
        "agentState": {
          "$ref": "#/$defs/Administrative_API_EnterpriseAgentState"
        },
        "keepBrowserCache": {
          "type": "boolean",
          "description": "Flag indicating if the agent retains cache."
        },
        "createdDate": {
          "type": "string",
          "description": "UTC Agent creation date (ISO date-time format).",
          "format": "date-time",
          "readOnly": true
        },
        "targetForTests": {
          "type": "string",
          "format": "ipv4",
          "description": "Test target IP address."
        },
        "serialNumber": {
          "$ref": "#/$defs/Administrative_API_EnterpriseAgentSerialNumber"
        },
        "localResolutionPrefixes": {
          "type": "array",
          "description": "To perform rDNS lookups for public IP ranges, this field represents the public IP ranges. The range must be in CIDR notation; for example, 10.1.1.0/24. Maximum of 5 prefixes allowed (Enterprise Agents and Enterprise Agent clusters only).",
          "items": {
            "type": "string"
          }
        },
        "interfaceIpMapping": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/Administrative_API_InterfaceIpMapping"
          },
          "readOnly": true
        }
      }
    },
    "Administrative_API_EnterpriseAgentIpv6Policy": {
      "type": "string",
      "description": "IP version policy, (Enterprise Agents and Enterprise Clusters only)",
      "enum": [
        "force-ipv4",
        "prefer-ipv6",
        "force-ipv6"
      ]
    },
    "Administrative_API_EnterpriseAgentSerialNumber": {
      "type": "string",
      "description": "Serial number of an enterprise agent or cluster member device. This field is not available for Cloud Agents.",
      "readOnly": true
    },
    "Administrative_API_EnterpriseAgentState": {
      "type": "string",
      "description": "State of the agent.",
      "enum": [
        "online",
        "offline",
        "disabled"
      ],
      "readOnly": true
    },
    "Administrative_API_ErrorDetail": {
      "type": "object",
      "properties": {
        "code": {
          "$ref": "#/$defs/Administrative_API_ErrorDetailCode"
        },
        "description": {
          "type": "string",
          "description": "Description for the agent error.",
          "readOnly": true
        }
      }
    },
    "Administrative_API_ErrorDetailCode": {
      "type": "string",
      "description": "Code for the agent error.",
      "enum": [
        "agent-version-outdated",
        "browserbot-version-outdated",
        "appliance-version-outdated",
        "clock-offset",
        "os-end-of-installation-support",
        "os-end-of-support",
        "os-end-of-life",
        "nat-traversal-error"
      ],
      "readOnly": true
    },
    "Administrative_API_InterfaceIpMapping": {
      "type": "object",
      "properties": {
        "interfaceName": {
          "type": "string",
          "description": "Name of the mapping",
          "readOnly": true
        },
        "ipAddresses": {
          "type": "array",
          "description": "Array of ipAddress entries",
          "items": {
            "type": "string"
          },
          "readOnly": true
        }
      }
    },
    "Administrative_API_Link": {
      "type": "object",
      "description": "A hyperlink from the containing resource to a URI.",
      "required": [
        "href"
      ],
      "properties": {
        "href": {
          "type": "string",
          "description": "Its value is either a URI [RFC3986] or a URI template [RFC6570]."
        },
        "templated": {
          "type": "boolean",
          "description": "Should be true when the link object's \"href\" property is a URI template."
        },
        "type": {
          "type": "string",
          "description": "Used as a hint to indicate the media type expected when dereferencing the target resource."
        },
        "deprecation": {
          "type": "string",
          "description": "Its presence indicates that the link is to be deprecated at a future date. Its value is a URL that should provide further information about the deprecation."
        },
        "name": {
          "type": "string",
          "description": "Its value may be used as a secondary key for selecting link objects that share the same relation type."
        },
        "profile": {
          "type": "string",
          "description": "A URI that hints about the profile of the target resource."
        },
        "title": {
          "type": "string",
          "description": "Intended for labelling the link with a human-readable identifier"
        },
        "hreflang": {
          "type": "string",
          "description": "Indicates the language of the target resource"
        }
      }
    },
    "Administrative_API_NetworkProviderInfo": {
      "type": "object",
      "description": "Information about the network provider that owns the agent's public IP prefix.",
      "readOnly": true,
      "properties": {
        "asn": {
          "type": "integer",
          "format": "int64",
          "description": "Autonomous System Number (ASN) announcing the agent's public IP prefix.",
          "readOnly": true
        },
        "name": {
          "type": "string",
          "description": "Name of the network provider organization.",
          "readOnly": true
        },
        "type": {
          "$ref": "#/$defs/Administrative_API_NetworkProviderType"
        }
      }
    },
    "Administrative_API_NetworkProviderType": {
      "type": "string",
      "description": "Classification of the agent's network provider.",
      "enum": [
        "unknown",
        "isp",
        "cdn",
        "stub",
        "cloud-provider",
        "carrier"
      ],
      "readOnly": true
    },
    "Administrative_API_Role": {
      "type": "object",
      "allOf": [
        {
          "$ref": "#/$defs/Administrative_API_BaseRole"
        },
        {
          "properties": {
            "hasManagementPermissions": {
              "type": "boolean",
              "description": "Flag indicating whether the user has management permissions."
            }
          }
        }
      ]
    },
    "Administrative_API_SelfLinks": {
      "type": "object",
      "description": "A links object containing the self link.",
      "readOnly": true,
      "properties": {
        "self": {
          "$ref": "#/$defs/Administrative_API_Link"
        }
      }
    },
    "Administrative_API_SimpleAgent": {
      "type": "object",
      "allOf": [
        {
          "$ref": "#/$defs/Administrative_API_AgentBase"
        },
        {
          "type": "object",
          "properties": {
            "agentId": {
              "type": "string",
              "description": "Unique ID of the agent.",
              "readOnly": true
            },
            "agentName": {
              "type": "string",
              "description": "Name of the agent."
            },
            "location": {
              "type": "string",
              "description": "Location of the agent.",
              "readOnly": true
            },
            "countryId": {
              "type": "string",
              "description": "2-digit ISO country code",
              "readOnly": true
            },
            "coordinates": {
              "$ref": "#/$defs/Administrative_API_Coordinates"
            },
            "networkProviderInfo": {
              "allOf": [
                {
                  "$ref": "#/$defs/Administrative_API_NetworkProviderInfo"
                }
              ],
              "readOnly": true
            },
            "enabled": {
              "type": "boolean",
              "description": "Flag indicating if the agent is enabled."
            },
            "verifySslCertificates": {
              "type": "boolean",
              "description": "Flag indicating if has normal SSL operations or  if instead it's set to ignore SSL errors on browserbot-based tests.",
              "readOnly": true
            },
            "prefix": {
              "type": "string",
              "description": "Prefix containing agents public IP address.",
              "readOnly": true
            }
          }
        }
      ]
    },
    "Administrative_API_SimpleTest": {
      "description": "Each test includes additional fields depending on its `type`. Refer `/tests/{type}` endpoint to know the set of fields returned by a given `type`.",
      "additionalProperties": true,
      "type": "object",
      "properties": {
        "interval": {
          "$ref": "#/$defs/Administrative_API_TestInterval"
        },
        "alertsEnabled": {
          "type": "boolean",
          "description": "Indicates if alerts are enabled."
        },
        "enabled": {
          "$ref": "#/$defs/Administrative_API_Enabled"
        },
        "createdBy": {
          "$ref": "#/$defs/Administrative_API_TestCreatedBy"
        },
        "createdDate": {
          "$ref": "#/$defs/Administrative_API_TestCreatedDate"
        },
        "description": {
          "type": "string",
          "description": "A description of the test."
        },
        "liveShare": {
          "type": "boolean",
          "description": "Indicates if the test is shared with the account group.",
          "readOnly": true
        },
        "modifiedBy": {
          "type": "string",
          "description": "User that modified the test.",
          "readOnly": true
        },
        "modifiedDate": {
          "type": "string",
          "format": "date-time",
          "description": "UTC last modification date (ISO date-time format).",
          "readOnly": true
        },
        "savedEvent": {
          "type": "boolean",
          "description": "Indicates if the test is a saved event.\n\n**Note**: **Saved Events** are now called **Private Snapshots** in the user interface. This change does not affect API.\n",
          "readOnly": true
        },
        "testId": {
          "type": "string",
          "description": "Each test is assigned an unique ID; this is used to access test information and results from other endpoints.",
          "readOnly": true
        },
        "testName": {
          "type": "string",
          "description": "The name of the test. Test name must be unique."
        },
        "type": {
          "$ref": "#/$defs/Administrative_API_TestType"
        },
        "_links": {
          "$ref": "#/$defs/Administrative_API_TestLinks"
        }
      }
    },
    "Administrative_API_TestCreatedBy": {
      "type": "string",
      "description": "User that created the test.",
      "readOnly": true
    },
    "Administrative_API_TestCreatedDate": {
      "type": "string",
      "format": "date-time",
      "description": "UTC created date (ISO date-time format).",
      "readOnly": true
    },
    "Administrative_API_TestIds": {
      "type": "array",
      "description": "List of test IDs assigned to the agent.",
      "items": {
        "type": "integer",
        "format": "int64"
      },
      "readOnly": true
    },
    "Administrative_API_TestInterval": {
      "type": "integer",
      "enum": [
        60,
        120,
        300,
        600,
        900,
        1800,
        3600
      ],
      "description": "Interval between test runs in seconds.",
      "default": 60
    },
    "Administrative_API_TestLinks": {
      "type": "object",
      "description": "A list of links that can be accessed to get more information",
      "properties": {
        "self": {
          "$ref": "#/$defs/Administrative_API_TestSelfLink"
        },
        "testResults": {
          "$ref": "#/$defs/Administrative_API_TestResults"
        }
      },
      "readOnly": true
    },
    "Administrative_API_TestResults": {
      "type": "array",
      "description": "Reference to the test results.",
      "items": {
        "$ref": "#/$defs/Administrative_API_Link"
      }
    },
    "Administrative_API_TestSelfLink": {
      "allOf": [
        {
          "$ref": "#/$defs/Administrative_API_Link"
        },
        {
          "description": "Reference to the test."
        }
      ]
    },
    "Administrative_API_TestType": {
      "type": "string",
      "enum": [
        "api",
        "agent-to-agent",
        "agent-to-server",
        "bgp",
        "http-server",
        "page-load",
        "web-transactions",
        "ftp-server",
        "dns-trace",
        "dns-server",
        "dnssec",
        "sip-server",
        "voice"
      ],
      "description": "This is a read only value, as test type is implicit in the test creation url.",
      "readOnly": true
    },
    "Administrative_API_UserAccountGroup": {
      "type": "object",
      "properties": {
        "name": {
          "type": "string",
          "description": "User's display name."
        },
        "email": {
          "type": "string",
          "description": "User's email address.",
          "format": "email"
        },
        "uid": {
          "type": "string",
          "description": "Unique ID representing the user."
        },
        "lastLogin": {
          "type": "string",
          "description": "User's UTC last login date (ISO date-time format).",
          "format": "date-time"
        },
        "dateRegistered": {
          "type": "string",
          "description": "User's UTC registration date (ISO date-time format).",
          "format": "date-time"
        },
        "roles": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/Administrative_API_Role"
          }
        }
      }
    }
  }
}