Administrative Endpoints

Account Groups

List all Account Groups

v6

v7

GET /v6/account-groups

GET /v7/account-groups

Response Body

{

  "accountGroups": [

    {

      "accountGroupName": "Demo - Example User",

      "aid": 59,

      "organizationName": "ThousandEyes Demo",

      "current": 0,

      "default": 0

    }

  ]

}

 

 

 

{

  "accountGroups": [

    {

      "accountGroupName": "Demo - Example User",

      "aid": "59",

      "isCurrentAccountGroup": false,

      "isDefaultAccountGroup": false,

      "organizationName": "ThousandEyes Demo"

    }

  ]

}

Comments:

1.  The `current` field has been renamed to `isCurrentAccountGroup`, and its value has changed from integer to boolean.

2.  The `default` field has been renamed to `isDefaultAccountGroup`, and its value has changed from integer to boolean.

3.  The type for the `aid` field has changed from integer to string.

 

Get an Account Group

v6

v7

GET /v6/account-groups/{id}

GET /v7/account-groups/{id}

Response Body

{

  "accountGroups": [

    {

      "accountGroupName": "Demo - Example User",

      "aid": 59,

      "organizationName": "ThousandEyes Demo",

      "current": 0,

      "default": 0,

      "users": [

        {

          "name": "Example User",

          "email": "exampleuser@thousandeyes.com",

          "uid": 160,

          "lastLogin": "2024-02-07 15:20:21",

          "dateRegistered": "2012-02-02 15:00:52",

          "roles": [

            {

              "roleName": "SSO - Organization Admin",

              "roleId": 244988,

              "hasManagementPermissions": 1,

              "builtin": 0

            }

          ]

        }

      "agents": [

        {

          "agentId": 1284371,

          "agentName": "SilverLad Net",

          "agentType": "Enterprise",

          "countryId": "US",

          "enabled": 1,

          "keepBrowserCache": 0,

          "verifySslCertificates": 1,

          "ipAddresses": [

            "198.51.100.6",

            "fd76:c524:6dab::6"

          ],

          "interfaceIpMapping": [

            {

              "interfaceName": "host",

              "ipAddresses": [

                "fd76:c524:6dab::6",

                "198.51.100.6"

              ]

            }

          ],

          "lastSeen": "2024-04-11 12:46:38",

          "location": "Austin Area",

          "network": "Road Runner HoldCo LLC (AS 11427)",

          "prefix": "70.122.0.0/15",

          "publicIpAddresses": [

            "70.123.41.63",

            "fd76:c524:6dab::6"

          ],

          "targetForTests": "70.123.41.63",

          "agentState": "Online",

          "utilization": 0,

          "ipv6Policy": "FORCE_IPV4",

          "hostname": "m2C3F0BB8A57B-1000000000",

          "createdDate": "2024-01-18 19:25:07",

          "errorDetails": []

        }

      ]

 

 

 

{

  "accountGroupName": "Demo - Example User",

  "aid": "59",

  "isCurrentAccountGroup": false,

  "isDefaultAccountGroup": false,

  "organizationName": "ThousandEyes Demo"

}

Comments:

1.  The response is no longer structured as a list of objects at the top-most level. Instead, a single account group object is returned.

2.  The `current` field has been renamed to `isCurrentAccountGroup`, and its value has changed from integer to boolean.

3.  The `default` field has been renamed to `isDefaultAccountGroup`, and its value has changed from integer to boolean.

4.  The type for the `aid` field has changed from integer to string.

5.  Users are not included in the response by default.

o   To include users, must include `expand` parameter with a value of `user`.

o   For details on how the data in the `users` field has changed, see the “List all Users” section of this guide.

6.  Agents are not included in the response by default.

o   To include agents, must include the `expand` parameter with a value of `agent`

o   For details on how the data in the `agents` field has changed, see the “List Cloud and Enterprise Agent” section of this guide.

 

 

 

Create an Account Group

v6

v7

POST /v6/account-groups/new

POST /v7/account-groups

Request Body

{

  "accountGroupName": "my testing account group",

  "agents": [{"agentId": 1234}]

}

{

  "accountGroupName": "my testing account group",

  "agents": [ "105", "719" ]

}

Response Body

See “Get an Account Group” above

See “Get an Account Group” above

Comments:

1.  The URL has changed.

2.  Note the format of the `agents` field has changed.

 

Update an Account Group

v6

v7

POST /v6/account-groups/{id}/update

PUT /v6/account-groups/{id}

Request Body

{

  "accountGroupName": "my testing account group",

  "agents": [{"agentId": 1234}]

}

{

  "accountGroupName": "my testing account group",

  "agents": [ "105", "719" ]

}

Response Body

See “Get an Account Group” above

See “Get an Account Group” above

Comments:

1.  The request method has changed from POST to PUT.

2.  The URL has changed.

3.  Note the format of the `agents` field has changed.

 

Delete an Account Group

v6

v7

POST /v6/account-groups/{id}/delete

DELETE /v7/account-groups/{id}

Comments:

1.  The request method has changed from POST to DELETE.

2.  The URL has changed.

 

 

Users

 

List all Users

v6

v7

GET /v6/users

GET /v7/users

Response Body

{

  "users": [

    {

      "name": "Example User",

      "email": "exampleuser@thousandeyes.com",

      "uid": 160,

      "lastLogin": "2024-02-07 15:20:21",

      "dateRegistered": "2012-02-02 15:00:52",

      "loginAccountGroup": {

        "accountGroupName": "Demo - Example User",

        "aid": 59

      }

    },

{

  "users": [

    {

      "name": "Example User",

      "email": "exampleuser@thousandeyes.com",

      "uid": "160",

      "dateRegistered": "2012-02-02T15:00:52Z",

      "loginAccountGroup": {

        "accountGroupName": "Demo - Example User",

        "aid": "59"

      },

      "lastLogin": "2024-02-07T15:20:21Z"

    },

Comments:

1.  The timestamp format for the `lastLogin` and `dateRegistered` fields has changed.

2.  The type for the `aid` and `uid` fields has changed from integer to string.

 

Get a User

v6

v7

GET /v6/users/{id}

GET /v7/users/{id}

Response Body

{

  "users": [

    {

      "name": "Example User",

      "email": "exampleuser@thousandeyes.com",

      "uid": 160,

      "lastLogin": "2024-02-07 15:20:21",

      "dateRegistered": "2012-02-02 15:00:52",

      "loginAccountGroup": {

        "accountGroupName": "Demo - Example User",

        "aid": 59

      },

      "allAccountGroupRoles": [

        {

          "roleName": "SSO - Organization Admin",

          "roleId": 244988,

          "hasManagementPermissions": 1,

          "builtin": 0

        }

      ]

    }

  ]

}

{

  "name": "Example User",

  "email": "exampleuser@thousandeyes.com",

  "uid": "160",

  "dateRegistered": "2012-02-02T15:00:52Z",

  "loginAccountGroup": {

    "accountGroupName": "Demo - Example User",

    "aid": "59"

  },

  "lastLogin": "2024-02-07T15:20:21Z",

  "allAccountGroupRoles": [

    {

      "name": "SSO - Organization Admin",

      "roleId": "244988",

      "hasManagementPermissions": true,

      "isBuiltin": false

    }

  ]

}

Comments:

1.  The response is no longer structured as a list of objects at the top-most level. Instead, a single account group object is returned.

2.  The `builtin` field has been renamed to `isBuiltIn`.

3.  The timestamp format for the `lastLogin` and `dateRegistered` fields has changed.

4.  The type for the `aid`, `uid`, and `roleId` fields has changed from integer to string.

5.  The type for `hasManagementPermissions` and `isBuiltIn` has changed from integer to boolean.

6.  The `roleName` field has been renamed to `name`.

 

 

Create a User

v6

v7

POST /v6/users/new

POST /v7/users

Request Body

    "name":"User X",

    "email":"userx@thousandeyes.com",

    "loginAccountGroup": { "aid":691 },

    "accountGroupRoles":[ 

      { 

        "accountGroup": { "aid":315 },

        "roles":[ 

          { "roleId":57 }

        ]

      }

   ],

   "allAccountGroupRoles": [

     { "roleId": 1140 }

   ]

}

{

    "name": "User X",

    "email": "userx@thousandeyes.com",

    "loginAccountGroupId": "691",

    "accountGroupRoles": [

        {

            "accountGroupId": "315",

            "roleIds": [ "57", "1140" ]

        }

    ],

    "allAccountGroupRoleIds": [ "57", "1140" ]

}

Response Body

See “Get a User” above

See “Get a User” above

Comments:

1.  The URL has changed.

2.  The `loginAccountGroup` field has been renamed to `loginAccountGroupId`, and its format has changed.

3.  The format of the `accountGroupRoles` field has changed:

o   Inside this field, the `accountGroup` field has been renamed `accountGroupId`, and its format has changed.

o   Inside this field, the `roles` field has been renamed `roleIds`, and its format has changed.

4.  The `allAccountGroupRoles` field has been renamed to `allAccountGroupRoleIds`, and its format has changed.

 

 

Update a User

v6

v7

POST /v6/users/{id}/update

PUT /v7/users/{id}

Request Body

    "name":"User X",

    "email":"userx@thousandeyes.com",

    "loginAccountGroup": { "aid":691 },

    "accountGroupRoles":[ 

      { 

        "accountGroup": { "aid":315 },

        "roles":[ 

          { "roleId":57 }

        ]

      }

   ],

   "allAccountGroupRoles": [

     { "roleId": 1140 }

   ]

  }

{

    "name": "User X",

    "email": "userx@thousandeyes.com",

    "loginAccountGroupId": "691",

    "accountGroupRoles": [

        {

            "accountGroupId": "315",

            "roleIds": [ "57", "1140" ]

        }

    ],

    "allAccountGroupRoleIds": [ "57", "1140" ]

}

Response Body

See “Get a User” above

See “Get a User” above

Comments:

1.  The request method has changed from POST to PUT.

2.  The URL has changed.

3.  The `loginAccountGroup` field has been renamed to `loginAccountGroupId`, and its format has changed.

4.  The format of the `accountGroupRoles` field has changed:

o   Inside this field, the `accountGroup` field has been renamed `accountGroupId`, and its format has changed.

o   Inside this field, the `roles` field has been renamed `roleIds`, and its format has changed.

5.  The `allAccountGroupRoles` field has been renamed to `allAccountGroupRoleIds`, and its format has changed.

 

 

Delete a User

v6

v7

POST /v6/users/{id}/delete

DELETE /v7/users/{id}

Comments:

1.  The request method has changed from POST to DELETE.

2.  The URL has changed.

 

Roles

 

List all Roles

v6

v7

GET /v6/roles

GET /v7/roles

Response Body

{

    "roles": [

        {

            "builtin": 1,

            "hasManagementPermissions": 1,

            "roleId": 156,

            "roleName": "Account Admin"

        },

        ...

    ]

}

{

    "roles": [

        {

            "name": "Organization Admin",

            "roleId": "35",

            "isBuiltin": true,

            "hasManagementPermissions": true

        },

        ...

    ]

}

Comments:

1.  The `builtin` field has been renamed to `isBuiltIn`.

2.  The `roleName` field has been renamed to `name`.

3.  The type for the `builtin` and `hasManagementPermissions` fields has changed from integer to boolean.

4.  The type for the `roleId` has changed from integer to string.

 

Get a Role

v6

v7

GET /v6/roles/{id}

GET /v7/roles/{id}

Response Body

{

    "roles": [

        {

            "builtin": 0,

            "roleId": 280871,

            "roleName": "API User",

            "permissions": [

                {

                    "isManagementPermission": 0,

                    "label": "View reports",

                    "permissionId": 8

                },

                {

                    "isManagementPermission": 0,

                    "label": "View snapshots",

                    "permissionId": 11

                }

            ]

        }

    ]

}

 

 

{

    "name": "Organization Admin",

    "roleId": "35",

    "isBuiltin": true,

    "permissions": [

        {

            "label": "View reports",

            "permissionId": "8",

            "isManagementPermission": true,

            "permission": "REPORTS_READ"

        },

        {

            "label": "View snapshots",

            "permissionId": "11",

            "isManagementPermission": false,

            "permission": "REPORT_SNAPSHOTS_READ"

        }

    ]

}

Comments:

1.  The response is no longer structured as a list of objects at the top-most level. Instead, a single account group object is returned.

2.  The `builtin` field has been renamed to `isBuiltIn`.

3.  The `roleName` field has been renamed to `name`.

4.  The type for the `builtin` and `isManagementPermission` fields has changed from integer to boolean.

5.  The type for the `roleId` and `permissionId` has changed from integer to string.

 

Create a Role

v6

v7

POST /v6/roles/new

POST /v7/roles

Request Body

{

    "roleName": "My new role",

    "permissions": [

      { "permissionId": 1 },

      { "permissionId": 2 }

    ]

  }

{

    "name": "Organization Admin",

    "permissions": [ "56", "315" ]

}

Response Body

See “Get a Role” above

See “Get a Role” above

Comments:

1.  The URL has changed.

2.  The `roleName` field has been renamed to `name`.

3.  Note the format of the `permissions` field has changed.

 

 

 

Update a Role

v6

v7

POST /v6/roles/{roleId}/update

PUT /v7/roles/{id}

Request Body

{

  "roleName": "New name for my role",

  "permissions": [

    { "permissionId": 1 },

    { "permissionId": 3 }

  ]

}

{

    "name": "Organization Admin",

    "permissions": [ "56", "315" ]

}

Response Body

See “Get a Role” above

See “Get a Role” above

Comments:

1.  The request method has changed from POST to PUT.

2.  The URL has changed.

3.  The `roleName` field has been renamed to `name`.

4.  Note the format of the `permissions` field has changed.

 

Delete a Role

v6

v7

 

DELETE /v7/roles/{id}

Comments:

1.  APIv6 did not support deleting Roles.

 

 

 

Usage Quotas

Get Usage Quotas

v6

v7

GET /v6/quotas

GET /v7/quotas

Response Body

{

    "quotas": [

        {

            "organizationQuota": {

                "value": 22500,

                "orgId": 10

            },

            "accountGroupQuotas": [

                {

                    "value": 12000,

                    "aid": 1234

                },

                {

                    "value": 10000,

                    "aid": 5678

                }

            ]

        }

    ]

}

{

    "quotas": [

        {

            "organizationQuota": {

                "value": 22500,

                "orgId": "10"

            },

            "accountGroupQuotas": [

                {

                    "value": 12000,

                    "aid": "1234"

                },

                {

                    "value": 10000,

                    "aid": "5678"

                }

            ]

        }

    ]

}

Comments:

1.  The value type for `orgId` has changed from integer to string.

2.  The value type for `aid` has changed from integer to string.

 

Update Usage Quotas (Organization-level)

Note: In APIv7, there are now different endpoints for creating/updating quotas at the organization-level and at the account group-level. For updating account group-level quotas, see Update Usage Quotas (Account Group-level) below.

v6

v7

POST /v6/quotas

POST /v7/quotas/assign

Request Body

[

        {

            "organizationQuota": {

                "value": 12000,

                "orgId": 10

            }

        },

        {

            "organizationQuota": {

                "value": 10000,

                "orgId": 20

            }

        }

]

{

    "organizations": [

        {

            "orgId": "10",

            "value": 12000

        },

        {

            "orgId": "20",

            "value": 10000

        }

    ]

}

Response Body

{

    "quotas": [

        {

            "organizationQuota": {

                "value": 12000,

                "orgId": 10

            },

            "accountGroupQuotas": [

                {

                    "value": 226000,

                    "aid": 100

                },

                {

                    "value": 268000,

                    "aid": 101

                },

                {

                    "value": 151000,

                    "aid": 102

                }

            ]

        }

    ]

}

 

{

    "organizations": [

        {

            "orgId": "10",

            "value": 12000

        },

        {

            "orgId": "20",

            "value": 10000

        }

    ]

}

Comments:

1.  The URL has changed.

2.  In the request, the top-most level data structure no longer an array, it is now an object with a single key named `organizations`, and the value is an array of child objects.

3.  In the request, the child objects now directly contain two keys, `orgId` and `value`, instead of being nested in the value of another object with a key named `organizationQuota`.

4.  In the response, the top-most level key has changed from `quotas` to `organizations`. Also note that child objects in the value for this key are no longer nested within the `organizationQuota` key.

5.  The value type of `orgId` has changed from integer to string.

6.  The account group quotas are no longer returned in this endpoint.

 

Update Usage Quotas (Account Group-level)

Note: In APIv7, there are now different endpoints for creating/updating quotas at the organization-level and at the account group-level. For updating organization-level quotas, see Update Usage Quotas (Organization-level) above.

v6

v7

POST /v6/quotas

POST /v7/quotas/account-groups/assign

Request Body

[

        {

            "organizationQuota": {

                "value": 2500000000,

                "orgId": 1

            },

            "accountGroupQuotas": [

                {

                    "value": 12000,

                    "aid": 1234

                },

                {

                    "value": 5000,

                    "aid": 5678

                }

            ]

        }

]

{

    "organizations": [

        {

            "orgId": "1234",

            "accountGroups": [

                {

                    "value": 12000,

                    "aid": "1234"

                },

                {

                    "value": 5000,

                    "aid": "5678"

                }

            ]

        }

    ]

}

Response Body

{

    "quotas": [

        {

            "organizationQuota": {

                "value": 2500000000,

                "orgId": 1

            },

            "accountGroupQuotas": [

                {

                    "value": 12000,

                    "aid": 1234

                },

                {

                    "value": 5000,

                    "aid": 5678

                }

            ]

        }

    ]

}

{

    "organizations": [

        {

            "orgId": "1234",

            "accountGroups": [

                {

                    "value": 12000,

                    "aid": "1234"

                },

                {

                    "value": 5000,

                    "aid": "5678"

                }

            ]

        }

    ]

}

Comments:

1.  The URL has changed.

2.  In the request, the top-most level data structure no longer an array, it is now an object with a single key named `organizations`, and the value is an array of child objects.

3.  In the request, the child objects now directly contain two keys, `orgId` and `accountGroups`. The `organizationQuota` key has been removed, and organization-level quotas cannot be set with this endpoint.

4.  In the request, the `accountGroupQuotas` key and value are no longer a sibling of the `organizationQuota` key and value. Instead, the key has been renamed `accountGroups` and is now contained within the child object, i.e, a sibling of the `orgId` key. 

5.  In the response, the top-most level key has changed from `quotas` to `organizations`. The value for this key is still an array, but the structure of the objects within the array has changed: the objects now contain two keys, `orgId` and `accountGroups`.

6.  In the response, the organization quota is no longer returned.

7.  The value type of `orgId` has changed from integer to string.

8.  The value type of `aid ` has changed from integer to string.

 

 

Permissions

 

List all Permissions

v6

v7

GET /v6/permissions

GET /v7/permissions

Response Body

{

    "permissions": [

        {

            "permissionId": 1,

            "label": "Assign users emails to alerts",

            "isManagementPermission": 0

        },

        {

            "permissionId": 51,

            "label": "View billing",

            "isManagementPermission": 1

        },

        ...

    ]

}

 

 

{

    "permissions": [

        {

            "permissionId": "3",

            "label": "Edit user email addresses",

            "isManagementPermission": false,

            "permission": "EMAILS_UPDATE"

        },

        {

            "permissionId": "8",

            "label": "View dashboards",

            "isManagementPermission": false,

            "permission": "REPORTS_READ"

        },

        ...

    ]

}

Comments:

1.  The value type of `isManagementPermission` has changed from integer to boolean.

2.  The value type of `permissionId` has changed from integer to string.

 

Activity Log Events

 

List Activity Log Events

v6

v7

POST /v6/audit/user-events/search

GET /v7/audit-user-events

Response Body

{

    "auditEvents": [

        {

            "accountGroupName": "API Sandbox",

            "aid": 75,

            "date": "2017-05-02 13:53:31",

            "event": "Report created",

            "ipAddress": "192.88.158.246",

            "resources": [

                {

                    "type": "reportTitle",

                    "name": "My New Report"

                }

            ],

            "uid": 245,

            "user": "API Sandbox User (noreply@thousandeyes.com)"

        }

    ],

    "pages": {

        "next": "https://api.thousandeyes.com/v6/audit/user-events/search.json?offset=403504051",

        "current": 403527871

    }

}

 

 

{

    "startDate": "2022-07-17T22:00:54Z",

    "endDate": "2022-07-18T22:00:54Z",

    "auditEvents": [

        {

            "accountGroupName": "API Sandbox",

            "aid": "1234",

            "date": "2020-07-17T21:54:54Z",

            "event": "Report created.",

            "ipAddress": "192.88.158.246",

            "uid": "1234",

            "user": "API Sandbox User (noreply@thousandeyes.com)",

            "resources": [

                {

                    "name": "My New report",

                    "type": "reportTitle"

                },

                {

                    "name": "Other Report",

                    "type": "testName"

                }

            ]

        }

    ],

    "_links": {

        "next": {

            "href": "https://api.thousandeyes.com/v7/audit-user-events?useAllPermittedAids=true&cursor=b2Zmc2V0PTQwMzUwNDA1MQ==&startDate=2024-11-13T16:21:56Z&endDate=2024-11-14T04:21:56Z"

        },

        "self": {

            "href": "https://api.thousandeyes.com/v7/audit-user-events?useAllPermittedAids=true&window=12h"

        }

    }

}

Comments:

1.  The URL has changed.

2.  The type for the `aid` field has changed from integer to string.

3.  The type for the `uid` field has changed from integer to string.

4.  The timestamp format for the `date` field has changed.

5.  The `pages` key has been removed. Pagination is now available under the `_links` key.