[GitHub Bot] Generated python SDK

This commit is contained in:
API Team 2024-06-04 11:58:18 +00:00
parent 4025dc7126
commit 1730d2788f
1489 changed files with 66711 additions and 16605 deletions

View File

@ -0,0 +1,23 @@
# OpenAPI Generator Ignore
# Generated by openapi-generator https://github.com/openapitools/openapi-generator
# Use this file to prevent files from being overwritten by the generator.
# The patterns follow closely to .gitignore or .dockerignore.
# As an example, the C# client generator defines ApiClient.cs.
# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line:
#ApiClient.cs
# You can match any string of characters against a directory, file or extension with a single asterisk (*):
#foo/*/qux
# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux
# You can recursively match patterns against a directory, file or extension with a double asterisk (**):
#foo/**/qux
# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux
# You can also negate patterns with an exclamation (!).
# For example, you can ignore all files in a docs folder with the file extension .md:
#docs/*.md
# Then explicitly reverse the ignore rule for a single file:
#!docs/README.md

View File

@ -0,0 +1,115 @@
.openapi-generator-ignore
README.md
docs/AccountGroup.md
docs/AccountGroupDetail.md
docs/AccountGroupInfo.md
docs/AccountGroupRequest.md
docs/AccountGroupRole.md
docs/AccountGroups.md
docs/AccountGroupsApi.md
docs/Agent.md
docs/AgentBase.md
docs/AuditUserEvents.md
docs/BaseRole.md
docs/CloudEnterpriseAgentType.md
docs/ClusterMember.md
docs/CreatedAccountGroup.md
docs/CreatedUser.md
docs/EnterpriseAgent.md
docs/EnterpriseAgentData.md
docs/EnterpriseAgentIpv6Policy.md
docs/EnterpriseAgentState.md
docs/Error.md
docs/ErrorDetail.md
docs/ErrorDetailCode.md
docs/Expand.md
docs/ExtendedUser.md
docs/InterfaceIpMapping.md
docs/Link.md
docs/PaginationLinks.md
docs/Permission.md
docs/Permissions.md
docs/PermissionsApi.md
docs/Resource.md
docs/Role.md
docs/RoleDetail.md
docs/RoleRequestBody.md
docs/Roles.md
docs/RolesApi.md
docs/SelfLinks.md
docs/SimpleAgent.md
docs/UnauthorizedError.md
docs/User.md
docs/UserAccountGroup.md
docs/UserAccountGroupRole.md
docs/UserDetail.md
docs/UserEvent.md
docs/UserEventsApi.md
docs/UserRequest.md
docs/Users.md
docs/UsersApi.md
docs/ValidationError.md
docs/ValidationErrorItem.md
pyproject.toml
setup.cfg
src/thousandeyes_sdk/admin/__init__.py
src/thousandeyes_sdk/admin/api/__init__.py
src/thousandeyes_sdk/admin/api/account_groups_api.py
src/thousandeyes_sdk/admin/api/permissions_api.py
src/thousandeyes_sdk/admin/api/roles_api.py
src/thousandeyes_sdk/admin/api/user_events_api.py
src/thousandeyes_sdk/admin/api/users_api.py
src/thousandeyes_sdk/admin/models/__init__.py
src/thousandeyes_sdk/admin/models/account_group.py
src/thousandeyes_sdk/admin/models/account_group_detail.py
src/thousandeyes_sdk/admin/models/account_group_info.py
src/thousandeyes_sdk/admin/models/account_group_request.py
src/thousandeyes_sdk/admin/models/account_group_role.py
src/thousandeyes_sdk/admin/models/account_groups.py
src/thousandeyes_sdk/admin/models/agent.py
src/thousandeyes_sdk/admin/models/agent_base.py
src/thousandeyes_sdk/admin/models/audit_user_events.py
src/thousandeyes_sdk/admin/models/base_role.py
src/thousandeyes_sdk/admin/models/cloud_enterprise_agent_type.py
src/thousandeyes_sdk/admin/models/cluster_member.py
src/thousandeyes_sdk/admin/models/created_account_group.py
src/thousandeyes_sdk/admin/models/created_user.py
src/thousandeyes_sdk/admin/models/enterprise_agent.py
src/thousandeyes_sdk/admin/models/enterprise_agent_data.py
src/thousandeyes_sdk/admin/models/enterprise_agent_ipv6_policy.py
src/thousandeyes_sdk/admin/models/enterprise_agent_state.py
src/thousandeyes_sdk/admin/models/error.py
src/thousandeyes_sdk/admin/models/error_detail.py
src/thousandeyes_sdk/admin/models/error_detail_code.py
src/thousandeyes_sdk/admin/models/expand.py
src/thousandeyes_sdk/admin/models/extended_user.py
src/thousandeyes_sdk/admin/models/interface_ip_mapping.py
src/thousandeyes_sdk/admin/models/link.py
src/thousandeyes_sdk/admin/models/pagination_links.py
src/thousandeyes_sdk/admin/models/permission.py
src/thousandeyes_sdk/admin/models/permissions.py
src/thousandeyes_sdk/admin/models/resource.py
src/thousandeyes_sdk/admin/models/role.py
src/thousandeyes_sdk/admin/models/role_detail.py
src/thousandeyes_sdk/admin/models/role_request_body.py
src/thousandeyes_sdk/admin/models/roles.py
src/thousandeyes_sdk/admin/models/self_links.py
src/thousandeyes_sdk/admin/models/simple_agent.py
src/thousandeyes_sdk/admin/models/unauthorized_error.py
src/thousandeyes_sdk/admin/models/user.py
src/thousandeyes_sdk/admin/models/user_account_group.py
src/thousandeyes_sdk/admin/models/user_account_group_role.py
src/thousandeyes_sdk/admin/models/user_detail.py
src/thousandeyes_sdk/admin/models/user_event.py
src/thousandeyes_sdk/admin/models/user_request.py
src/thousandeyes_sdk/admin/models/users.py
src/thousandeyes_sdk/admin/models/validation_error.py
src/thousandeyes_sdk/admin/models/validation_error_item.py
src/thousandeyes_sdk/admin/py.typed
test/__init__.py
test/test_account_groups_api.py
test/test_permissions_api.py
test/test_roles_api.py
test/test_user_events_api.py
test/test_users_api.py
test/test_utils.py

View File

@ -0,0 +1 @@
7.6.0

View File

@ -0,0 +1,191 @@
# thousandeyes-sdk-administrative
## Overview
Manage users, accounts, and account groups in the ThousandEyes platform using the Administrative API.
This API provides the following endpoints that define the operations to manage your organization:
* `/account-groups`: Account groups are used to divide an organization into different sections. These endpoints can be used to create, retrieve, update and delete account groups.
* `/users`: Create, retrieve, update and delete users within an organization.
* `/roles`: Create, retrieve and update roles for the current user.
* `/permissions`: Retrieve all assignable permissions. Used in the context of modifying roles.
* `/audit-user-events`: Retrieve all activity log events.
For more information about the administrative models, see [Account Management](https://docs.thousandeyes.com/product-documentation/user-management).
This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:
- API version: 7.0.6
- Generator version: 7.6.0
- Build package: com.thousandeyes.api.codegen.ThousandeyesPythonGenerator
## Requirements.
Python 3.7+
## Installation & Usage
### pip install
If the python package is hosted on a repository, you can install directly using:
```sh
pip install -e git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git#egg=thousandeyes-sdk-administrative\&subdirectory=thousandeyes-sdk-administrative
```
(you may need to run `pip` with root permission: `sudo pip install -e git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git#egg=thousandeyes-sdk-administrative\&subdirectory=thousandeyes-sdk-administrative`)
Then import the package:
```python
import thousandeyes_sdk.admin
```
### Setuptools
Install via [Setuptools](http://pypi.python.org/pypi/setuptools).
```sh
python setup.py install --user
```
(or `sudo python setup.py install` to install the package for all users)
Then import the package:
```python
import thousandeyes_sdk.admin
```
### Tests
Execute `pytest` to run the tests.
## Getting Started
Please follow the [installation procedure](#installation--usage) and then run the following:
```python
import thousandeyes_sdk.core
import thousandeyes_sdk.admin
from thousandeyes_sdk.core.exceptions import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://api.thousandeyes.com
# See configuration.py for a list of all supported configuration parameters.
configuration = thousandeyes_sdk.core.Configuration(
host = "https://api.thousandeyes.com"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure Bearer authorization: BearerAuth
configuration = thousandeyes_sdk.core.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
# Enter a context with an instance of the API client
with thousandeyes_sdk.core.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = thousandeyes_sdk.admin.AccountGroupsApi(api_client)
account_group_request = thousandeyes_sdk.admin.AccountGroupRequest() # AccountGroupRequest |
expand = [thousandeyes_sdk.admin.Expand()] # List[Expand] | Optional parameter that specifies whether or not account group related resources should be expanded. By default, no expansion takes place if the query parameter is not passed. For example, to expand the `users` resource, pass the `?expand=user` query. (optional)
try:
# Create account group
api_response = api_instance.create_account_group(account_group_request, expand=expand)
print("The response of AccountGroupsApi->create_account_group:\n")
pprint(api_response)
except ApiException as e:
print("Exception when calling AccountGroupsApi->create_account_group: %s\n" % e)
```
## Documentation for API Endpoints
All URIs are relative to *https://api.thousandeyes.com*
Class | Method | HTTP request | Description
------------ | ------------- | ------------- | -------------
*AccountGroupsApi* | [**create_account_group**](docs/AccountGroupsApi.md#create_account_group) | **POST** /v7/account-groups | Create account group
*AccountGroupsApi* | [**delete_account_group**](docs/AccountGroupsApi.md#delete_account_group) | **DELETE** /v7/account-groups/{id} | Delete account group
*AccountGroupsApi* | [**get_account_group**](docs/AccountGroupsApi.md#get_account_group) | **GET** /v7/account-groups/{id} | Retrieve account group
*AccountGroupsApi* | [**get_account_groups**](docs/AccountGroupsApi.md#get_account_groups) | **GET** /v7/account-groups | List account groups
*AccountGroupsApi* | [**update_account_group**](docs/AccountGroupsApi.md#update_account_group) | **PUT** /v7/account-groups/{id} | Update account group
*PermissionsApi* | [**get_permissions**](docs/PermissionsApi.md#get_permissions) | **GET** /v7/permissions | List assignable permissions
*RolesApi* | [**create_role**](docs/RolesApi.md#create_role) | **POST** /v7/roles | Create role
*RolesApi* | [**delete_role**](docs/RolesApi.md#delete_role) | **DELETE** /v7/roles/{id} | Delete role
*RolesApi* | [**get_role**](docs/RolesApi.md#get_role) | **GET** /v7/roles/{id} | Retrieve role
*RolesApi* | [**get_roles**](docs/RolesApi.md#get_roles) | **GET** /v7/roles | List roles
*RolesApi* | [**update_role**](docs/RolesApi.md#update_role) | **PUT** /v7/roles/{id} | Update role
*UserEventsApi* | [**get_user_events**](docs/UserEventsApi.md#get_user_events) | **GET** /v7/audit-user-events | List activity log events
*UsersApi* | [**create_user**](docs/UsersApi.md#create_user) | **POST** /v7/users | Create user
*UsersApi* | [**delete_user**](docs/UsersApi.md#delete_user) | **DELETE** /v7/users/{id} | Delete user
*UsersApi* | [**get_user**](docs/UsersApi.md#get_user) | **GET** /v7/users/{id} | Retrieve user
*UsersApi* | [**get_users**](docs/UsersApi.md#get_users) | **GET** /v7/users | List users
*UsersApi* | [**update_user**](docs/UsersApi.md#update_user) | **PUT** /v7/users/{id} | Update user
## Documentation For Models
- [AccountGroup](docs/AccountGroup.md)
- [AccountGroupDetail](docs/AccountGroupDetail.md)
- [AccountGroupInfo](docs/AccountGroupInfo.md)
- [AccountGroupRequest](docs/AccountGroupRequest.md)
- [AccountGroupRole](docs/AccountGroupRole.md)
- [AccountGroups](docs/AccountGroups.md)
- [Agent](docs/Agent.md)
- [AgentBase](docs/AgentBase.md)
- [AuditUserEvents](docs/AuditUserEvents.md)
- [BaseRole](docs/BaseRole.md)
- [CloudEnterpriseAgentType](docs/CloudEnterpriseAgentType.md)
- [ClusterMember](docs/ClusterMember.md)
- [CreatedAccountGroup](docs/CreatedAccountGroup.md)
- [CreatedUser](docs/CreatedUser.md)
- [EnterpriseAgent](docs/EnterpriseAgent.md)
- [EnterpriseAgentData](docs/EnterpriseAgentData.md)
- [EnterpriseAgentIpv6Policy](docs/EnterpriseAgentIpv6Policy.md)
- [EnterpriseAgentState](docs/EnterpriseAgentState.md)
- [Error](docs/Error.md)
- [ErrorDetail](docs/ErrorDetail.md)
- [ErrorDetailCode](docs/ErrorDetailCode.md)
- [Expand](docs/Expand.md)
- [ExtendedUser](docs/ExtendedUser.md)
- [InterfaceIpMapping](docs/InterfaceIpMapping.md)
- [Link](docs/Link.md)
- [PaginationLinks](docs/PaginationLinks.md)
- [Permission](docs/Permission.md)
- [Permissions](docs/Permissions.md)
- [Resource](docs/Resource.md)
- [Role](docs/Role.md)
- [RoleDetail](docs/RoleDetail.md)
- [RoleRequestBody](docs/RoleRequestBody.md)
- [Roles](docs/Roles.md)
- [SelfLinks](docs/SelfLinks.md)
- [SimpleAgent](docs/SimpleAgent.md)
- [UnauthorizedError](docs/UnauthorizedError.md)
- [User](docs/User.md)
- [UserAccountGroup](docs/UserAccountGroup.md)
- [UserAccountGroupRole](docs/UserAccountGroupRole.md)
- [UserDetail](docs/UserDetail.md)
- [UserEvent](docs/UserEvent.md)
- [UserRequest](docs/UserRequest.md)
- [Users](docs/Users.md)
- [ValidationError](docs/ValidationError.md)
- [ValidationErrorItem](docs/ValidationErrorItem.md)
<a id="documentation-for-authorization"></a>
## Documentation For Authorization
Authentication schemes defined for the API:
<a id="BearerAuth"></a>
### BearerAuth
- **Type**: Bearer authentication
## Author

View File

@ -0,0 +1,30 @@
# AccountGroup
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**aid** | **str** | A unique identifier associated with your account group. You can retrieve your &#x60;AccountGroupId&#x60; from the &#x60;/account-groups&#x60; endpoint. | [optional]
**account_group_name** | **str** | Account group name | [optional]
## Example
```python
from thousandeyes_sdk.admin.models.account_group import AccountGroup
# TODO update the JSON string below
json = "{}"
# create an instance of AccountGroup from a JSON string
account_group_instance = AccountGroup.from_json(json)
# print the JSON string representation of the object
print(AccountGroup.to_json())
# convert the object into a dict
account_group_dict = account_group_instance.to_dict()
# create an instance of AccountGroup from a dict
account_group_from_dict = AccountGroup.from_dict(account_group_dict)
```
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@ -0,0 +1,36 @@
# AccountGroupDetail
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**aid** | **str** | A unique identifier associated with your account group. You can retrieve your &#x60;AccountGroupId&#x60; from the &#x60;/account-groups&#x60; endpoint. | [optional]
**account_group_name** | **str** | Account group name | [optional]
**is_current_account_group** | **bool** | Indicates whether the requested aid is the context of the current account. | [optional]
**is_default_account_group** | **bool** | Indicates whether the aid is the default one for the requesting user. | [optional]
**organization_name** | **str** | (Optional) Indicates whether the aid is the default one for the requesting user. | [optional]
**users** | [**List[UserAccountGroup]**](UserAccountGroup.md) | | [optional]
**links** | [**SelfLinks**](SelfLinks.md) | | [optional]
**agents** | [**List[EnterpriseAgent]**](EnterpriseAgent.md) | | [optional]
## Example
```python
from thousandeyes_sdk.admin.models.account_group_detail import AccountGroupDetail
# TODO update the JSON string below
json = "{}"
# create an instance of AccountGroupDetail from a JSON string
account_group_detail_instance = AccountGroupDetail.from_json(json)
# print the JSON string representation of the object
print(AccountGroupDetail.to_json())
# convert the object into a dict
account_group_detail_dict = account_group_detail_instance.to_dict()
# create an instance of AccountGroupDetail from a dict
account_group_detail_from_dict = AccountGroupDetail.from_dict(account_group_detail_dict)
```
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@ -0,0 +1,33 @@
# AccountGroupInfo
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**aid** | **str** | A unique identifier associated with your account group. You can retrieve your &#x60;AccountGroupId&#x60; from the &#x60;/account-groups&#x60; endpoint. | [optional]
**account_group_name** | **str** | Account group name | [optional]
**is_current_account_group** | **bool** | Indicates whether the requested aid is the context of the current account. | [optional]
**is_default_account_group** | **bool** | Indicates whether the aid is the default one for the requesting user. | [optional]
**organization_name** | **str** | (Optional) Indicates whether the aid is the default one for the requesting user. | [optional]
## Example
```python
from thousandeyes_sdk.admin.models.account_group_info import AccountGroupInfo
# TODO update the JSON string below
json = "{}"
# create an instance of AccountGroupInfo from a JSON string
account_group_info_instance = AccountGroupInfo.from_json(json)
# print the JSON string representation of the object
print(AccountGroupInfo.to_json())
# convert the object into a dict
account_group_info_dict = account_group_info_instance.to_dict()
# create an instance of AccountGroupInfo from a dict
account_group_info_from_dict = AccountGroupInfo.from_dict(account_group_info_dict)
```
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@ -0,0 +1,30 @@
# AccountGroupRequest
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**account_group_name** | **str** | The name of the account group |
**agents** | **List[str]** | To grant access to enterprise agents, specify the agent list. Note that this is not an additive list - the full list must be specified if changing access to agents. | [optional]
## Example
```python
from thousandeyes_sdk.admin.models.account_group_request import AccountGroupRequest
# TODO update the JSON string below
json = "{}"
# create an instance of AccountGroupRequest from a JSON string
account_group_request_instance = AccountGroupRequest.from_json(json)
# print the JSON string representation of the object
print(AccountGroupRequest.to_json())
# convert the object into a dict
account_group_request_dict = account_group_request_instance.to_dict()
# create an instance of AccountGroupRequest from a dict
account_group_request_from_dict = AccountGroupRequest.from_dict(account_group_request_dict)
```
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@ -0,0 +1,30 @@
# AccountGroupRole
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**account_group** | [**AccountGroup**](AccountGroup.md) | | [optional]
**roles** | [**List[Role]**](Role.md) | | [optional]
## Example
```python
from thousandeyes_sdk.admin.models.account_group_role import AccountGroupRole
# TODO update the JSON string below
json = "{}"
# create an instance of AccountGroupRole from a JSON string
account_group_role_instance = AccountGroupRole.from_json(json)
# print the JSON string representation of the object
print(AccountGroupRole.to_json())
# convert the object into a dict
account_group_role_dict = account_group_role_instance.to_dict()
# create an instance of AccountGroupRole from a dict
account_group_role_from_dict = AccountGroupRole.from_dict(account_group_role_dict)
```
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@ -0,0 +1,30 @@
# AccountGroups
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**account_groups** | [**List[AccountGroupInfo]**](AccountGroupInfo.md) | | [optional]
**links** | [**SelfLinks**](SelfLinks.md) | | [optional]
## Example
```python
from thousandeyes_sdk.admin.models.account_groups import AccountGroups
# TODO update the JSON string below
json = "{}"
# create an instance of AccountGroups from a JSON string
account_groups_instance = AccountGroups.from_json(json)
# print the JSON string representation of the object
print(AccountGroups.to_json())
# convert the object into a dict
account_groups_dict = account_groups_instance.to_dict()
# create an instance of AccountGroups from a dict
account_groups_from_dict = AccountGroups.from_dict(account_groups_dict)
```
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@ -0,0 +1,443 @@
# thousandeyes_sdk.admin.AccountGroupsApi
All URIs are relative to *https://api.thousandeyes.com*
Method | HTTP request | Description
------------- | ------------- | -------------
[**create_account_group**](AccountGroupsApi.md#create_account_group) | **POST** /v7/account-groups | Create account group
[**delete_account_group**](AccountGroupsApi.md#delete_account_group) | **DELETE** /v7/account-groups/{id} | Delete account group
[**get_account_group**](AccountGroupsApi.md#get_account_group) | **GET** /v7/account-groups/{id} | Retrieve account group
[**get_account_groups**](AccountGroupsApi.md#get_account_groups) | **GET** /v7/account-groups | List account groups
[**update_account_group**](AccountGroupsApi.md#update_account_group) | **PUT** /v7/account-groups/{id} | Update account group
# **create_account_group**
> CreatedAccountGroup create_account_group(account_group_request, expand=expand)
Create account group
Creates a new account group. This operation requires the `Edit all account groups` permission. **Note:** Any user assigned to `All Account Groups` is automatically assigned to the new account group.
### Example
* Bearer Authentication (BearerAuth):
```python
import thousandeyes_sdk.admin
from thousandeyes_sdk.admin.models.account_group_request import AccountGroupRequest
from thousandeyes_sdk.admin.models.created_account_group import CreatedAccountGroup
from thousandeyes_sdk.admin.models.expand import Expand
from thousandeyes_sdk.admin.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://api.thousandeyes.com
# See configuration.py for a list of all supported configuration parameters.
configuration = thousandeyes_sdk.core.Configuration(
host = "https://api.thousandeyes.com"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure Bearer authorization: BearerAuth
configuration = thousandeyes_sdk.core.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
# Enter a context with an instance of the API client
with thousandeyes_sdk.admin.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = thousandeyes_sdk.admin.AccountGroupsApi(api_client)
account_group_request = thousandeyes_sdk.admin.AccountGroupRequest() # AccountGroupRequest |
expand = [thousandeyes_sdk.admin.Expand()] # List[Expand] | Optional parameter that specifies whether or not account group related resources should be expanded. By default, no expansion takes place if the query parameter is not passed. For example, to expand the `users` resource, pass the `?expand=user` query. (optional)
try:
# Create account group
api_response = api_instance.create_account_group(account_group_request, expand=expand)
print("The response of AccountGroupsApi->create_account_group:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling AccountGroupsApi->create_account_group: %s\n" % e)
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**account_group_request** | [**AccountGroupRequest**](AccountGroupRequest.md)| |
**expand** | [**List[Expand]**](Expand.md)| Optional parameter that specifies whether or not account group related resources should be expanded. By default, no expansion takes place if the query parameter is not passed. For example, to expand the &#x60;users&#x60; resource, pass the &#x60;?expand&#x3D;user&#x60; query. | [optional]
### Return type
[**CreatedAccountGroup**](CreatedAccountGroup.md)
### Authorization
[BearerAuth](../README.md#BearerAuth)
### HTTP request headers
- **Content-Type**: application/json
- **Accept**: application/hal+json, application/json, application/problem+json
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
**201** | Created | * Location - <br> |
**400** | Bad Request | - |
**401** | Unauthorized | - |
**403** | Insufficient permissions to query endpoint | - |
**404** | Not found | - |
**429** | Exhausted rate limit for the organization | - |
**500** | Internal server error | - |
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **delete_account_group**
> delete_account_group(id)
Delete account group
Deletes an account group using its ID. This operation requires the following permissions: * Assign management permissions * Delete account * Edit all account groups
### Example
* Bearer Authentication (BearerAuth):
```python
import thousandeyes_sdk.admin
from thousandeyes_sdk.admin.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://api.thousandeyes.com
# See configuration.py for a list of all supported configuration parameters.
configuration = thousandeyes_sdk.core.Configuration(
host = "https://api.thousandeyes.com"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure Bearer authorization: BearerAuth
configuration = thousandeyes_sdk.core.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
# Enter a context with an instance of the API client
with thousandeyes_sdk.admin.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = thousandeyes_sdk.admin.AccountGroupsApi(api_client)
id = '1234' # str | Identifier for the account group.
try:
# Delete account group
api_instance.delete_account_group(id)
except Exception as e:
print("Exception when calling AccountGroupsApi->delete_account_group: %s\n" % e)
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**id** | **str**| Identifier for the account group. |
### Return type
void (empty response body)
### Authorization
[BearerAuth](../README.md#BearerAuth)
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json, application/problem+json
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
**204** | No content | - |
**400** | Bad Request | - |
**401** | Unauthorized | - |
**403** | Insufficient permissions to query endpoint | - |
**404** | Not found | - |
**429** | Exhausted rate limit for the organization | - |
**500** | Internal server error | - |
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **get_account_group**
> AccountGroupDetail get_account_group(id, expand=expand)
Retrieve account group
Retrieves detailed information about an account group using its ID. This operation requires the `View all account groups settings` permission.
### Example
* Bearer Authentication (BearerAuth):
```python
import thousandeyes_sdk.admin
from thousandeyes_sdk.admin.models.account_group_detail import AccountGroupDetail
from thousandeyes_sdk.admin.models.expand import Expand
from thousandeyes_sdk.admin.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://api.thousandeyes.com
# See configuration.py for a list of all supported configuration parameters.
configuration = thousandeyes_sdk.core.Configuration(
host = "https://api.thousandeyes.com"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure Bearer authorization: BearerAuth
configuration = thousandeyes_sdk.core.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
# Enter a context with an instance of the API client
with thousandeyes_sdk.admin.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = thousandeyes_sdk.admin.AccountGroupsApi(api_client)
id = '1234' # str | Identifier for the account group.
expand = [thousandeyes_sdk.admin.Expand()] # List[Expand] | Optional parameter that specifies whether or not account group related resources should be expanded. By default, no expansion takes place if the query parameter is not passed. For example, to expand the `users` resource, pass the `?expand=user` query. (optional)
try:
# Retrieve account group
api_response = api_instance.get_account_group(id, expand=expand)
print("The response of AccountGroupsApi->get_account_group:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling AccountGroupsApi->get_account_group: %s\n" % e)
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**id** | **str**| Identifier for the account group. |
**expand** | [**List[Expand]**](Expand.md)| Optional parameter that specifies whether or not account group related resources should be expanded. By default, no expansion takes place if the query parameter is not passed. For example, to expand the &#x60;users&#x60; resource, pass the &#x60;?expand&#x3D;user&#x60; query. | [optional]
### Return type
[**AccountGroupDetail**](AccountGroupDetail.md)
### Authorization
[BearerAuth](../README.md#BearerAuth)
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/hal+json, application/json, application/problem+json
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
**200** | OK | - |
**400** | Bad Request | - |
**401** | Unauthorized | - |
**403** | Insufficient permissions to query endpoint | - |
**404** | Not found | - |
**429** | Exhausted rate limit for the organization | - |
**500** | Internal server error | - |
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **get_account_groups**
> AccountGroups get_account_groups(aid=aid)
List account groups
Retrieves a list of account groups available to the current user.
### Example
* Bearer Authentication (BearerAuth):
```python
import thousandeyes_sdk.admin
from thousandeyes_sdk.admin.models.account_groups import AccountGroups
from thousandeyes_sdk.admin.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://api.thousandeyes.com
# See configuration.py for a list of all supported configuration parameters.
configuration = thousandeyes_sdk.core.Configuration(
host = "https://api.thousandeyes.com"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure Bearer authorization: BearerAuth
configuration = thousandeyes_sdk.core.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
# Enter a context with an instance of the API client
with thousandeyes_sdk.admin.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = thousandeyes_sdk.admin.AccountGroupsApi(api_client)
aid = '1234' # str | A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response. (optional)
try:
# List account groups
api_response = api_instance.get_account_groups(aid=aid)
print("The response of AccountGroupsApi->get_account_groups:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling AccountGroupsApi->get_account_groups: %s\n" % e)
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**aid** | **str**| A unique identifier associated with your account group. You can retrieve your &#x60;AccountGroupId&#x60; from the &#x60;/account-groups&#x60; endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response. | [optional]
### Return type
[**AccountGroups**](AccountGroups.md)
### Authorization
[BearerAuth](../README.md#BearerAuth)
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/hal+json, application/json, application/problem+json
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
**200** | OK | - |
**400** | Bad Request | - |
**401** | Unauthorized | - |
**403** | Insufficient permissions to query endpoint | - |
**404** | Not found | - |
**429** | Exhausted rate limit for the organization | - |
**500** | Internal server error | - |
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **update_account_group**
> AccountGroupDetail update_account_group(id, account_group_request, expand=expand)
Update account group
Updates an account group using its ID. You can modify the account groups name or the list of agents assigned to the account group.
### Example
* Bearer Authentication (BearerAuth):
```python
import thousandeyes_sdk.admin
from thousandeyes_sdk.admin.models.account_group_detail import AccountGroupDetail
from thousandeyes_sdk.admin.models.account_group_request import AccountGroupRequest
from thousandeyes_sdk.admin.models.expand import Expand
from thousandeyes_sdk.admin.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://api.thousandeyes.com
# See configuration.py for a list of all supported configuration parameters.
configuration = thousandeyes_sdk.core.Configuration(
host = "https://api.thousandeyes.com"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure Bearer authorization: BearerAuth
configuration = thousandeyes_sdk.core.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
# Enter a context with an instance of the API client
with thousandeyes_sdk.admin.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = thousandeyes_sdk.admin.AccountGroupsApi(api_client)
id = '1234' # str | Identifier for the account group.
account_group_request = thousandeyes_sdk.admin.AccountGroupRequest() # AccountGroupRequest |
expand = [thousandeyes_sdk.admin.Expand()] # List[Expand] | Optional parameter that specifies whether or not account group related resources should be expanded. By default, no expansion takes place if the query parameter is not passed. For example, to expand the `users` resource, pass the `?expand=user` query. (optional)
try:
# Update account group
api_response = api_instance.update_account_group(id, account_group_request, expand=expand)
print("The response of AccountGroupsApi->update_account_group:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling AccountGroupsApi->update_account_group: %s\n" % e)
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**id** | **str**| Identifier for the account group. |
**account_group_request** | [**AccountGroupRequest**](AccountGroupRequest.md)| |
**expand** | [**List[Expand]**](Expand.md)| Optional parameter that specifies whether or not account group related resources should be expanded. By default, no expansion takes place if the query parameter is not passed. For example, to expand the &#x60;users&#x60; resource, pass the &#x60;?expand&#x3D;user&#x60; query. | [optional]
### Return type
[**AccountGroupDetail**](AccountGroupDetail.md)
### Authorization
[BearerAuth](../README.md#BearerAuth)
### HTTP request headers
- **Content-Type**: application/json
- **Accept**: application/hal+json, application/json, application/problem+json
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
**200** | OK | - |
**400** | Bad Request | - |
**401** | Unauthorized | - |
**403** | Insufficient permissions to query endpoint | - |
**404** | Not found | - |
**429** | Exhausted rate limit for the organization | - |
**500** | Internal server error | - |
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

View File

@ -0,0 +1,39 @@
# Agent
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**ip_addresses** | **List[str]** | Array of private IP addresses. | [optional] [readonly]
**public_ip_addresses** | **List[str]** | Array of public IP addresses. | [optional] [readonly]
**network** | **str** | Network (including ASN) of agents public IP. | [optional] [readonly]
**agent_id** | **str** | Unique ID of the agent. | [optional] [readonly]
**agent_name** | **str** | Name of the agent. | [optional]
**location** | **str** | Location of the agent. | [optional] [readonly]
**country_id** | **str** | 2-digit ISO country code | [optional] [readonly]
**enabled** | **bool** | Flag indicating if the agent is enabled. | [optional]
**prefix** | **str** | Prefix containing agents public IP address. | [optional] [readonly]
**verify_ssl_certificates** | **bool** | Flag indicating if has normal SSL operations or if instead it&#39;s set to ignore SSL errors on browserbot-based tests. | [optional] [readonly]
**agent_type** | [**CloudEnterpriseAgentType**](CloudEnterpriseAgentType.md) | |
## Example
```python
from thousandeyes_sdk.admin.models.agent import Agent
# TODO update the JSON string below
json = "{}"
# create an instance of Agent from a JSON string
agent_instance = Agent.from_json(json)
# print the JSON string representation of the object
print(Agent.to_json())
# convert the object into a dict
agent_dict = agent_instance.to_dict()
# create an instance of Agent from a dict
agent_from_dict = Agent.from_dict(agent_dict)
```
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@ -0,0 +1,31 @@
# AgentBase
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**ip_addresses** | **List[str]** | Array of private IP addresses. | [optional] [readonly]
**public_ip_addresses** | **List[str]** | Array of public IP addresses. | [optional] [readonly]
**network** | **str** | Network (including ASN) of agents public IP. | [optional] [readonly]
## Example
```python
from thousandeyes_sdk.admin.models.agent_base import AgentBase
# TODO update the JSON string below
json = "{}"
# create an instance of AgentBase from a JSON string
agent_base_instance = AgentBase.from_json(json)
# print the JSON string representation of the object
print(AgentBase.to_json())
# convert the object into a dict
agent_base_dict = agent_base_instance.to_dict()
# create an instance of AgentBase from a dict
agent_base_from_dict = AgentBase.from_dict(agent_base_dict)
```
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@ -0,0 +1,32 @@
# AuditUserEvents
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**audit_events** | [**List[UserEvent]**](UserEvent.md) | | [optional]
**start_date** | **datetime** | (Optional) When passing &#x60;window&#x60; or &#x60;startDate&#x60; parameter, the client will also receive the &#x60;startDate&#x60; field indicating the UTC start date of the data&#39;s time range being retrieved (ISO date-time format). | [optional] [readonly]
**end_date** | **datetime** | (Optional) When passing &#x60;window&#x60; or &#x60;endDate&#x60; parameter, the client will also receive the &#x60;endDate&#x60; field indicating the UTC end date of the data&#39;s time range being retrieved (ISO date-time format). | [optional] [readonly]
**links** | [**PaginationLinks**](PaginationLinks.md) | | [optional]
## Example
```python
from thousandeyes_sdk.admin.models.audit_user_events import AuditUserEvents
# TODO update the JSON string below
json = "{}"
# create an instance of AuditUserEvents from a JSON string
audit_user_events_instance = AuditUserEvents.from_json(json)
# print the JSON string representation of the object
print(AuditUserEvents.to_json())
# convert the object into a dict
audit_user_events_dict = audit_user_events_instance.to_dict()
# create an instance of AuditUserEvents from a dict
audit_user_events_from_dict = AuditUserEvents.from_dict(audit_user_events_dict)
```
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@ -0,0 +1,31 @@
# BaseRole
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**name** | **str** | Name of the role. | [optional]
**role_id** | **str** | Unique ID representing the role. | [optional]
**is_builtin** | **bool** | Flag indicating if the role is built-in (Account Admin, Organization Admin, Regular User). | [optional]
## Example
```python
from thousandeyes_sdk.admin.models.base_role import BaseRole
# TODO update the JSON string below
json = "{}"
# create an instance of BaseRole from a JSON string
base_role_instance = BaseRole.from_json(json)
# print the JSON string representation of the object
print(BaseRole.to_json())
# convert the object into a dict
base_role_dict = base_role_instance.to_dict()
# create an instance of BaseRole from a dict
base_role_from_dict = BaseRole.from_dict(base_role_dict)
```
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@ -0,0 +1,12 @@
# CloudEnterpriseAgentType
Type of the agent.
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@ -0,0 +1,38 @@
# ClusterMember
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**ip_addresses** | **List[str]** | Array of private IP addresses. | [optional] [readonly]
**public_ip_addresses** | **List[str]** | Array of public IP addresses. | [optional] [readonly]
**network** | **str** | Network (including ASN) of agents public IP. | [optional] [readonly]
**member_id** | **str** | Unique ID of the cluster member | [optional] [readonly]
**name** | **str** | Name of the cluster member | [optional] [readonly]
**error_details** | [**List[ErrorDetail]**](ErrorDetail.md) | 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) | [optional] [readonly]
**last_seen** | **datetime** | UTC last seen date (ISO date-time format). | [optional] [readonly]
**agent_state** | [**EnterpriseAgentState**](EnterpriseAgentState.md) | | [optional]
**target_for_tests** | **str** | Test target IP address. | [optional]
**utilization** | **int** | Shows overall utilization percentage (online Enterprise Agents and Enterprise Clusters only). | [optional] [readonly]
## Example
```python
from thousandeyes_sdk.admin.models.cluster_member import ClusterMember
# TODO update the JSON string below
json = "{}"
# create an instance of ClusterMember from a JSON string
cluster_member_instance = ClusterMember.from_json(json)
# print the JSON string representation of the object
print(ClusterMember.to_json())
# convert the object into a dict
cluster_member_dict = cluster_member_instance.to_dict()
# create an instance of ClusterMember from a dict
cluster_member_from_dict = ClusterMember.from_dict(cluster_member_dict)
```
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@ -0,0 +1,35 @@
# CreatedAccountGroup
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**aid** | **str** | A unique identifier associated with your account group. You can retrieve your &#x60;AccountGroupId&#x60; from the &#x60;/account-groups&#x60; endpoint. | [optional]
**account_group_name** | **str** | Account group name | [optional]
**is_current_account_group** | **bool** | Indicates whether the requested aid is the context of the current account. | [optional]
**is_default_account_group** | **bool** | Indicates whether the aid is the default one for the requesting user. | [optional]
**organization_name** | **str** | (Optional) Indicates whether the aid is the default one for the requesting user. | [optional]
**users** | [**List[UserAccountGroup]**](UserAccountGroup.md) | | [optional]
**links** | [**SelfLinks**](SelfLinks.md) | | [optional]
## Example
```python
from thousandeyes_sdk.admin.models.created_account_group import CreatedAccountGroup
# TODO update the JSON string below
json = "{}"
# create an instance of CreatedAccountGroup from a JSON string
created_account_group_instance = CreatedAccountGroup.from_json(json)
# print the JSON string representation of the object
print(CreatedAccountGroup.to_json())
# convert the object into a dict
created_account_group_dict = created_account_group_instance.to_dict()
# create an instance of CreatedAccountGroup from a dict
created_account_group_from_dict = CreatedAccountGroup.from_dict(created_account_group_dict)
```
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@ -0,0 +1,36 @@
# CreatedUser
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**name** | **str** | User&#39;s display name. | [optional]
**email** | **str** | User&#39;s email address. | [optional]
**uid** | **str** | Unique ID of the user. | [optional]
**date_registered** | **datetime** | UTC date the user registered their account (ISO date-time format). | [optional]
**login_account_group** | [**AccountGroup**](AccountGroup.md) | | [optional]
**account_group_roles** | [**List[AccountGroupRole]**](AccountGroupRole.md) | | [optional]
**all_account_group_roles** | [**List[Role]**](Role.md) | | [optional]
**links** | [**SelfLinks**](SelfLinks.md) | | [optional]
## Example
```python
from thousandeyes_sdk.admin.models.created_user import CreatedUser
# TODO update the JSON string below
json = "{}"
# create an instance of CreatedUser from a JSON string
created_user_instance = CreatedUser.from_json(json)
# print the JSON string representation of the object
print(CreatedUser.to_json())
# convert the object into a dict
created_user_dict = created_user_instance.to_dict()
# create an instance of CreatedUser from a dict
created_user_from_dict = CreatedUser.from_dict(created_user_dict)
```
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@ -0,0 +1,52 @@
# EnterpriseAgent
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**agent_type** | [**CloudEnterpriseAgentType**](CloudEnterpriseAgentType.md) | |
**ip_addresses** | **List[str]** | Array of private IP addresses. | [optional] [readonly]
**public_ip_addresses** | **List[str]** | Array of public IP addresses. | [optional] [readonly]
**network** | **str** | Network (including ASN) of agents public IP. | [optional] [readonly]
**agent_id** | **str** | Unique ID of the agent. | [optional] [readonly]
**agent_name** | **str** | Name of the agent. | [optional]
**location** | **str** | Location of the agent. | [optional] [readonly]
**country_id** | **str** | 2-digit ISO country code | [optional] [readonly]
**enabled** | **bool** | Flag indicating if the agent is enabled. | [optional]
**prefix** | **str** | Prefix containing agents public IP address. | [optional] [readonly]
**verify_ssl_certificates** | **bool** | Flag indicating if has normal SSL operations or if instead it&#39;s set to ignore SSL errors on browserbot-based tests. | [optional] [readonly]
**cluster_members** | [**List[ClusterMember]**](ClusterMember.md) | 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. | [optional] [readonly]
**utilization** | **int** | Shows overall utilization percentage (online Enterprise Agents and Enterprise Clusters only). | [optional] [readonly]
**account_groups** | [**List[AccountGroup]**](AccountGroup.md) | List of account groups. See /accounts-groups to pull a list of account IDs | [optional]
**ipv6_policy** | [**EnterpriseAgentIpv6Policy**](EnterpriseAgentIpv6Policy.md) | | [optional]
**error_details** | [**List[ErrorDetail]**](ErrorDetail.md) | 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) | [optional] [readonly]
**hostname** | **str** | Fully qualified domain name of the agent (Enterprise Agents only) | [optional] [readonly]
**last_seen** | **datetime** | UTC last seen date (ISO date-time format). | [optional] [readonly]
**agent_state** | [**EnterpriseAgentState**](EnterpriseAgentState.md) | | [optional]
**keep_browser_cache** | **bool** | Flag indicating if the agent retains cache. | [optional]
**created_date** | **datetime** | UTC Agent creation date (ISO date-time format). | [optional] [readonly]
**target_for_tests** | **str** | Test target IP address. | [optional]
**local_resolution_prefixes** | **List[str]** | 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). | [optional]
**interface_ip_mappings** | [**List[InterfaceIpMapping]**](InterfaceIpMapping.md) | | [optional] [readonly]
## Example
```python
from thousandeyes_sdk.admin.models.enterprise_agent import EnterpriseAgent
# TODO update the JSON string below
json = "{}"
# create an instance of EnterpriseAgent from a JSON string
enterprise_agent_instance = EnterpriseAgent.from_json(json)
# print the JSON string representation of the object
print(EnterpriseAgent.to_json())
# convert the object into a dict
enterprise_agent_dict = enterprise_agent_instance.to_dict()
# create an instance of EnterpriseAgent from a dict
enterprise_agent_from_dict = EnterpriseAgent.from_dict(enterprise_agent_dict)
```
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@ -0,0 +1,41 @@
# EnterpriseAgentData
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**cluster_members** | [**List[ClusterMember]**](ClusterMember.md) | 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. | [optional] [readonly]
**utilization** | **int** | Shows overall utilization percentage (online Enterprise Agents and Enterprise Clusters only). | [optional] [readonly]
**account_groups** | [**List[AccountGroup]**](AccountGroup.md) | List of account groups. See /accounts-groups to pull a list of account IDs | [optional]
**ipv6_policy** | [**EnterpriseAgentIpv6Policy**](EnterpriseAgentIpv6Policy.md) | | [optional]
**error_details** | [**List[ErrorDetail]**](ErrorDetail.md) | 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) | [optional] [readonly]
**hostname** | **str** | Fully qualified domain name of the agent (Enterprise Agents only) | [optional] [readonly]
**last_seen** | **datetime** | UTC last seen date (ISO date-time format). | [optional] [readonly]
**agent_state** | [**EnterpriseAgentState**](EnterpriseAgentState.md) | | [optional]
**keep_browser_cache** | **bool** | Flag indicating if the agent retains cache. | [optional]
**created_date** | **datetime** | UTC Agent creation date (ISO date-time format). | [optional] [readonly]
**target_for_tests** | **str** | Test target IP address. | [optional]
**local_resolution_prefixes** | **List[str]** | 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). | [optional]
**interface_ip_mappings** | [**List[InterfaceIpMapping]**](InterfaceIpMapping.md) | | [optional] [readonly]
## Example
```python
from thousandeyes_sdk.admin.models.enterprise_agent_data import EnterpriseAgentData
# TODO update the JSON string below
json = "{}"
# create an instance of EnterpriseAgentData from a JSON string
enterprise_agent_data_instance = EnterpriseAgentData.from_json(json)
# print the JSON string representation of the object
print(EnterpriseAgentData.to_json())
# convert the object into a dict
enterprise_agent_data_dict = enterprise_agent_data_instance.to_dict()
# create an instance of EnterpriseAgentData from a dict
enterprise_agent_data_from_dict = EnterpriseAgentData.from_dict(enterprise_agent_data_dict)
```
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@ -0,0 +1,12 @@
# EnterpriseAgentIpv6Policy
IP version policy, (Enterprise Agents and Enterprise Clusters only)
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@ -0,0 +1,12 @@
# EnterpriseAgentState
State of the agent.
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@ -0,0 +1,33 @@
# Error
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**type** | **str** | A URI reference that identifies the problem type. When this member is not present, its value is assumed to be \&quot;about:blank\&quot;. | [optional]
**title** | **str** | A short, human-readable summary of the problem type. | [optional]
**status** | **int** | The HTTP status code generated by the origin server for this occurrence of the problem. | [optional]
**detail** | **str** | A human-readable explanation specific to this occurrence of the problem. | [optional]
**instance** | **str** | A URI reference that identifies the specific occurrence of the problem. | [optional]
## Example
```python
from thousandeyes_sdk.admin.models.error import Error
# TODO update the JSON string below
json = "{}"
# create an instance of Error from a JSON string
error_instance = Error.from_json(json)
# print the JSON string representation of the object
print(Error.to_json())
# convert the object into a dict
error_dict = error_instance.to_dict()
# create an instance of Error from a dict
error_from_dict = Error.from_dict(error_dict)
```
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@ -0,0 +1,30 @@
# ErrorDetail
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**code** | [**ErrorDetailCode**](ErrorDetailCode.md) | | [optional]
**description** | **str** | Description for the agent error. | [optional] [readonly]
## Example
```python
from thousandeyes_sdk.admin.models.error_detail import ErrorDetail
# TODO update the JSON string below
json = "{}"
# create an instance of ErrorDetail from a JSON string
error_detail_instance = ErrorDetail.from_json(json)
# print the JSON string representation of the object
print(ErrorDetail.to_json())
# convert the object into a dict
error_detail_dict = error_detail_instance.to_dict()
# create an instance of ErrorDetail from a dict
error_detail_from_dict = ErrorDetail.from_dict(error_detail_dict)
```
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@ -0,0 +1,12 @@
# ErrorDetailCode
Code for the agent error.
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@ -0,0 +1,11 @@
# Expand
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@ -0,0 +1,34 @@
# ExtendedUser
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**name** | **str** | User&#39;s display name. | [optional]
**email** | **str** | User&#39;s email address. | [optional]
**uid** | **str** | Unique ID of the user. | [optional]
**date_registered** | **datetime** | UTC date the user registered their account (ISO date-time format). | [optional]
**login_account_group** | [**AccountGroup**](AccountGroup.md) | | [optional]
**last_login** | **datetime** | UTC last login of the user (ISO date-time format). | [optional]
## Example
```python
from thousandeyes_sdk.admin.models.extended_user import ExtendedUser
# TODO update the JSON string below
json = "{}"
# create an instance of ExtendedUser from a JSON string
extended_user_instance = ExtendedUser.from_json(json)
# print the JSON string representation of the object
print(ExtendedUser.to_json())
# convert the object into a dict
extended_user_dict = extended_user_instance.to_dict()
# create an instance of ExtendedUser from a dict
extended_user_from_dict = ExtendedUser.from_dict(extended_user_dict)
```
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@ -0,0 +1,30 @@
# InterfaceIpMapping
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**interface_name** | **str** | Name of the mapping | [optional] [readonly]
**ip_addresses** | **List[str]** | Array of ipAddress entries | [optional] [readonly]
## Example
```python
from thousandeyes_sdk.admin.models.interface_ip_mapping import InterfaceIpMapping
# TODO update the JSON string below
json = "{}"
# create an instance of InterfaceIpMapping from a JSON string
interface_ip_mapping_instance = InterfaceIpMapping.from_json(json)
# print the JSON string representation of the object
print(InterfaceIpMapping.to_json())
# convert the object into a dict
interface_ip_mapping_dict = interface_ip_mapping_instance.to_dict()
# create an instance of InterfaceIpMapping from a dict
interface_ip_mapping_from_dict = InterfaceIpMapping.from_dict(interface_ip_mapping_dict)
```
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@ -0,0 +1,37 @@
# Link
A hyperlink from the containing resource to a URI.
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**href** | **str** | Its value is either a URI [RFC3986] or a URI template [RFC6570]. |
**templated** | **bool** | Should be true when the link object&#39;s \&quot;href\&quot; property is a URI template. | [optional]
**type** | **str** | Used as a hint to indicate the media type expected when dereferencing the target resource. | [optional]
**deprecation** | **str** | 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. | [optional]
**name** | **str** | Its value may be used as a secondary key for selecting link objects that share the same relation type. | [optional]
**profile** | **str** | A URI that hints about the profile of the target resource. | [optional]
**title** | **str** | Intended for labelling the link with a human-readable identifier | [optional]
**hreflang** | **str** | Indicates the language of the target resource | [optional]
## Example
```python
from thousandeyes_sdk.admin.models.link import Link
# TODO update the JSON string below
json = "{}"
# create an instance of Link from a JSON string
link_instance = Link.from_json(json)
# print the JSON string representation of the object
print(Link.to_json())
# convert the object into a dict
link_dict = link_instance.to_dict()
# create an instance of Link from a dict
link_from_dict = Link.from_dict(link_dict)
```
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@ -0,0 +1,32 @@
# PaginationLinks
A links object containing pagination related link(s).
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**previous** | [**Link**](Link.md) | | [optional]
**next** | [**Link**](Link.md) | | [optional]
**var_self** | [**Link**](Link.md) | | [optional]
## Example
```python
from thousandeyes_sdk.admin.models.pagination_links import PaginationLinks
# TODO update the JSON string below
json = "{}"
# create an instance of PaginationLinks from a JSON string
pagination_links_instance = PaginationLinks.from_json(json)
# print the JSON string representation of the object
print(PaginationLinks.to_json())
# convert the object into a dict
pagination_links_dict = pagination_links_instance.to_dict()
# create an instance of PaginationLinks from a dict
pagination_links_from_dict = PaginationLinks.from_dict(pagination_links_dict)
```
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@ -0,0 +1,32 @@
# Permission
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**label** | **str** | Label corresponding to the permission. | [optional]
**permission_id** | **str** | Unique ID representing the permission. | [optional]
**is_management_permission** | **bool** | Flag indicating whether the permission is classified as a management permission. | [optional]
**permission** | **str** | Permission name | [optional]
## Example
```python
from thousandeyes_sdk.admin.models.permission import Permission
# TODO update the JSON string below
json = "{}"
# create an instance of Permission from a JSON string
permission_instance = Permission.from_json(json)
# print the JSON string representation of the object
print(Permission.to_json())
# convert the object into a dict
permission_dict = permission_instance.to_dict()
# create an instance of Permission from a dict
permission_from_dict = Permission.from_dict(permission_dict)
```
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@ -0,0 +1,30 @@
# Permissions
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**permissions** | [**List[Permission]**](Permission.md) | | [optional]
**links** | [**SelfLinks**](SelfLinks.md) | | [optional]
## Example
```python
from thousandeyes_sdk.admin.models.permissions import Permissions
# TODO update the JSON string below
json = "{}"
# create an instance of Permissions from a JSON string
permissions_instance = Permissions.from_json(json)
# print the JSON string representation of the object
print(Permissions.to_json())
# convert the object into a dict
permissions_dict = permissions_instance.to_dict()
# create an instance of Permissions from a dict
permissions_from_dict = Permissions.from_dict(permissions_dict)
```
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@ -0,0 +1,93 @@
# thousandeyes_sdk.admin.PermissionsApi
All URIs are relative to *https://api.thousandeyes.com*
Method | HTTP request | Description
------------- | ------------- | -------------
[**get_permissions**](PermissionsApi.md#get_permissions) | **GET** /v7/permissions | List assignable permissions
# **get_permissions**
> Permissions get_permissions(aid=aid)
List assignable permissions
Users must be in a role assigned management permissions to access this endpoint. Users without management permissions who attempt to access this endpoint receive an HTTP/403 response code.
### Example
* Bearer Authentication (BearerAuth):
```python
import thousandeyes_sdk.admin
from thousandeyes_sdk.admin.models.permissions import Permissions
from thousandeyes_sdk.admin.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://api.thousandeyes.com
# See configuration.py for a list of all supported configuration parameters.
configuration = thousandeyes_sdk.core.Configuration(
host = "https://api.thousandeyes.com"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure Bearer authorization: BearerAuth
configuration = thousandeyes_sdk.core.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
# Enter a context with an instance of the API client
with thousandeyes_sdk.admin.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = thousandeyes_sdk.admin.PermissionsApi(api_client)
aid = '1234' # str | A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response. (optional)
try:
# List assignable permissions
api_response = api_instance.get_permissions(aid=aid)
print("The response of PermissionsApi->get_permissions:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling PermissionsApi->get_permissions: %s\n" % e)
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**aid** | **str**| A unique identifier associated with your account group. You can retrieve your &#x60;AccountGroupId&#x60; from the &#x60;/account-groups&#x60; endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response. | [optional]
### Return type
[**Permissions**](Permissions.md)
### Authorization
[BearerAuth](../README.md#BearerAuth)
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/hal+json, application/json, application/problem+json
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
**200** | OK | - |
**400** | Bad Request | - |
**401** | Unauthorized | - |
**403** | Insufficient permissions to query endpoint | - |
**404** | Not found | - |
**429** | Exhausted rate limit for the organization | - |
**500** | Internal server error | - |
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

View File

@ -0,0 +1,30 @@
# Resource
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**type** | **str** | Type of resource affected. Can be “testName”, “reportTitle”, “userDisplayName”, “alertRuleName”, etc. | [optional]
**name** | **str** | Name of the affected resource. | [optional]
## Example
```python
from thousandeyes_sdk.admin.models.resource import Resource
# TODO update the JSON string below
json = "{}"
# create an instance of Resource from a JSON string
resource_instance = Resource.from_json(json)
# print the JSON string representation of the object
print(Resource.to_json())
# convert the object into a dict
resource_dict = resource_instance.to_dict()
# create an instance of Resource from a dict
resource_from_dict = Resource.from_dict(resource_dict)
```
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@ -0,0 +1,32 @@
# Role
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**name** | **str** | Name of the role. | [optional]
**role_id** | **str** | Unique ID representing the role. | [optional]
**is_builtin** | **bool** | Flag indicating if the role is built-in (Account Admin, Organization Admin, Regular User). | [optional]
**has_management_permissions** | **bool** | Flag indicating whether the user has management permissions. | [optional]
## Example
```python
from thousandeyes_sdk.admin.models.role import Role
# TODO update the JSON string below
json = "{}"
# create an instance of Role from a JSON string
role_instance = Role.from_json(json)
# print the JSON string representation of the object
print(Role.to_json())
# convert the object into a dict
role_dict = role_instance.to_dict()
# create an instance of Role from a dict
role_from_dict = Role.from_dict(role_dict)
```
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@ -0,0 +1,33 @@
# RoleDetail
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**name** | **str** | Name of the role. | [optional]
**role_id** | **str** | Unique ID representing the role. | [optional]
**is_builtin** | **bool** | Flag indicating if the role is built-in (Account Admin, Organization Admin, Regular User). | [optional]
**permissions** | [**List[Permission]**](Permission.md) | | [optional]
**links** | [**SelfLinks**](SelfLinks.md) | | [optional]
## Example
```python
from thousandeyes_sdk.admin.models.role_detail import RoleDetail
# TODO update the JSON string below
json = "{}"
# create an instance of RoleDetail from a JSON string
role_detail_instance = RoleDetail.from_json(json)
# print the JSON string representation of the object
print(RoleDetail.to_json())
# convert the object into a dict
role_detail_dict = role_detail_instance.to_dict()
# create an instance of RoleDetail from a dict
role_detail_from_dict = RoleDetail.from_dict(role_detail_dict)
```
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@ -0,0 +1,30 @@
# RoleRequestBody
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**name** | **str** | Name of the role. | [optional]
**permissions** | **List[str]** | Contains list of test permission IDs (get &#x60;permissionId&#x60; from &#x60;/permissions&#x60; endpoint) | [optional]
## Example
```python
from thousandeyes_sdk.admin.models.role_request_body import RoleRequestBody
# TODO update the JSON string below
json = "{}"
# create an instance of RoleRequestBody from a JSON string
role_request_body_instance = RoleRequestBody.from_json(json)
# print the JSON string representation of the object
print(RoleRequestBody.to_json())
# convert the object into a dict
role_request_body_dict = role_request_body_instance.to_dict()
# create an instance of RoleRequestBody from a dict
role_request_body_from_dict = RoleRequestBody.from_dict(role_request_body_dict)
```
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@ -0,0 +1,30 @@
# Roles
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**roles** | [**List[Role]**](Role.md) | | [optional]
**links** | [**SelfLinks**](SelfLinks.md) | | [optional]
## Example
```python
from thousandeyes_sdk.admin.models.roles import Roles
# TODO update the JSON string below
json = "{}"
# create an instance of Roles from a JSON string
roles_instance = Roles.from_json(json)
# print the JSON string representation of the object
print(Roles.to_json())
# convert the object into a dict
roles_dict = roles_instance.to_dict()
# create an instance of Roles from a dict
roles_from_dict = Roles.from_dict(roles_dict)
```
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@ -0,0 +1,442 @@
# thousandeyes_sdk.admin.RolesApi
All URIs are relative to *https://api.thousandeyes.com*
Method | HTTP request | Description
------------- | ------------- | -------------
[**create_role**](RolesApi.md#create_role) | **POST** /v7/roles | Create role
[**delete_role**](RolesApi.md#delete_role) | **DELETE** /v7/roles/{id} | Delete role
[**get_role**](RolesApi.md#get_role) | **GET** /v7/roles/{id} | Retrieve role
[**get_roles**](RolesApi.md#get_roles) | **GET** /v7/roles | List roles
[**update_role**](RolesApi.md#update_role) | **PUT** /v7/roles/{id} | Update role
# **create_role**
> RoleDetail create_role(role_request_body, aid=aid)
Create role
Creates a new role.
### Example
* Bearer Authentication (BearerAuth):
```python
import thousandeyes_sdk.admin
from thousandeyes_sdk.admin.models.role_detail import RoleDetail
from thousandeyes_sdk.admin.models.role_request_body import RoleRequestBody
from thousandeyes_sdk.admin.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://api.thousandeyes.com
# See configuration.py for a list of all supported configuration parameters.
configuration = thousandeyes_sdk.core.Configuration(
host = "https://api.thousandeyes.com"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure Bearer authorization: BearerAuth
configuration = thousandeyes_sdk.core.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
# Enter a context with an instance of the API client
with thousandeyes_sdk.admin.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = thousandeyes_sdk.admin.RolesApi(api_client)
role_request_body = thousandeyes_sdk.admin.RoleRequestBody() # RoleRequestBody |
aid = '1234' # str | A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response. (optional)
try:
# Create role
api_response = api_instance.create_role(role_request_body, aid=aid)
print("The response of RolesApi->create_role:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling RolesApi->create_role: %s\n" % e)
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**role_request_body** | [**RoleRequestBody**](RoleRequestBody.md)| |
**aid** | **str**| A unique identifier associated with your account group. You can retrieve your &#x60;AccountGroupId&#x60; from the &#x60;/account-groups&#x60; endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response. | [optional]
### Return type
[**RoleDetail**](RoleDetail.md)
### Authorization
[BearerAuth](../README.md#BearerAuth)
### HTTP request headers
- **Content-Type**: application/json
- **Accept**: application/hal+json, application/json, application/problem+json
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
**201** | Created | * Location - <br> |
**400** | Bad Request | - |
**401** | Unauthorized | - |
**403** | Insufficient permissions to query endpoint | - |
**404** | Not found | - |
**429** | Exhausted rate limit for the organization | - |
**500** | Internal server error | - |
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **delete_role**
> delete_role(id, aid=aid)
Delete role
Deletes a role using its ID. The user needs appropriate permissions to successfully call this endpoint.
### Example
* Bearer Authentication (BearerAuth):
```python
import thousandeyes_sdk.admin
from thousandeyes_sdk.admin.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://api.thousandeyes.com
# See configuration.py for a list of all supported configuration parameters.
configuration = thousandeyes_sdk.core.Configuration(
host = "https://api.thousandeyes.com"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure Bearer authorization: BearerAuth
configuration = thousandeyes_sdk.core.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
# Enter a context with an instance of the API client
with thousandeyes_sdk.admin.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = thousandeyes_sdk.admin.RolesApi(api_client)
id = '23' # str | The ID of the desired role.
aid = '1234' # str | A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response. (optional)
try:
# Delete role
api_instance.delete_role(id, aid=aid)
except Exception as e:
print("Exception when calling RolesApi->delete_role: %s\n" % e)
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**id** | **str**| The ID of the desired role. |
**aid** | **str**| A unique identifier associated with your account group. You can retrieve your &#x60;AccountGroupId&#x60; from the &#x60;/account-groups&#x60; endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response. | [optional]
### Return type
void (empty response body)
### Authorization
[BearerAuth](../README.md#BearerAuth)
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json, application/problem+json
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
**204** | No content | - |
**400** | Bad Request | - |
**401** | Unauthorized | - |
**403** | Insufficient permissions to query endpoint | - |
**404** | Not found | - |
**429** | Exhausted rate limit for the organization | - |
**500** | Internal server error | - |
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **get_role**
> RoleDetail get_role(id, aid=aid)
Retrieve role
Returns detailed information about a role using its ID.
### Example
* Bearer Authentication (BearerAuth):
```python
import thousandeyes_sdk.admin
from thousandeyes_sdk.admin.models.role_detail import RoleDetail
from thousandeyes_sdk.admin.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://api.thousandeyes.com
# See configuration.py for a list of all supported configuration parameters.
configuration = thousandeyes_sdk.core.Configuration(
host = "https://api.thousandeyes.com"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure Bearer authorization: BearerAuth
configuration = thousandeyes_sdk.core.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
# Enter a context with an instance of the API client
with thousandeyes_sdk.admin.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = thousandeyes_sdk.admin.RolesApi(api_client)
id = '23' # str | The ID of the desired role.
aid = '1234' # str | A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response. (optional)
try:
# Retrieve role
api_response = api_instance.get_role(id, aid=aid)
print("The response of RolesApi->get_role:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling RolesApi->get_role: %s\n" % e)
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**id** | **str**| The ID of the desired role. |
**aid** | **str**| A unique identifier associated with your account group. You can retrieve your &#x60;AccountGroupId&#x60; from the &#x60;/account-groups&#x60; endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response. | [optional]
### Return type
[**RoleDetail**](RoleDetail.md)
### Authorization
[BearerAuth](../README.md#BearerAuth)
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/hal+json, application/json, application/problem+json
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
**200** | OK | - |
**400** | Bad Request | - |
**401** | Unauthorized | - |
**403** | Insufficient permissions to query endpoint | - |
**404** | Not found | - |
**429** | Exhausted rate limit for the organization | - |
**500** | Internal server error | - |
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **get_roles**
> Roles get_roles(aid=aid)
List roles
Retrieves a list of defined roles visible to the current user.
### Example
* Bearer Authentication (BearerAuth):
```python
import thousandeyes_sdk.admin
from thousandeyes_sdk.admin.models.roles import Roles
from thousandeyes_sdk.admin.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://api.thousandeyes.com
# See configuration.py for a list of all supported configuration parameters.
configuration = thousandeyes_sdk.core.Configuration(
host = "https://api.thousandeyes.com"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure Bearer authorization: BearerAuth
configuration = thousandeyes_sdk.core.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
# Enter a context with an instance of the API client
with thousandeyes_sdk.admin.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = thousandeyes_sdk.admin.RolesApi(api_client)
aid = '1234' # str | A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response. (optional)
try:
# List roles
api_response = api_instance.get_roles(aid=aid)
print("The response of RolesApi->get_roles:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling RolesApi->get_roles: %s\n" % e)
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**aid** | **str**| A unique identifier associated with your account group. You can retrieve your &#x60;AccountGroupId&#x60; from the &#x60;/account-groups&#x60; endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response. | [optional]
### Return type
[**Roles**](Roles.md)
### Authorization
[BearerAuth](../README.md#BearerAuth)
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/hal+json, application/json, application/problem+json
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
**200** | OK | - |
**400** | Bad Request | - |
**401** | Unauthorized | - |
**403** | Insufficient permissions to query endpoint | - |
**404** | Not found | - |
**429** | Exhausted rate limit for the organization | - |
**500** | Internal server error | - |
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **update_role**
> RoleDetail update_role(id, role_request_body, aid=aid)
Update role
Updates a user-defined role using its ID. When updating a role, the following applies: * The full list of permissions must be sent, This endpoint does not support delta-based grant or revoking of permissions. * Permission definitions and details can be obtained from the Permissions endpoint.
### Example
* Bearer Authentication (BearerAuth):
```python
import thousandeyes_sdk.admin
from thousandeyes_sdk.admin.models.role_detail import RoleDetail
from thousandeyes_sdk.admin.models.role_request_body import RoleRequestBody
from thousandeyes_sdk.admin.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://api.thousandeyes.com
# See configuration.py for a list of all supported configuration parameters.
configuration = thousandeyes_sdk.core.Configuration(
host = "https://api.thousandeyes.com"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure Bearer authorization: BearerAuth
configuration = thousandeyes_sdk.core.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
# Enter a context with an instance of the API client
with thousandeyes_sdk.admin.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = thousandeyes_sdk.admin.RolesApi(api_client)
id = '23' # str | The ID of the desired role.
role_request_body = thousandeyes_sdk.admin.RoleRequestBody() # RoleRequestBody |
aid = '1234' # str | A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response. (optional)
try:
# Update role
api_response = api_instance.update_role(id, role_request_body, aid=aid)
print("The response of RolesApi->update_role:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling RolesApi->update_role: %s\n" % e)
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**id** | **str**| The ID of the desired role. |
**role_request_body** | [**RoleRequestBody**](RoleRequestBody.md)| |
**aid** | **str**| A unique identifier associated with your account group. You can retrieve your &#x60;AccountGroupId&#x60; from the &#x60;/account-groups&#x60; endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response. | [optional]
### Return type
[**RoleDetail**](RoleDetail.md)
### Authorization
[BearerAuth](../README.md#BearerAuth)
### HTTP request headers
- **Content-Type**: application/json
- **Accept**: application/hal+json, application/json, application/problem+json
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
**200** | OK | - |
**400** | Bad Request | - |
**401** | Unauthorized | - |
**403** | Insufficient permissions to query endpoint | - |
**404** | Not found | - |
**429** | Exhausted rate limit for the organization | - |
**500** | Internal server error | - |
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

View File

@ -0,0 +1,30 @@
# SelfLinks
A links object containing the self link.
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**var_self** | [**Link**](Link.md) | | [optional]
## Example
```python
from thousandeyes_sdk.admin.models.self_links import SelfLinks
# TODO update the JSON string below
json = "{}"
# create an instance of SelfLinks from a JSON string
self_links_instance = SelfLinks.from_json(json)
# print the JSON string representation of the object
print(SelfLinks.to_json())
# convert the object into a dict
self_links_dict = self_links_instance.to_dict()
# create an instance of SelfLinks from a dict
self_links_from_dict = SelfLinks.from_dict(self_links_dict)
```
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@ -0,0 +1,38 @@
# SimpleAgent
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**ip_addresses** | **List[str]** | Array of private IP addresses. | [optional] [readonly]
**public_ip_addresses** | **List[str]** | Array of public IP addresses. | [optional] [readonly]
**network** | **str** | Network (including ASN) of agents public IP. | [optional] [readonly]
**agent_id** | **str** | Unique ID of the agent. | [optional] [readonly]
**agent_name** | **str** | Name of the agent. | [optional]
**location** | **str** | Location of the agent. | [optional] [readonly]
**country_id** | **str** | 2-digit ISO country code | [optional] [readonly]
**enabled** | **bool** | Flag indicating if the agent is enabled. | [optional]
**prefix** | **str** | Prefix containing agents public IP address. | [optional] [readonly]
**verify_ssl_certificates** | **bool** | Flag indicating if has normal SSL operations or if instead it&#39;s set to ignore SSL errors on browserbot-based tests. | [optional] [readonly]
## Example
```python
from thousandeyes_sdk.admin.models.simple_agent import SimpleAgent
# TODO update the JSON string below
json = "{}"
# create an instance of SimpleAgent from a JSON string
simple_agent_instance = SimpleAgent.from_json(json)
# print the JSON string representation of the object
print(SimpleAgent.to_json())
# convert the object into a dict
simple_agent_dict = simple_agent_instance.to_dict()
# create an instance of SimpleAgent from a dict
simple_agent_from_dict = SimpleAgent.from_dict(simple_agent_dict)
```
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@ -0,0 +1,30 @@
# UnauthorizedError
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**error** | **str** | | [optional]
**error_description** | **str** | | [optional]
## Example
```python
from thousandeyes_sdk.admin.models.unauthorized_error import UnauthorizedError
# TODO update the JSON string below
json = "{}"
# create an instance of UnauthorizedError from a JSON string
unauthorized_error_instance = UnauthorizedError.from_json(json)
# print the JSON string representation of the object
print(UnauthorizedError.to_json())
# convert the object into a dict
unauthorized_error_dict = unauthorized_error_instance.to_dict()
# create an instance of UnauthorizedError from a dict
unauthorized_error_from_dict = UnauthorizedError.from_dict(unauthorized_error_dict)
```
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@ -0,0 +1,33 @@
# User
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**name** | **str** | User&#39;s display name. | [optional]
**email** | **str** | User&#39;s email address. | [optional]
**uid** | **str** | Unique ID of the user. | [optional]
**date_registered** | **datetime** | UTC date the user registered their account (ISO date-time format). | [optional]
**login_account_group** | [**AccountGroup**](AccountGroup.md) | | [optional]
## Example
```python
from thousandeyes_sdk.admin.models.user import User
# TODO update the JSON string below
json = "{}"
# create an instance of User from a JSON string
user_instance = User.from_json(json)
# print the JSON string representation of the object
print(User.to_json())
# convert the object into a dict
user_dict = user_instance.to_dict()
# create an instance of User from a dict
user_from_dict = User.from_dict(user_dict)
```
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@ -0,0 +1,34 @@
# UserAccountGroup
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**name** | **str** | User&#39;s display name. | [optional]
**email** | **str** | User&#39;s email address. | [optional]
**uid** | **str** | Unique ID representing the user. | [optional]
**last_login** | **datetime** | User&#39;s UTC last login date (ISO date-time format). | [optional]
**date_registered** | **datetime** | User&#39;s UTC registration date (ISO date-time format). | [optional]
**roles** | [**List[Role]**](Role.md) | | [optional]
## Example
```python
from thousandeyes_sdk.admin.models.user_account_group import UserAccountGroup
# TODO update the JSON string below
json = "{}"
# create an instance of UserAccountGroup from a JSON string
user_account_group_instance = UserAccountGroup.from_json(json)
# print the JSON string representation of the object
print(UserAccountGroup.to_json())
# convert the object into a dict
user_account_group_dict = user_account_group_instance.to_dict()
# create an instance of UserAccountGroup from a dict
user_account_group_from_dict = UserAccountGroup.from_dict(user_account_group_dict)
```
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@ -0,0 +1,30 @@
# UserAccountGroupRole
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**account_group_id** | **str** | Unique ID of the account group. | [optional]
**role_ids** | **List[str]** | Unique role IDs. | [optional]
## Example
```python
from thousandeyes_sdk.admin.models.user_account_group_role import UserAccountGroupRole
# TODO update the JSON string below
json = "{}"
# create an instance of UserAccountGroupRole from a JSON string
user_account_group_role_instance = UserAccountGroupRole.from_json(json)
# print the JSON string representation of the object
print(UserAccountGroupRole.to_json())
# convert the object into a dict
user_account_group_role_dict = user_account_group_role_instance.to_dict()
# create an instance of UserAccountGroupRole from a dict
user_account_group_role_from_dict = UserAccountGroupRole.from_dict(user_account_group_role_dict)
```
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@ -0,0 +1,37 @@
# UserDetail
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**name** | **str** | User&#39;s display name. | [optional]
**email** | **str** | User&#39;s email address. | [optional]
**uid** | **str** | Unique ID of the user. | [optional]
**date_registered** | **datetime** | UTC date the user registered their account (ISO date-time format). | [optional]
**login_account_group** | [**AccountGroup**](AccountGroup.md) | | [optional]
**last_login** | **datetime** | UTC last login of the user (ISO date-time format). | [optional]
**account_group_roles** | [**List[AccountGroupRole]**](AccountGroupRole.md) | | [optional]
**all_account_group_roles** | [**List[Role]**](Role.md) | | [optional]
**links** | [**SelfLinks**](SelfLinks.md) | | [optional]
## Example
```python
from thousandeyes_sdk.admin.models.user_detail import UserDetail
# TODO update the JSON string below
json = "{}"
# create an instance of UserDetail from a JSON string
user_detail_instance = UserDetail.from_json(json)
# print the JSON string representation of the object
print(UserDetail.to_json())
# convert the object into a dict
user_detail_dict = user_detail_instance.to_dict()
# create an instance of UserDetail from a dict
user_detail_from_dict = UserDetail.from_dict(user_detail_dict)
```
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@ -0,0 +1,36 @@
# UserEvent
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**aid** | **str** | A unique identifier associated with your account group. You can retrieve your &#x60;AccountGroupId&#x60; from the &#x60;/account-groups&#x60; endpoint. | [optional]
**account_group_name** | **str** | Account group name | [optional]
**var_date** | **datetime** | UTC event date (ISO date-time format). | [optional]
**event** | **str** | Event type. | [optional]
**ip_address** | **str** | Source IP address of the user. | [optional]
**uid** | **str** | Unique id representing the user. | [optional]
**user** | **str** | The name and email address of the user. | [optional]
**resources** | [**List[Resource]**](Resource.md) | | [optional]
## Example
```python
from thousandeyes_sdk.admin.models.user_event import UserEvent
# TODO update the JSON string below
json = "{}"
# create an instance of UserEvent from a JSON string
user_event_instance = UserEvent.from_json(json)
# print the JSON string representation of the object
print(UserEvent.to_json())
# convert the object into a dict
user_event_dict = user_event_instance.to_dict()
# create an instance of UserEvent from a dict
user_event_from_dict = UserEvent.from_dict(user_event_dict)
```
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@ -0,0 +1,103 @@
# thousandeyes_sdk.admin.UserEventsApi
All URIs are relative to *https://api.thousandeyes.com*
Method | HTTP request | Description
------------- | ------------- | -------------
[**get_user_events**](UserEventsApi.md#get_user_events) | **GET** /v7/audit-user-events | List activity log events
# **get_user_events**
> AuditUserEvents get_user_events(aid=aid, use_all_permitted_aids=use_all_permitted_aids, window=window, start_date=start_date, end_date=end_date, cursor=cursor)
List activity log events
Returns a list of activity log events in the current account group. If `useAllPermittedAids=true` query parameter is passed and the user has permission `View activity log for all users in account group` the logs returned include events across all the account groups they belong to. For more information about changing the account group context, see [Account Context](https://developer.thousandeyes.com/v7/#/accountcontext).
### Example
* Bearer Authentication (BearerAuth):
```python
import thousandeyes_sdk.admin
from thousandeyes_sdk.admin.models.audit_user_events import AuditUserEvents
from thousandeyes_sdk.admin.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://api.thousandeyes.com
# See configuration.py for a list of all supported configuration parameters.
configuration = thousandeyes_sdk.core.Configuration(
host = "https://api.thousandeyes.com"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure Bearer authorization: BearerAuth
configuration = thousandeyes_sdk.core.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
# Enter a context with an instance of the API client
with thousandeyes_sdk.admin.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = thousandeyes_sdk.admin.UserEventsApi(api_client)
aid = '1234' # str | A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response. (optional)
use_all_permitted_aids = False # bool | Set to `true` to load data from all accounts the user has access to. (optional) (default to False)
window = '12h' # str | A dynamic time interval up to the current time of the request. Specify the interval as a number followed by an optional type: `s` for seconds (default if no type is specified), `m` for minutes, `h` for hours, `d` for days, and `w` for weeks. For a precise date range, use `startDate` and `endDate`. (optional)
start_date = '2022-07-17T22:00:54Z' # datetime | Use with the `endDate` parameter. Include the complete time (hours, minutes, and seconds) in UTC time zone, following the ISO 8601 date-time format. See the example for reference. Please note that this parameter can't be used with `window`. (optional)
end_date = '2022-07-18T22:00:54Z' # datetime | Defaults to current time the request is made. Use with the `startDate` parameter. Include the complete time (hours, minutes, and seconds) in UTC time zone, following the ISO 8601 date-time format. See the example for reference. Please note that this parameter can't be used with `window`. (optional)
cursor = 'cursor_example' # str | (Optional) Opaque cursor used for pagination. Clients should use `next` value from `_links` instead of this parameter. (optional)
try:
# List activity log events
api_response = api_instance.get_user_events(aid=aid, use_all_permitted_aids=use_all_permitted_aids, window=window, start_date=start_date, end_date=end_date, cursor=cursor)
print("The response of UserEventsApi->get_user_events:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling UserEventsApi->get_user_events: %s\n" % e)
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**aid** | **str**| A unique identifier associated with your account group. You can retrieve your &#x60;AccountGroupId&#x60; from the &#x60;/account-groups&#x60; endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response. | [optional]
**use_all_permitted_aids** | **bool**| Set to &#x60;true&#x60; to load data from all accounts the user has access to. | [optional] [default to False]
**window** | **str**| A dynamic time interval up to the current time of the request. Specify the interval as a number followed by an optional type: &#x60;s&#x60; for seconds (default if no type is specified), &#x60;m&#x60; for minutes, &#x60;h&#x60; for hours, &#x60;d&#x60; for days, and &#x60;w&#x60; for weeks. For a precise date range, use &#x60;startDate&#x60; and &#x60;endDate&#x60;. | [optional]
**start_date** | **datetime**| Use with the &#x60;endDate&#x60; parameter. Include the complete time (hours, minutes, and seconds) in UTC time zone, following the ISO 8601 date-time format. See the example for reference. Please note that this parameter can&#39;t be used with &#x60;window&#x60;. | [optional]
**end_date** | **datetime**| Defaults to current time the request is made. Use with the &#x60;startDate&#x60; parameter. Include the complete time (hours, minutes, and seconds) in UTC time zone, following the ISO 8601 date-time format. See the example for reference. Please note that this parameter can&#39;t be used with &#x60;window&#x60;. | [optional]
**cursor** | **str**| (Optional) Opaque cursor used for pagination. Clients should use &#x60;next&#x60; value from &#x60;_links&#x60; instead of this parameter. | [optional]
### Return type
[**AuditUserEvents**](AuditUserEvents.md)
### Authorization
[BearerAuth](../README.md#BearerAuth)
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/hal+json, application/json, application/problem+json
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
**200** | OK | - |
**400** | Bad Request | - |
**401** | Unauthorized | - |
**403** | Insufficient permissions to query endpoint | - |
**404** | Not found | - |
**429** | Exhausted rate limit for the organization | - |
**500** | Internal server error | - |
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

View File

@ -0,0 +1,33 @@
# UserRequest
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**name** | **str** | User&#39;s display name. | [optional]
**email** | **str** | User&#39;s email address. | [optional]
**login_account_group_id** | **str** | Unique ID of the login account group. | [optional]
**account_group_roles** | [**List[UserAccountGroupRole]**](UserAccountGroupRole.md) | | [optional]
**all_account_group_role_ids** | **List[str]** | Unique IDs representing the roles. | [optional]
## Example
```python
from thousandeyes_sdk.admin.models.user_request import UserRequest
# TODO update the JSON string below
json = "{}"
# create an instance of UserRequest from a JSON string
user_request_instance = UserRequest.from_json(json)
# print the JSON string representation of the object
print(UserRequest.to_json())
# convert the object into a dict
user_request_dict = user_request_instance.to_dict()
# create an instance of UserRequest from a dict
user_request_from_dict = UserRequest.from_dict(user_request_dict)
```
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@ -0,0 +1,30 @@
# Users
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**users** | [**List[ExtendedUser]**](ExtendedUser.md) | | [optional]
**links** | [**SelfLinks**](SelfLinks.md) | | [optional]
## Example
```python
from thousandeyes_sdk.admin.models.users import Users
# TODO update the JSON string below
json = "{}"
# create an instance of Users from a JSON string
users_instance = Users.from_json(json)
# print the JSON string representation of the object
print(Users.to_json())
# convert the object into a dict
users_dict = users_instance.to_dict()
# create an instance of Users from a dict
users_from_dict = Users.from_dict(users_dict)
```
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@ -0,0 +1,442 @@
# thousandeyes_sdk.admin.UsersApi
All URIs are relative to *https://api.thousandeyes.com*
Method | HTTP request | Description
------------- | ------------- | -------------
[**create_user**](UsersApi.md#create_user) | **POST** /v7/users | Create user
[**delete_user**](UsersApi.md#delete_user) | **DELETE** /v7/users/{id} | Delete user
[**get_user**](UsersApi.md#get_user) | **GET** /v7/users/{id} | Retrieve user
[**get_users**](UsersApi.md#get_users) | **GET** /v7/users | List users
[**update_user**](UsersApi.md#update_user) | **PUT** /v7/users/{id} | Update user
# **create_user**
> CreatedUser create_user(user_request, aid=aid)
Create user
Creates a new user. The following applies when creating a user: * If the user is already a member of another ThousandEyes customer organization, the user must set their own login account group. * Any update that includes `accountGroupRoles` is a replace-based update and not a delta-based update.
### Example
* Bearer Authentication (BearerAuth):
```python
import thousandeyes_sdk.admin
from thousandeyes_sdk.admin.models.created_user import CreatedUser
from thousandeyes_sdk.admin.models.user_request import UserRequest
from thousandeyes_sdk.admin.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://api.thousandeyes.com
# See configuration.py for a list of all supported configuration parameters.
configuration = thousandeyes_sdk.core.Configuration(
host = "https://api.thousandeyes.com"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure Bearer authorization: BearerAuth
configuration = thousandeyes_sdk.core.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
# Enter a context with an instance of the API client
with thousandeyes_sdk.admin.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = thousandeyes_sdk.admin.UsersApi(api_client)
user_request = thousandeyes_sdk.admin.UserRequest() # UserRequest |
aid = '1234' # str | A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response. (optional)
try:
# Create user
api_response = api_instance.create_user(user_request, aid=aid)
print("The response of UsersApi->create_user:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling UsersApi->create_user: %s\n" % e)
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**user_request** | [**UserRequest**](UserRequest.md)| |
**aid** | **str**| A unique identifier associated with your account group. You can retrieve your &#x60;AccountGroupId&#x60; from the &#x60;/account-groups&#x60; endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response. | [optional]
### Return type
[**CreatedUser**](CreatedUser.md)
### Authorization
[BearerAuth](../README.md#BearerAuth)
### HTTP request headers
- **Content-Type**: application/json
- **Accept**: application/hal+json, application/json, application/problem+json
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
**201** | Created | * Location - <br> |
**400** | Bad Request | - |
**401** | Unauthorized | - |
**403** | Insufficient permissions to query endpoint | - |
**404** | Not found | - |
**429** | Exhausted rate limit for the organization | - |
**500** | Internal server error | - |
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **delete_user**
> delete_user(id, aid=aid)
Delete user
Deletes a user using the user ID. This endpoint requires the `Edit users in all account groups` or `Edit users` permission.
### Example
* Bearer Authentication (BearerAuth):
```python
import thousandeyes_sdk.admin
from thousandeyes_sdk.admin.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://api.thousandeyes.com
# See configuration.py for a list of all supported configuration parameters.
configuration = thousandeyes_sdk.core.Configuration(
host = "https://api.thousandeyes.com"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure Bearer authorization: BearerAuth
configuration = thousandeyes_sdk.core.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
# Enter a context with an instance of the API client
with thousandeyes_sdk.admin.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = thousandeyes_sdk.admin.UsersApi(api_client)
id = '1234' # str | Identifier for the user.
aid = '1234' # str | A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response. (optional)
try:
# Delete user
api_instance.delete_user(id, aid=aid)
except Exception as e:
print("Exception when calling UsersApi->delete_user: %s\n" % e)
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**id** | **str**| Identifier for the user. |
**aid** | **str**| A unique identifier associated with your account group. You can retrieve your &#x60;AccountGroupId&#x60; from the &#x60;/account-groups&#x60; endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response. | [optional]
### Return type
void (empty response body)
### Authorization
[BearerAuth](../README.md#BearerAuth)
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json, application/problem+json
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
**204** | No content | - |
**400** | Bad Request | - |
**401** | Unauthorized | - |
**403** | Insufficient permissions to query endpoint | - |
**404** | Not found | - |
**429** | Exhausted rate limit for the organization | - |
**500** | Internal server error | - |
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **get_user**
> UserDetail get_user(id, aid=aid)
Retrieve user
Retrieves detailed information about a user. This operation requires the `API Access` and `View All Users` permissions.
### Example
* Bearer Authentication (BearerAuth):
```python
import thousandeyes_sdk.admin
from thousandeyes_sdk.admin.models.user_detail import UserDetail
from thousandeyes_sdk.admin.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://api.thousandeyes.com
# See configuration.py for a list of all supported configuration parameters.
configuration = thousandeyes_sdk.core.Configuration(
host = "https://api.thousandeyes.com"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure Bearer authorization: BearerAuth
configuration = thousandeyes_sdk.core.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
# Enter a context with an instance of the API client
with thousandeyes_sdk.admin.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = thousandeyes_sdk.admin.UsersApi(api_client)
id = '1234' # str | Identifier for the user.
aid = '1234' # str | A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response. (optional)
try:
# Retrieve user
api_response = api_instance.get_user(id, aid=aid)
print("The response of UsersApi->get_user:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling UsersApi->get_user: %s\n" % e)
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**id** | **str**| Identifier for the user. |
**aid** | **str**| A unique identifier associated with your account group. You can retrieve your &#x60;AccountGroupId&#x60; from the &#x60;/account-groups&#x60; endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response. | [optional]
### Return type
[**UserDetail**](UserDetail.md)
### Authorization
[BearerAuth](../README.md#BearerAuth)
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/hal+json, application/json, application/problem+json
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
**200** | OK | - |
**400** | Bad Request | - |
**401** | Unauthorized | - |
**403** | Insufficient permissions to query endpoint | - |
**404** | Not found | - |
**429** | Exhausted rate limit for the organization | - |
**500** | Internal server error | - |
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **get_users**
> Users get_users(aid=aid)
List users
Retrieves a list of users in the organization the account group ID belongs to. This operation requires the `API Access` and `View all users` permissions. See [Account Context](https://developer.thousandeyes.com/v7/#/accountcontext) for more information on changing the account group context.
### Example
* Bearer Authentication (BearerAuth):
```python
import thousandeyes_sdk.admin
from thousandeyes_sdk.admin.models.users import Users
from thousandeyes_sdk.admin.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://api.thousandeyes.com
# See configuration.py for a list of all supported configuration parameters.
configuration = thousandeyes_sdk.core.Configuration(
host = "https://api.thousandeyes.com"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure Bearer authorization: BearerAuth
configuration = thousandeyes_sdk.core.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
# Enter a context with an instance of the API client
with thousandeyes_sdk.admin.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = thousandeyes_sdk.admin.UsersApi(api_client)
aid = '1234' # str | A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response. (optional)
try:
# List users
api_response = api_instance.get_users(aid=aid)
print("The response of UsersApi->get_users:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling UsersApi->get_users: %s\n" % e)
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**aid** | **str**| A unique identifier associated with your account group. You can retrieve your &#x60;AccountGroupId&#x60; from the &#x60;/account-groups&#x60; endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response. | [optional]
### Return type
[**Users**](Users.md)
### Authorization
[BearerAuth](../README.md#BearerAuth)
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/hal+json, application/json, application/problem+json
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
**200** | OK | - |
**400** | Bad Request | - |
**401** | Unauthorized | - |
**403** | Insufficient permissions to query endpoint | - |
**404** | Not found | - |
**429** | Exhausted rate limit for the organization | - |
**500** | Internal server error | - |
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **update_user**
> UserDetail update_user(id, user_request, aid=aid)
Update user
Updates a user using the user ID. You can update the user name, email address, account group assignments, or roles. This endpoint requires the `Edit users in all account groups` or `Edit users` permission. When updating a user, the following applies: * When updating a user's email address, the user must confirm the username change before they can subsequently log in or perform API operations. * Any update that includes `accountGroupRoles` is a replace-based update and not a delta-based update.
### Example
* Bearer Authentication (BearerAuth):
```python
import thousandeyes_sdk.admin
from thousandeyes_sdk.admin.models.user_detail import UserDetail
from thousandeyes_sdk.admin.models.user_request import UserRequest
from thousandeyes_sdk.admin.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://api.thousandeyes.com
# See configuration.py for a list of all supported configuration parameters.
configuration = thousandeyes_sdk.core.Configuration(
host = "https://api.thousandeyes.com"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure Bearer authorization: BearerAuth
configuration = thousandeyes_sdk.core.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
# Enter a context with an instance of the API client
with thousandeyes_sdk.admin.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = thousandeyes_sdk.admin.UsersApi(api_client)
id = '1234' # str | Identifier for the user.
user_request = thousandeyes_sdk.admin.UserRequest() # UserRequest |
aid = '1234' # str | A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response. (optional)
try:
# Update user
api_response = api_instance.update_user(id, user_request, aid=aid)
print("The response of UsersApi->update_user:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling UsersApi->update_user: %s\n" % e)
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**id** | **str**| Identifier for the user. |
**user_request** | [**UserRequest**](UserRequest.md)| |
**aid** | **str**| A unique identifier associated with your account group. You can retrieve your &#x60;AccountGroupId&#x60; from the &#x60;/account-groups&#x60; endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response. | [optional]
### Return type
[**UserDetail**](UserDetail.md)
### Authorization
[BearerAuth](../README.md#BearerAuth)
### HTTP request headers
- **Content-Type**: application/json
- **Accept**: application/hal+json, application/json, application/problem+json
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
**200** | OK | - |
**400** | Bad Request | - |
**401** | Unauthorized | - |
**403** | Insufficient permissions to query endpoint | - |
**404** | Not found | - |
**429** | Exhausted rate limit for the organization | - |
**500** | Internal server error | - |
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

View File

@ -0,0 +1,34 @@
# ValidationError
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**type** | **str** | A URI reference that identifies the problem type. When this member is not present, its value is assumed to be \&quot;about:blank\&quot;. | [optional]
**title** | **str** | A short, human-readable summary of the problem type. | [optional]
**status** | **int** | The HTTP status code generated by the origin server for this occurrence of the problem. | [optional]
**detail** | **str** | A human-readable explanation specific to this occurrence of the problem. | [optional]
**instance** | **str** | A URI reference that identifies the specific occurrence of the problem. | [optional]
**errors** | [**List[ValidationErrorItem]**](ValidationErrorItem.md) | (Optional) When multiple errors occur, the details for each error are listed. | [optional]
## Example
```python
from thousandeyes_sdk.admin.models.validation_error import ValidationError
# TODO update the JSON string below
json = "{}"
# create an instance of ValidationError from a JSON string
validation_error_instance = ValidationError.from_json(json)
# print the JSON string representation of the object
print(ValidationError.to_json())
# convert the object into a dict
validation_error_dict = validation_error_instance.to_dict()
# create an instance of ValidationError from a dict
validation_error_from_dict = ValidationError.from_dict(validation_error_dict)
```
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@ -0,0 +1,31 @@
# ValidationErrorItem
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**code** | **str** | (Optional) A unique error type/code that can be referenced in the documentation for further details. | [optional]
**var_field** | **str** | Identifies the field that triggered this particular error. | [optional]
**message** | **str** | A short, human-readable summary of the error. | [optional]
## Example
```python
from thousandeyes_sdk.admin.models.validation_error_item import ValidationErrorItem
# TODO update the JSON string below
json = "{}"
# create an instance of ValidationErrorItem from a JSON string
validation_error_item_instance = ValidationErrorItem.from_json(json)
# print the JSON string representation of the object
print(ValidationErrorItem.to_json())
# convert the object into a dict
validation_error_item_dict = validation_error_item_instance.to_dict()
# create an instance of ValidationErrorItem from a dict
validation_error_item_from_dict = ValidationErrorItem.from_dict(validation_error_item_dict)
```
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@ -0,0 +1,80 @@
[project]
name = "thousandeyes-sdk-administrative"
dynamic = ["version"]
authors = [
{ name = "ThousandEyes API Team", email = "api-team@thousandeyes.com" }
]
description = "Administrative API"
license = { text = "../LICENSE" }
dependencies = [
"urllib3 >= 1.25.3",
"python-dateutil >=2.8.2",
"pydantic >=2",
"typing-extensions >=4.7.1",
"thousandeyes-sdk-core",
]
[tool.setuptools.dynamic]
version = {attr = "thousandeyes_sdk.core.__version__"}
[project.optional-dependencies]
test = [
"pytest~=7.1.3",
"pytest-cov>=2.8.1",
"pytest-randomly>=3.12.0",
"mypy>=1.4.1",
"types-python-dateutil>=2.8.19",
]
dev = [
"flake8>=4.0.0",
"mypy>=1.4.1",
"types-python-dateutil>=2.8.19",
]
[build-system]
requires = ["setuptools"]
build-backend = "setuptools.build_meta"
[tool.setuptools]
include-package-data = true
[tool.pylint.'MESSAGES CONTROL']
extension-pkg-whitelist = "pydantic"
[tool.mypy]
files = [
"src",
#"test", # auto-generated tests
"tests", # hand-written tests
]
# TODO: enable "strict" once all these individual checks are passing
# strict = true
# List from: https://mypy.readthedocs.io/en/stable/existing_code.html#introduce-stricter-options
warn_unused_configs = true
warn_redundant_casts = true
warn_unused_ignores = true
## Getting these passing should be easy
strict_equality = true
strict_concatenate = true
## Strongly recommend enabling this one as soon as you can
check_untyped_defs = true
## These shouldn't be too much additional work, but may be tricky to
## get passing if you use a lot of untyped libraries
disallow_subclassing_any = true
disallow_untyped_decorators = true
disallow_any_generics = true
### These next few are various gradations of forcing use of type annotations
#disallow_untyped_calls = true
#disallow_incomplete_defs = true
#disallow_untyped_defs = true
#
### This one isn't too hard to get passing, but return on investment is lower
#no_implicit_reexport = true
#
### This one can be tricky to get passing if you use a lot of untyped libraries
#warn_return_any = true

View File

@ -0,0 +1,2 @@
[flake8]
max-line-length=99

View File

@ -0,0 +1,70 @@
# coding: utf-8
# flake8: noqa
"""
Administrative API
## Overview Manage users, accounts, and account groups in the ThousandEyes platform using the Administrative API. This API provides the following endpoints that define the operations to manage your organization: * `/account-groups`: Account groups are used to divide an organization into different sections. These endpoints can be used to create, retrieve, update and delete account groups. * `/users`: Create, retrieve, update and delete users within an organization. * `/roles`: Create, retrieve and update roles for the current user. * `/permissions`: Retrieve all assignable permissions. Used in the context of modifying roles. * `/audit-user-events`: Retrieve all activity log events. For more information about the administrative models, see [Account Management](https://docs.thousandeyes.com/product-documentation/user-management).
The version of the OpenAPI document: 7.0.6
Generated by OpenAPI Generator (https://openapi-generator.tech)
Do not edit the class manually.
""" # noqa: E501
# import apis into sdk package
from thousandeyes_sdk.admin.api.account_groups_api import AccountGroupsApi
from thousandeyes_sdk.admin.api.permissions_api import PermissionsApi
from thousandeyes_sdk.admin.api.roles_api import RolesApi
from thousandeyes_sdk.admin.api.user_events_api import UserEventsApi
from thousandeyes_sdk.admin.api.users_api import UsersApi
# import models into sdk package
from thousandeyes_sdk.admin.models.account_group import AccountGroup
from thousandeyes_sdk.admin.models.account_group_detail import AccountGroupDetail
from thousandeyes_sdk.admin.models.account_group_info import AccountGroupInfo
from thousandeyes_sdk.admin.models.account_group_request import AccountGroupRequest
from thousandeyes_sdk.admin.models.account_group_role import AccountGroupRole
from thousandeyes_sdk.admin.models.account_groups import AccountGroups
from thousandeyes_sdk.admin.models.agent import Agent
from thousandeyes_sdk.admin.models.agent_base import AgentBase
from thousandeyes_sdk.admin.models.audit_user_events import AuditUserEvents
from thousandeyes_sdk.admin.models.base_role import BaseRole
from thousandeyes_sdk.admin.models.cloud_enterprise_agent_type import CloudEnterpriseAgentType
from thousandeyes_sdk.admin.models.cluster_member import ClusterMember
from thousandeyes_sdk.admin.models.created_account_group import CreatedAccountGroup
from thousandeyes_sdk.admin.models.created_user import CreatedUser
from thousandeyes_sdk.admin.models.enterprise_agent import EnterpriseAgent
from thousandeyes_sdk.admin.models.enterprise_agent_data import EnterpriseAgentData
from thousandeyes_sdk.admin.models.enterprise_agent_ipv6_policy import EnterpriseAgentIpv6Policy
from thousandeyes_sdk.admin.models.enterprise_agent_state import EnterpriseAgentState
from thousandeyes_sdk.admin.models.error import Error
from thousandeyes_sdk.admin.models.error_detail import ErrorDetail
from thousandeyes_sdk.admin.models.error_detail_code import ErrorDetailCode
from thousandeyes_sdk.admin.models.expand import Expand
from thousandeyes_sdk.admin.models.extended_user import ExtendedUser
from thousandeyes_sdk.admin.models.interface_ip_mapping import InterfaceIpMapping
from thousandeyes_sdk.admin.models.link import Link
from thousandeyes_sdk.admin.models.pagination_links import PaginationLinks
from thousandeyes_sdk.admin.models.permission import Permission
from thousandeyes_sdk.admin.models.permissions import Permissions
from thousandeyes_sdk.admin.models.resource import Resource
from thousandeyes_sdk.admin.models.role import Role
from thousandeyes_sdk.admin.models.role_detail import RoleDetail
from thousandeyes_sdk.admin.models.role_request_body import RoleRequestBody
from thousandeyes_sdk.admin.models.roles import Roles
from thousandeyes_sdk.admin.models.self_links import SelfLinks
from thousandeyes_sdk.admin.models.simple_agent import SimpleAgent
from thousandeyes_sdk.admin.models.unauthorized_error import UnauthorizedError
from thousandeyes_sdk.admin.models.user import User
from thousandeyes_sdk.admin.models.user_account_group import UserAccountGroup
from thousandeyes_sdk.admin.models.user_account_group_role import UserAccountGroupRole
from thousandeyes_sdk.admin.models.user_detail import UserDetail
from thousandeyes_sdk.admin.models.user_event import UserEvent
from thousandeyes_sdk.admin.models.user_request import UserRequest
from thousandeyes_sdk.admin.models.users import Users
from thousandeyes_sdk.admin.models.validation_error import ValidationError
from thousandeyes_sdk.admin.models.validation_error_item import ValidationErrorItem

View File

@ -0,0 +1,9 @@
# flake8: noqa
# import apis into api package
from thousandeyes_sdk.admin.api.account_groups_api import AccountGroupsApi
from thousandeyes_sdk.admin.api.permissions_api import PermissionsApi
from thousandeyes_sdk.admin.api.roles_api import RolesApi
from thousandeyes_sdk.admin.api.user_events_api import UserEventsApi
from thousandeyes_sdk.admin.api.users_api import UsersApi

View File

@ -0,0 +1,325 @@
# coding: utf-8
"""
Administrative API
## Overview Manage users, accounts, and account groups in the ThousandEyes platform using the Administrative API. This API provides the following endpoints that define the operations to manage your organization: * `/account-groups`: Account groups are used to divide an organization into different sections. These endpoints can be used to create, retrieve, update and delete account groups. * `/users`: Create, retrieve, update and delete users within an organization. * `/roles`: Create, retrieve and update roles for the current user. * `/permissions`: Retrieve all assignable permissions. Used in the context of modifying roles. * `/audit-user-events`: Retrieve all activity log events. For more information about the administrative models, see [Account Management](https://docs.thousandeyes.com/product-documentation/user-management).
The version of the OpenAPI document: 7.0.6
Generated by OpenAPI Generator (https://openapi-generator.tech)
Do not edit the class manually.
""" # noqa: E501
import warnings
from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt
from typing import Any, Dict, List, Optional, Tuple, Union
from typing_extensions import Annotated
import thousandeyes_sdk.admin.models
from pydantic import Field, StrictStr
from typing import Optional
from typing_extensions import Annotated
from thousandeyes_sdk.admin.models.permissions import Permissions
from thousandeyes_sdk.core.api_client import ApiClient, RequestSerialized
from thousandeyes_sdk.core.api_response import ApiResponse
from thousandeyes_sdk.core.rest import RESTResponseType
from thousandeyes_sdk.core.version import Version
class PermissionsApi:
"""NOTE: This class is auto generated by OpenAPI Generator
Ref: https://openapi-generator.tech
Do not edit the class manually.
"""
def __init__(self, api_client=None) -> None:
if api_client is None:
api_client = ApiClient.get_default()
api_client.user_agent = "ThousandEyesSDK-Python/{0}".format(Version.get())
self.api_client = api_client
@validate_call
def get_permissions(
self,
aid: Annotated[Optional[StrictStr], Field(description="A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response.")] = None,
_request_timeout: Union[
None,
Annotated[StrictFloat, Field(gt=0)],
Tuple[
Annotated[StrictFloat, Field(gt=0)],
Annotated[StrictFloat, Field(gt=0)]
]
] = None,
_request_auth: Optional[Dict[StrictStr, Any]] = None,
_content_type: Optional[StrictStr] = None,
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
) -> Permissions:
"""List assignable permissions
Users must be in a role assigned management permissions to access this endpoint. Users without management permissions who attempt to access this endpoint receive an HTTP/403 response code.
:param aid: A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response.
:type aid: str
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
:type _request_timeout: int, tuple(int, int), optional
:param _request_auth: set to override the auth_settings for an a single
request; this effectively ignores the
authentication in the spec for a single request.
:type _request_auth: dict, optional
:param _content_type: force content-type for the request.
:type _content_type: str, Optional
:param _headers: set to override the headers for a single
request; this effectively ignores the headers
in the spec for a single request.
:type _headers: dict, optional
:param _host_index: set to override the host_index for a single
request; this effectively ignores the host_index
in the spec for a single request.
:type _host_index: int, optional
:return: Returns the result object.
""" # noqa: E501
_param = self._get_permissions_serialize(
aid=aid,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
_host_index=_host_index
)
_response_types_map: Dict[str, Optional[str]] = {
'200': "Permissions",
'400': "ValidationError",
'401': "UnauthorizedError",
'403': "Error",
'404': "Error",
'429': "Error",
'500': "Error",
}
response_data = self.api_client.call_api(
*_param,
_request_timeout=_request_timeout
)
response_data.read()
return self.api_client.response_deserialize(
response_data=response_data,
response_types_map=_response_types_map,
models=thousandeyes_sdk.admin.models,
).data
@validate_call
def get_permissions_with_http_info(
self,
aid: Annotated[Optional[StrictStr], Field(description="A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response.")] = None,
_request_timeout: Union[
None,
Annotated[StrictFloat, Field(gt=0)],
Tuple[
Annotated[StrictFloat, Field(gt=0)],
Annotated[StrictFloat, Field(gt=0)]
]
] = None,
_request_auth: Optional[Dict[StrictStr, Any]] = None,
_content_type: Optional[StrictStr] = None,
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
) -> ApiResponse[Permissions]:
"""List assignable permissions
Users must be in a role assigned management permissions to access this endpoint. Users without management permissions who attempt to access this endpoint receive an HTTP/403 response code.
:param aid: A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response.
:type aid: str
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
:type _request_timeout: int, tuple(int, int), optional
:param _request_auth: set to override the auth_settings for an a single
request; this effectively ignores the
authentication in the spec for a single request.
:type _request_auth: dict, optional
:param _content_type: force content-type for the request.
:type _content_type: str, Optional
:param _headers: set to override the headers for a single
request; this effectively ignores the headers
in the spec for a single request.
:type _headers: dict, optional
:param _host_index: set to override the host_index for a single
request; this effectively ignores the host_index
in the spec for a single request.
:type _host_index: int, optional
:return: Returns the result object.
""" # noqa: E501
_param = self._get_permissions_serialize(
aid=aid,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
_host_index=_host_index
)
_response_types_map: Dict[str, Optional[str]] = {
'200': "Permissions",
'400': "ValidationError",
'401': "UnauthorizedError",
'403': "Error",
'404': "Error",
'429': "Error",
'500': "Error",
}
response_data = self.api_client.call_api(
*_param,
_request_timeout=_request_timeout
)
response_data.read()
return self.api_client.response_deserialize(
response_data=response_data,
response_types_map=_response_types_map,
models=thousandeyes_sdk.admin.models,
)
@validate_call
def get_permissions_without_preload_content(
self,
aid: Annotated[Optional[StrictStr], Field(description="A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response.")] = None,
_request_timeout: Union[
None,
Annotated[StrictFloat, Field(gt=0)],
Tuple[
Annotated[StrictFloat, Field(gt=0)],
Annotated[StrictFloat, Field(gt=0)]
]
] = None,
_request_auth: Optional[Dict[StrictStr, Any]] = None,
_content_type: Optional[StrictStr] = None,
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
) -> RESTResponseType:
"""List assignable permissions
Users must be in a role assigned management permissions to access this endpoint. Users without management permissions who attempt to access this endpoint receive an HTTP/403 response code.
:param aid: A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response.
:type aid: str
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
:type _request_timeout: int, tuple(int, int), optional
:param _request_auth: set to override the auth_settings for an a single
request; this effectively ignores the
authentication in the spec for a single request.
:type _request_auth: dict, optional
:param _content_type: force content-type for the request.
:type _content_type: str, Optional
:param _headers: set to override the headers for a single
request; this effectively ignores the headers
in the spec for a single request.
:type _headers: dict, optional
:param _host_index: set to override the host_index for a single
request; this effectively ignores the host_index
in the spec for a single request.
:type _host_index: int, optional
:return: Returns the result object.
""" # noqa: E501
_param = self._get_permissions_serialize(
aid=aid,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
_host_index=_host_index
)
_response_types_map: Dict[str, Optional[str]] = {
'200': "Permissions",
'400': "ValidationError",
'401': "UnauthorizedError",
'403': "Error",
'404': "Error",
'429': "Error",
'500': "Error",
}
response_data = self.api_client.call_api(
*_param,
_request_timeout=_request_timeout
)
return response_data.response
def _get_permissions_serialize(
self,
aid,
_request_auth,
_content_type,
_headers,
_host_index,
) -> RequestSerialized:
_host = None
_collection_formats: Dict[str, str] = {
}
_path_params: Dict[str, str] = {}
_query_params: List[Tuple[str, str]] = []
_header_params: Dict[str, Optional[str]] = _headers or {}
_form_params: List[Tuple[str, str]] = []
_files: Dict[str, Union[str, bytes]] = {}
_body_params: Optional[bytes] = None
# process the path parameters
# process the query parameters
if aid is not None:
_query_params.append(('aid', aid))
# process the header parameters
# process the form parameters
# process the body parameter
# set the HTTP header `Accept`
_header_params['Accept'] = self.api_client.select_header_accept(
[
'application/hal+json',
'application/json',
'application/problem+json'
]
)
# authentication setting
_auth_settings: List[str] = [
'BearerAuth'
]
return self.api_client.param_serialize(
method='GET',
resource_path='/v7/permissions',
path_params=_path_params,
query_params=_query_params,
header_params=_header_params,
body=_body_params,
post_params=_form_params,
files=_files,
auth_settings=_auth_settings,
collection_formats=_collection_formats,
_host=_host,
_request_auth=_request_auth
)

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,429 @@
# coding: utf-8
"""
Administrative API
## Overview Manage users, accounts, and account groups in the ThousandEyes platform using the Administrative API. This API provides the following endpoints that define the operations to manage your organization: * `/account-groups`: Account groups are used to divide an organization into different sections. These endpoints can be used to create, retrieve, update and delete account groups. * `/users`: Create, retrieve, update and delete users within an organization. * `/roles`: Create, retrieve and update roles for the current user. * `/permissions`: Retrieve all assignable permissions. Used in the context of modifying roles. * `/audit-user-events`: Retrieve all activity log events. For more information about the administrative models, see [Account Management](https://docs.thousandeyes.com/product-documentation/user-management).
The version of the OpenAPI document: 7.0.6
Generated by OpenAPI Generator (https://openapi-generator.tech)
Do not edit the class manually.
""" # noqa: E501
import warnings
from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt
from typing import Any, Dict, List, Optional, Tuple, Union
from typing_extensions import Annotated
import thousandeyes_sdk.admin.models
from datetime import datetime
from pydantic import Field, StrictBool, StrictStr, field_validator
from typing import Optional
from typing_extensions import Annotated
from thousandeyes_sdk.admin.models.audit_user_events import AuditUserEvents
from thousandeyes_sdk.core.api_client import ApiClient, RequestSerialized
from thousandeyes_sdk.core.api_response import ApiResponse
from thousandeyes_sdk.core.rest import RESTResponseType
from thousandeyes_sdk.core.version import Version
class UserEventsApi:
"""NOTE: This class is auto generated by OpenAPI Generator
Ref: https://openapi-generator.tech
Do not edit the class manually.
"""
def __init__(self, api_client=None) -> None:
if api_client is None:
api_client = ApiClient.get_default()
api_client.user_agent = "ThousandEyesSDK-Python/{0}".format(Version.get())
self.api_client = api_client
@validate_call
def get_user_events(
self,
aid: Annotated[Optional[StrictStr], Field(description="A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response.")] = None,
use_all_permitted_aids: Annotated[Optional[StrictBool], Field(description="Set to `true` to load data from all accounts the user has access to.")] = None,
window: Annotated[Optional[Annotated[str, Field(strict=True)]], Field(description="A dynamic time interval up to the current time of the request. Specify the interval as a number followed by an optional type: `s` for seconds (default if no type is specified), `m` for minutes, `h` for hours, `d` for days, and `w` for weeks. For a precise date range, use `startDate` and `endDate`.")] = None,
start_date: Annotated[Optional[datetime], Field(description="Use with the `endDate` parameter. Include the complete time (hours, minutes, and seconds) in UTC time zone, following the ISO 8601 date-time format. See the example for reference. Please note that this parameter can't be used with `window`.")] = None,
end_date: Annotated[Optional[datetime], Field(description="Defaults to current time the request is made. Use with the `startDate` parameter. Include the complete time (hours, minutes, and seconds) in UTC time zone, following the ISO 8601 date-time format. See the example for reference. Please note that this parameter can't be used with `window`.")] = None,
cursor: Annotated[Optional[StrictStr], Field(description="(Optional) Opaque cursor used for pagination. Clients should use `next` value from `_links` instead of this parameter.")] = None,
_request_timeout: Union[
None,
Annotated[StrictFloat, Field(gt=0)],
Tuple[
Annotated[StrictFloat, Field(gt=0)],
Annotated[StrictFloat, Field(gt=0)]
]
] = None,
_request_auth: Optional[Dict[StrictStr, Any]] = None,
_content_type: Optional[StrictStr] = None,
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
) -> AuditUserEvents:
"""List activity log events
Returns a list of activity log events in the current account group. If `useAllPermittedAids=true` query parameter is passed and the user has permission `View activity log for all users in account group` the logs returned include events across all the account groups they belong to. For more information about changing the account group context, see [Account Context](https://developer.thousandeyes.com/v7/#/accountcontext).
:param aid: A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response.
:type aid: str
:param use_all_permitted_aids: Set to `true` to load data from all accounts the user has access to.
:type use_all_permitted_aids: bool
:param window: A dynamic time interval up to the current time of the request. Specify the interval as a number followed by an optional type: `s` for seconds (default if no type is specified), `m` for minutes, `h` for hours, `d` for days, and `w` for weeks. For a precise date range, use `startDate` and `endDate`.
:type window: str
:param start_date: Use with the `endDate` parameter. Include the complete time (hours, minutes, and seconds) in UTC time zone, following the ISO 8601 date-time format. See the example for reference. Please note that this parameter can't be used with `window`.
:type start_date: datetime
:param end_date: Defaults to current time the request is made. Use with the `startDate` parameter. Include the complete time (hours, minutes, and seconds) in UTC time zone, following the ISO 8601 date-time format. See the example for reference. Please note that this parameter can't be used with `window`.
:type end_date: datetime
:param cursor: (Optional) Opaque cursor used for pagination. Clients should use `next` value from `_links` instead of this parameter.
:type cursor: str
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
:type _request_timeout: int, tuple(int, int), optional
:param _request_auth: set to override the auth_settings for an a single
request; this effectively ignores the
authentication in the spec for a single request.
:type _request_auth: dict, optional
:param _content_type: force content-type for the request.
:type _content_type: str, Optional
:param _headers: set to override the headers for a single
request; this effectively ignores the headers
in the spec for a single request.
:type _headers: dict, optional
:param _host_index: set to override the host_index for a single
request; this effectively ignores the host_index
in the spec for a single request.
:type _host_index: int, optional
:return: Returns the result object.
""" # noqa: E501
_param = self._get_user_events_serialize(
aid=aid,
use_all_permitted_aids=use_all_permitted_aids,
window=window,
start_date=start_date,
end_date=end_date,
cursor=cursor,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
_host_index=_host_index
)
_response_types_map: Dict[str, Optional[str]] = {
'200': "AuditUserEvents",
'400': "ValidationError",
'401': "UnauthorizedError",
'403': "Error",
'404': "Error",
'429': "Error",
'500': "Error",
}
response_data = self.api_client.call_api(
*_param,
_request_timeout=_request_timeout
)
response_data.read()
return self.api_client.response_deserialize(
response_data=response_data,
response_types_map=_response_types_map,
models=thousandeyes_sdk.admin.models,
).data
@validate_call
def get_user_events_with_http_info(
self,
aid: Annotated[Optional[StrictStr], Field(description="A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response.")] = None,
use_all_permitted_aids: Annotated[Optional[StrictBool], Field(description="Set to `true` to load data from all accounts the user has access to.")] = None,
window: Annotated[Optional[Annotated[str, Field(strict=True)]], Field(description="A dynamic time interval up to the current time of the request. Specify the interval as a number followed by an optional type: `s` for seconds (default if no type is specified), `m` for minutes, `h` for hours, `d` for days, and `w` for weeks. For a precise date range, use `startDate` and `endDate`.")] = None,
start_date: Annotated[Optional[datetime], Field(description="Use with the `endDate` parameter. Include the complete time (hours, minutes, and seconds) in UTC time zone, following the ISO 8601 date-time format. See the example for reference. Please note that this parameter can't be used with `window`.")] = None,
end_date: Annotated[Optional[datetime], Field(description="Defaults to current time the request is made. Use with the `startDate` parameter. Include the complete time (hours, minutes, and seconds) in UTC time zone, following the ISO 8601 date-time format. See the example for reference. Please note that this parameter can't be used with `window`.")] = None,
cursor: Annotated[Optional[StrictStr], Field(description="(Optional) Opaque cursor used for pagination. Clients should use `next` value from `_links` instead of this parameter.")] = None,
_request_timeout: Union[
None,
Annotated[StrictFloat, Field(gt=0)],
Tuple[
Annotated[StrictFloat, Field(gt=0)],
Annotated[StrictFloat, Field(gt=0)]
]
] = None,
_request_auth: Optional[Dict[StrictStr, Any]] = None,
_content_type: Optional[StrictStr] = None,
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
) -> ApiResponse[AuditUserEvents]:
"""List activity log events
Returns a list of activity log events in the current account group. If `useAllPermittedAids=true` query parameter is passed and the user has permission `View activity log for all users in account group` the logs returned include events across all the account groups they belong to. For more information about changing the account group context, see [Account Context](https://developer.thousandeyes.com/v7/#/accountcontext).
:param aid: A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response.
:type aid: str
:param use_all_permitted_aids: Set to `true` to load data from all accounts the user has access to.
:type use_all_permitted_aids: bool
:param window: A dynamic time interval up to the current time of the request. Specify the interval as a number followed by an optional type: `s` for seconds (default if no type is specified), `m` for minutes, `h` for hours, `d` for days, and `w` for weeks. For a precise date range, use `startDate` and `endDate`.
:type window: str
:param start_date: Use with the `endDate` parameter. Include the complete time (hours, minutes, and seconds) in UTC time zone, following the ISO 8601 date-time format. See the example for reference. Please note that this parameter can't be used with `window`.
:type start_date: datetime
:param end_date: Defaults to current time the request is made. Use with the `startDate` parameter. Include the complete time (hours, minutes, and seconds) in UTC time zone, following the ISO 8601 date-time format. See the example for reference. Please note that this parameter can't be used with `window`.
:type end_date: datetime
:param cursor: (Optional) Opaque cursor used for pagination. Clients should use `next` value from `_links` instead of this parameter.
:type cursor: str
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
:type _request_timeout: int, tuple(int, int), optional
:param _request_auth: set to override the auth_settings for an a single
request; this effectively ignores the
authentication in the spec for a single request.
:type _request_auth: dict, optional
:param _content_type: force content-type for the request.
:type _content_type: str, Optional
:param _headers: set to override the headers for a single
request; this effectively ignores the headers
in the spec for a single request.
:type _headers: dict, optional
:param _host_index: set to override the host_index for a single
request; this effectively ignores the host_index
in the spec for a single request.
:type _host_index: int, optional
:return: Returns the result object.
""" # noqa: E501
_param = self._get_user_events_serialize(
aid=aid,
use_all_permitted_aids=use_all_permitted_aids,
window=window,
start_date=start_date,
end_date=end_date,
cursor=cursor,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
_host_index=_host_index
)
_response_types_map: Dict[str, Optional[str]] = {
'200': "AuditUserEvents",
'400': "ValidationError",
'401': "UnauthorizedError",
'403': "Error",
'404': "Error",
'429': "Error",
'500': "Error",
}
response_data = self.api_client.call_api(
*_param,
_request_timeout=_request_timeout
)
response_data.read()
return self.api_client.response_deserialize(
response_data=response_data,
response_types_map=_response_types_map,
models=thousandeyes_sdk.admin.models,
)
@validate_call
def get_user_events_without_preload_content(
self,
aid: Annotated[Optional[StrictStr], Field(description="A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response.")] = None,
use_all_permitted_aids: Annotated[Optional[StrictBool], Field(description="Set to `true` to load data from all accounts the user has access to.")] = None,
window: Annotated[Optional[Annotated[str, Field(strict=True)]], Field(description="A dynamic time interval up to the current time of the request. Specify the interval as a number followed by an optional type: `s` for seconds (default if no type is specified), `m` for minutes, `h` for hours, `d` for days, and `w` for weeks. For a precise date range, use `startDate` and `endDate`.")] = None,
start_date: Annotated[Optional[datetime], Field(description="Use with the `endDate` parameter. Include the complete time (hours, minutes, and seconds) in UTC time zone, following the ISO 8601 date-time format. See the example for reference. Please note that this parameter can't be used with `window`.")] = None,
end_date: Annotated[Optional[datetime], Field(description="Defaults to current time the request is made. Use with the `startDate` parameter. Include the complete time (hours, minutes, and seconds) in UTC time zone, following the ISO 8601 date-time format. See the example for reference. Please note that this parameter can't be used with `window`.")] = None,
cursor: Annotated[Optional[StrictStr], Field(description="(Optional) Opaque cursor used for pagination. Clients should use `next` value from `_links` instead of this parameter.")] = None,
_request_timeout: Union[
None,
Annotated[StrictFloat, Field(gt=0)],
Tuple[
Annotated[StrictFloat, Field(gt=0)],
Annotated[StrictFloat, Field(gt=0)]
]
] = None,
_request_auth: Optional[Dict[StrictStr, Any]] = None,
_content_type: Optional[StrictStr] = None,
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
) -> RESTResponseType:
"""List activity log events
Returns a list of activity log events in the current account group. If `useAllPermittedAids=true` query parameter is passed and the user has permission `View activity log for all users in account group` the logs returned include events across all the account groups they belong to. For more information about changing the account group context, see [Account Context](https://developer.thousandeyes.com/v7/#/accountcontext).
:param aid: A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response.
:type aid: str
:param use_all_permitted_aids: Set to `true` to load data from all accounts the user has access to.
:type use_all_permitted_aids: bool
:param window: A dynamic time interval up to the current time of the request. Specify the interval as a number followed by an optional type: `s` for seconds (default if no type is specified), `m` for minutes, `h` for hours, `d` for days, and `w` for weeks. For a precise date range, use `startDate` and `endDate`.
:type window: str
:param start_date: Use with the `endDate` parameter. Include the complete time (hours, minutes, and seconds) in UTC time zone, following the ISO 8601 date-time format. See the example for reference. Please note that this parameter can't be used with `window`.
:type start_date: datetime
:param end_date: Defaults to current time the request is made. Use with the `startDate` parameter. Include the complete time (hours, minutes, and seconds) in UTC time zone, following the ISO 8601 date-time format. See the example for reference. Please note that this parameter can't be used with `window`.
:type end_date: datetime
:param cursor: (Optional) Opaque cursor used for pagination. Clients should use `next` value from `_links` instead of this parameter.
:type cursor: str
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
:type _request_timeout: int, tuple(int, int), optional
:param _request_auth: set to override the auth_settings for an a single
request; this effectively ignores the
authentication in the spec for a single request.
:type _request_auth: dict, optional
:param _content_type: force content-type for the request.
:type _content_type: str, Optional
:param _headers: set to override the headers for a single
request; this effectively ignores the headers
in the spec for a single request.
:type _headers: dict, optional
:param _host_index: set to override the host_index for a single
request; this effectively ignores the host_index
in the spec for a single request.
:type _host_index: int, optional
:return: Returns the result object.
""" # noqa: E501
_param = self._get_user_events_serialize(
aid=aid,
use_all_permitted_aids=use_all_permitted_aids,
window=window,
start_date=start_date,
end_date=end_date,
cursor=cursor,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
_host_index=_host_index
)
_response_types_map: Dict[str, Optional[str]] = {
'200': "AuditUserEvents",
'400': "ValidationError",
'401': "UnauthorizedError",
'403': "Error",
'404': "Error",
'429': "Error",
'500': "Error",
}
response_data = self.api_client.call_api(
*_param,
_request_timeout=_request_timeout
)
return response_data.response
def _get_user_events_serialize(
self,
aid,
use_all_permitted_aids,
window,
start_date,
end_date,
cursor,
_request_auth,
_content_type,
_headers,
_host_index,
) -> RequestSerialized:
_host = None
_collection_formats: Dict[str, str] = {
}
_path_params: Dict[str, str] = {}
_query_params: List[Tuple[str, str]] = []
_header_params: Dict[str, Optional[str]] = _headers or {}
_form_params: List[Tuple[str, str]] = []
_files: Dict[str, Union[str, bytes]] = {}
_body_params: Optional[bytes] = None
# process the path parameters
# process the query parameters
if aid is not None:
_query_params.append(('aid', aid))
if use_all_permitted_aids is not None:
_query_params.append(('useAllPermittedAids', use_all_permitted_aids))
if window is not None:
_query_params.append(('window', window))
if start_date is not None:
if isinstance(start_date, datetime):
_query_params.append(
(
'startDate',
start_date.strftime(
self.api_client.configuration.datetime_format
)
)
)
else:
_query_params.append(('startDate', start_date))
if end_date is not None:
if isinstance(end_date, datetime):
_query_params.append(
(
'endDate',
end_date.strftime(
self.api_client.configuration.datetime_format
)
)
)
else:
_query_params.append(('endDate', end_date))
if cursor is not None:
_query_params.append(('cursor', cursor))
# process the header parameters
# process the form parameters
# process the body parameter
# set the HTTP header `Accept`
_header_params['Accept'] = self.api_client.select_header_accept(
[
'application/hal+json',
'application/json',
'application/problem+json'
]
)
# authentication setting
_auth_settings: List[str] = [
'BearerAuth'
]
return self.api_client.param_serialize(
method='GET',
resource_path='/v7/audit-user-events',
path_params=_path_params,
query_params=_query_params,
header_params=_header_params,
body=_body_params,
post_params=_form_params,
files=_files,
auth_settings=_auth_settings,
collection_formats=_collection_formats,
_host=_host,
_request_auth=_request_auth
)

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,61 @@
# coding: utf-8
# flake8: noqa
"""
Administrative API
## Overview Manage users, accounts, and account groups in the ThousandEyes platform using the Administrative API. This API provides the following endpoints that define the operations to manage your organization: * `/account-groups`: Account groups are used to divide an organization into different sections. These endpoints can be used to create, retrieve, update and delete account groups. * `/users`: Create, retrieve, update and delete users within an organization. * `/roles`: Create, retrieve and update roles for the current user. * `/permissions`: Retrieve all assignable permissions. Used in the context of modifying roles. * `/audit-user-events`: Retrieve all activity log events. For more information about the administrative models, see [Account Management](https://docs.thousandeyes.com/product-documentation/user-management).
The version of the OpenAPI document: 7.0.6
Generated by OpenAPI Generator (https://openapi-generator.tech)
Do not edit the class manually.
""" # noqa: E501
# import models into model package
from thousandeyes_sdk.admin.models.account_group import AccountGroup
from thousandeyes_sdk.admin.models.account_group_detail import AccountGroupDetail
from thousandeyes_sdk.admin.models.account_group_info import AccountGroupInfo
from thousandeyes_sdk.admin.models.account_group_request import AccountGroupRequest
from thousandeyes_sdk.admin.models.account_group_role import AccountGroupRole
from thousandeyes_sdk.admin.models.account_groups import AccountGroups
from thousandeyes_sdk.admin.models.agent import Agent
from thousandeyes_sdk.admin.models.agent_base import AgentBase
from thousandeyes_sdk.admin.models.audit_user_events import AuditUserEvents
from thousandeyes_sdk.admin.models.base_role import BaseRole
from thousandeyes_sdk.admin.models.cloud_enterprise_agent_type import CloudEnterpriseAgentType
from thousandeyes_sdk.admin.models.cluster_member import ClusterMember
from thousandeyes_sdk.admin.models.created_account_group import CreatedAccountGroup
from thousandeyes_sdk.admin.models.created_user import CreatedUser
from thousandeyes_sdk.admin.models.enterprise_agent import EnterpriseAgent
from thousandeyes_sdk.admin.models.enterprise_agent_data import EnterpriseAgentData
from thousandeyes_sdk.admin.models.enterprise_agent_ipv6_policy import EnterpriseAgentIpv6Policy
from thousandeyes_sdk.admin.models.enterprise_agent_state import EnterpriseAgentState
from thousandeyes_sdk.admin.models.error import Error
from thousandeyes_sdk.admin.models.error_detail import ErrorDetail
from thousandeyes_sdk.admin.models.error_detail_code import ErrorDetailCode
from thousandeyes_sdk.admin.models.expand import Expand
from thousandeyes_sdk.admin.models.extended_user import ExtendedUser
from thousandeyes_sdk.admin.models.interface_ip_mapping import InterfaceIpMapping
from thousandeyes_sdk.admin.models.link import Link
from thousandeyes_sdk.admin.models.pagination_links import PaginationLinks
from thousandeyes_sdk.admin.models.permission import Permission
from thousandeyes_sdk.admin.models.permissions import Permissions
from thousandeyes_sdk.admin.models.resource import Resource
from thousandeyes_sdk.admin.models.role import Role
from thousandeyes_sdk.admin.models.role_detail import RoleDetail
from thousandeyes_sdk.admin.models.role_request_body import RoleRequestBody
from thousandeyes_sdk.admin.models.roles import Roles
from thousandeyes_sdk.admin.models.self_links import SelfLinks
from thousandeyes_sdk.admin.models.simple_agent import SimpleAgent
from thousandeyes_sdk.admin.models.unauthorized_error import UnauthorizedError
from thousandeyes_sdk.admin.models.user import User
from thousandeyes_sdk.admin.models.user_account_group import UserAccountGroup
from thousandeyes_sdk.admin.models.user_account_group_role import UserAccountGroupRole
from thousandeyes_sdk.admin.models.user_detail import UserDetail
from thousandeyes_sdk.admin.models.user_event import UserEvent
from thousandeyes_sdk.admin.models.user_request import UserRequest
from thousandeyes_sdk.admin.models.users import Users
from thousandeyes_sdk.admin.models.validation_error import ValidationError
from thousandeyes_sdk.admin.models.validation_error_item import ValidationErrorItem

View File

@ -0,0 +1,90 @@
# coding: utf-8
"""
Administrative API
## Overview Manage users, accounts, and account groups in the ThousandEyes platform using the Administrative API. This API provides the following endpoints that define the operations to manage your organization: * `/account-groups`: Account groups are used to divide an organization into different sections. These endpoints can be used to create, retrieve, update and delete account groups. * `/users`: Create, retrieve, update and delete users within an organization. * `/roles`: Create, retrieve and update roles for the current user. * `/permissions`: Retrieve all assignable permissions. Used in the context of modifying roles. * `/audit-user-events`: Retrieve all activity log events. For more information about the administrative models, see [Account Management](https://docs.thousandeyes.com/product-documentation/user-management).
The version of the OpenAPI document: 7.0.6
Generated by OpenAPI Generator (https://openapi-generator.tech)
Do not edit the class manually.
""" # noqa: E501
from __future__ import annotations
import pprint
import re # noqa: F401
import json
from pydantic import BaseModel, ConfigDict, Field, StrictStr
from typing import Any, ClassVar, Dict, List, Optional
from typing import Optional, Set
from typing_extensions import Self
class AccountGroup(BaseModel):
"""
AccountGroup
""" # noqa: E501
aid: Optional[StrictStr] = Field(default=None, description="A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint.")
account_group_name: Optional[StrictStr] = Field(default=None, description="Account group name", alias="accountGroupName")
__properties: ClassVar[List[str]] = ["aid", "accountGroupName"]
model_config = ConfigDict(
populate_by_name=True,
validate_assignment=True,
protected_namespaces=(),
extra="allow",
)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True)
@classmethod
def from_json(cls, json_str: str) -> Optional[Self]:
"""Create an instance of AccountGroup from a JSON string"""
return cls.from_dict(json.loads(json_str))
def to_dict(self) -> Dict[str, Any]:
"""Return the dictionary representation of the model using alias.
This has the following differences from calling pydantic's
`self.model_dump(by_alias=True)`:
* `None` is only added to the output dict for nullable fields that
were set at model initialization. Other fields with value `None`
are ignored.
"""
excluded_fields: Set[str] = set([
])
_dict = self.model_dump(
by_alias=True,
exclude=excluded_fields,
exclude_none=True,
)
return _dict
@classmethod
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
"""Create an instance of AccountGroup from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
return cls.model_validate(obj)
_obj = cls.model_validate({
"aid": obj.get("aid"),
"accountGroupName": obj.get("accountGroupName")
})
return _obj

View File

@ -0,0 +1,122 @@
# coding: utf-8
"""
Administrative API
## Overview Manage users, accounts, and account groups in the ThousandEyes platform using the Administrative API. This API provides the following endpoints that define the operations to manage your organization: * `/account-groups`: Account groups are used to divide an organization into different sections. These endpoints can be used to create, retrieve, update and delete account groups. * `/users`: Create, retrieve, update and delete users within an organization. * `/roles`: Create, retrieve and update roles for the current user. * `/permissions`: Retrieve all assignable permissions. Used in the context of modifying roles. * `/audit-user-events`: Retrieve all activity log events. For more information about the administrative models, see [Account Management](https://docs.thousandeyes.com/product-documentation/user-management).
The version of the OpenAPI document: 7.0.6
Generated by OpenAPI Generator (https://openapi-generator.tech)
Do not edit the class manually.
""" # noqa: E501
from __future__ import annotations
import pprint
import re # noqa: F401
import json
from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr
from typing import Any, ClassVar, Dict, List, Optional
from thousandeyes_sdk.admin.models.enterprise_agent import EnterpriseAgent
from thousandeyes_sdk.admin.models.self_links import SelfLinks
from thousandeyes_sdk.admin.models.user_account_group import UserAccountGroup
from typing import Optional, Set
from typing_extensions import Self
class AccountGroupDetail(BaseModel):
"""
AccountGroupDetail
""" # noqa: E501
aid: Optional[StrictStr] = Field(default=None, description="A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint.")
account_group_name: Optional[StrictStr] = Field(default=None, description="Account group name", alias="accountGroupName")
is_current_account_group: Optional[StrictBool] = Field(default=None, description="Indicates whether the requested aid is the context of the current account.", alias="isCurrentAccountGroup")
is_default_account_group: Optional[StrictBool] = Field(default=None, description="Indicates whether the aid is the default one for the requesting user.", alias="isDefaultAccountGroup")
organization_name: Optional[StrictStr] = Field(default=None, description="(Optional) Indicates whether the aid is the default one for the requesting user.", alias="organizationName")
users: Optional[List[UserAccountGroup]] = None
links: Optional[SelfLinks] = Field(default=None, alias="_links")
agents: Optional[List[EnterpriseAgent]] = None
__properties: ClassVar[List[str]] = ["aid", "accountGroupName", "isCurrentAccountGroup", "isDefaultAccountGroup", "organizationName", "users", "_links", "agents"]
model_config = ConfigDict(
populate_by_name=True,
validate_assignment=True,
protected_namespaces=(),
extra="allow",
)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True)
@classmethod
def from_json(cls, json_str: str) -> Optional[Self]:
"""Create an instance of AccountGroupDetail from a JSON string"""
return cls.from_dict(json.loads(json_str))
def to_dict(self) -> Dict[str, Any]:
"""Return the dictionary representation of the model using alias.
This has the following differences from calling pydantic's
`self.model_dump(by_alias=True)`:
* `None` is only added to the output dict for nullable fields that
were set at model initialization. Other fields with value `None`
are ignored.
"""
excluded_fields: Set[str] = set([
])
_dict = self.model_dump(
by_alias=True,
exclude=excluded_fields,
exclude_none=True,
)
# override the default output from pydantic by calling `to_dict()` of each item in users (list)
_items = []
if self.users:
for _item in self.users:
if _item:
_items.append(_item.to_dict())
_dict['users'] = _items
# override the default output from pydantic by calling `to_dict()` of links
if self.links:
_dict['_links'] = self.links.to_dict()
# override the default output from pydantic by calling `to_dict()` of each item in agents (list)
_items = []
if self.agents:
for _item in self.agents:
if _item:
_items.append(_item.to_dict())
_dict['agents'] = _items
return _dict
@classmethod
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
"""Create an instance of AccountGroupDetail from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
return cls.model_validate(obj)
_obj = cls.model_validate({
"aid": obj.get("aid"),
"accountGroupName": obj.get("accountGroupName"),
"isCurrentAccountGroup": obj.get("isCurrentAccountGroup"),
"isDefaultAccountGroup": obj.get("isDefaultAccountGroup"),
"organizationName": obj.get("organizationName"),
"users": [UserAccountGroup.from_dict(_item) for _item in obj["users"]] if obj.get("users") is not None else None,
"_links": SelfLinks.from_dict(obj["_links"]) if obj.get("_links") is not None else None,
"agents": [EnterpriseAgent.from_dict(_item) for _item in obj["agents"]] if obj.get("agents") is not None else None
})
return _obj

View File

@ -0,0 +1,96 @@
# coding: utf-8
"""
Administrative API
## Overview Manage users, accounts, and account groups in the ThousandEyes platform using the Administrative API. This API provides the following endpoints that define the operations to manage your organization: * `/account-groups`: Account groups are used to divide an organization into different sections. These endpoints can be used to create, retrieve, update and delete account groups. * `/users`: Create, retrieve, update and delete users within an organization. * `/roles`: Create, retrieve and update roles for the current user. * `/permissions`: Retrieve all assignable permissions. Used in the context of modifying roles. * `/audit-user-events`: Retrieve all activity log events. For more information about the administrative models, see [Account Management](https://docs.thousandeyes.com/product-documentation/user-management).
The version of the OpenAPI document: 7.0.6
Generated by OpenAPI Generator (https://openapi-generator.tech)
Do not edit the class manually.
""" # noqa: E501
from __future__ import annotations
import pprint
import re # noqa: F401
import json
from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr
from typing import Any, ClassVar, Dict, List, Optional
from typing import Optional, Set
from typing_extensions import Self
class AccountGroupInfo(BaseModel):
"""
AccountGroupInfo
""" # noqa: E501
aid: Optional[StrictStr] = Field(default=None, description="A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint.")
account_group_name: Optional[StrictStr] = Field(default=None, description="Account group name", alias="accountGroupName")
is_current_account_group: Optional[StrictBool] = Field(default=None, description="Indicates whether the requested aid is the context of the current account.", alias="isCurrentAccountGroup")
is_default_account_group: Optional[StrictBool] = Field(default=None, description="Indicates whether the aid is the default one for the requesting user.", alias="isDefaultAccountGroup")
organization_name: Optional[StrictStr] = Field(default=None, description="(Optional) Indicates whether the aid is the default one for the requesting user.", alias="organizationName")
__properties: ClassVar[List[str]] = ["aid", "accountGroupName", "isCurrentAccountGroup", "isDefaultAccountGroup", "organizationName"]
model_config = ConfigDict(
populate_by_name=True,
validate_assignment=True,
protected_namespaces=(),
extra="allow",
)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True)
@classmethod
def from_json(cls, json_str: str) -> Optional[Self]:
"""Create an instance of AccountGroupInfo from a JSON string"""
return cls.from_dict(json.loads(json_str))
def to_dict(self) -> Dict[str, Any]:
"""Return the dictionary representation of the model using alias.
This has the following differences from calling pydantic's
`self.model_dump(by_alias=True)`:
* `None` is only added to the output dict for nullable fields that
were set at model initialization. Other fields with value `None`
are ignored.
"""
excluded_fields: Set[str] = set([
])
_dict = self.model_dump(
by_alias=True,
exclude=excluded_fields,
exclude_none=True,
)
return _dict
@classmethod
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
"""Create an instance of AccountGroupInfo from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
return cls.model_validate(obj)
_obj = cls.model_validate({
"aid": obj.get("aid"),
"accountGroupName": obj.get("accountGroupName"),
"isCurrentAccountGroup": obj.get("isCurrentAccountGroup"),
"isDefaultAccountGroup": obj.get("isDefaultAccountGroup"),
"organizationName": obj.get("organizationName")
})
return _obj

View File

@ -0,0 +1,90 @@
# coding: utf-8
"""
Administrative API
## Overview Manage users, accounts, and account groups in the ThousandEyes platform using the Administrative API. This API provides the following endpoints that define the operations to manage your organization: * `/account-groups`: Account groups are used to divide an organization into different sections. These endpoints can be used to create, retrieve, update and delete account groups. * `/users`: Create, retrieve, update and delete users within an organization. * `/roles`: Create, retrieve and update roles for the current user. * `/permissions`: Retrieve all assignable permissions. Used in the context of modifying roles. * `/audit-user-events`: Retrieve all activity log events. For more information about the administrative models, see [Account Management](https://docs.thousandeyes.com/product-documentation/user-management).
The version of the OpenAPI document: 7.0.6
Generated by OpenAPI Generator (https://openapi-generator.tech)
Do not edit the class manually.
""" # noqa: E501
from __future__ import annotations
import pprint
import re # noqa: F401
import json
from pydantic import BaseModel, ConfigDict, Field, StrictStr
from typing import Any, ClassVar, Dict, List, Optional
from typing import Optional, Set
from typing_extensions import Self
class AccountGroupRequest(BaseModel):
"""
AccountGroupRequest
""" # noqa: E501
account_group_name: StrictStr = Field(description="The name of the account group", alias="accountGroupName")
agents: Optional[List[StrictStr]] = Field(default=None, description="To grant access to enterprise agents, specify the agent list. Note that this is not an additive list - the full list must be specified if changing access to agents.")
__properties: ClassVar[List[str]] = ["accountGroupName", "agents"]
model_config = ConfigDict(
populate_by_name=True,
validate_assignment=True,
protected_namespaces=(),
extra="allow",
)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True)
@classmethod
def from_json(cls, json_str: str) -> Optional[Self]:
"""Create an instance of AccountGroupRequest from a JSON string"""
return cls.from_dict(json.loads(json_str))
def to_dict(self) -> Dict[str, Any]:
"""Return the dictionary representation of the model using alias.
This has the following differences from calling pydantic's
`self.model_dump(by_alias=True)`:
* `None` is only added to the output dict for nullable fields that
were set at model initialization. Other fields with value `None`
are ignored.
"""
excluded_fields: Set[str] = set([
])
_dict = self.model_dump(
by_alias=True,
exclude=excluded_fields,
exclude_none=True,
)
return _dict
@classmethod
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
"""Create an instance of AccountGroupRequest from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
return cls.model_validate(obj)
_obj = cls.model_validate({
"accountGroupName": obj.get("accountGroupName"),
"agents": obj.get("agents")
})
return _obj

View File

@ -0,0 +1,102 @@
# coding: utf-8
"""
Administrative API
## Overview Manage users, accounts, and account groups in the ThousandEyes platform using the Administrative API. This API provides the following endpoints that define the operations to manage your organization: * `/account-groups`: Account groups are used to divide an organization into different sections. These endpoints can be used to create, retrieve, update and delete account groups. * `/users`: Create, retrieve, update and delete users within an organization. * `/roles`: Create, retrieve and update roles for the current user. * `/permissions`: Retrieve all assignable permissions. Used in the context of modifying roles. * `/audit-user-events`: Retrieve all activity log events. For more information about the administrative models, see [Account Management](https://docs.thousandeyes.com/product-documentation/user-management).
The version of the OpenAPI document: 7.0.6
Generated by OpenAPI Generator (https://openapi-generator.tech)
Do not edit the class manually.
""" # noqa: E501
from __future__ import annotations
import pprint
import re # noqa: F401
import json
from pydantic import BaseModel, ConfigDict, Field
from typing import Any, ClassVar, Dict, List, Optional
from thousandeyes_sdk.admin.models.account_group import AccountGroup
from thousandeyes_sdk.admin.models.role import Role
from typing import Optional, Set
from typing_extensions import Self
class AccountGroupRole(BaseModel):
"""
AccountGroupRole
""" # noqa: E501
account_group: Optional[AccountGroup] = Field(default=None, alias="accountGroup")
roles: Optional[List[Role]] = None
__properties: ClassVar[List[str]] = ["accountGroup", "roles"]
model_config = ConfigDict(
populate_by_name=True,
validate_assignment=True,
protected_namespaces=(),
extra="allow",
)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True)
@classmethod
def from_json(cls, json_str: str) -> Optional[Self]:
"""Create an instance of AccountGroupRole from a JSON string"""
return cls.from_dict(json.loads(json_str))
def to_dict(self) -> Dict[str, Any]:
"""Return the dictionary representation of the model using alias.
This has the following differences from calling pydantic's
`self.model_dump(by_alias=True)`:
* `None` is only added to the output dict for nullable fields that
were set at model initialization. Other fields with value `None`
are ignored.
"""
excluded_fields: Set[str] = set([
])
_dict = self.model_dump(
by_alias=True,
exclude=excluded_fields,
exclude_none=True,
)
# override the default output from pydantic by calling `to_dict()` of account_group
if self.account_group:
_dict['accountGroup'] = self.account_group.to_dict()
# override the default output from pydantic by calling `to_dict()` of each item in roles (list)
_items = []
if self.roles:
for _item in self.roles:
if _item:
_items.append(_item.to_dict())
_dict['roles'] = _items
return _dict
@classmethod
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
"""Create an instance of AccountGroupRole from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
return cls.model_validate(obj)
_obj = cls.model_validate({
"accountGroup": AccountGroup.from_dict(obj["accountGroup"]) if obj.get("accountGroup") is not None else None,
"roles": [Role.from_dict(_item) for _item in obj["roles"]] if obj.get("roles") is not None else None
})
return _obj

View File

@ -0,0 +1,102 @@
# coding: utf-8
"""
Administrative API
## Overview Manage users, accounts, and account groups in the ThousandEyes platform using the Administrative API. This API provides the following endpoints that define the operations to manage your organization: * `/account-groups`: Account groups are used to divide an organization into different sections. These endpoints can be used to create, retrieve, update and delete account groups. * `/users`: Create, retrieve, update and delete users within an organization. * `/roles`: Create, retrieve and update roles for the current user. * `/permissions`: Retrieve all assignable permissions. Used in the context of modifying roles. * `/audit-user-events`: Retrieve all activity log events. For more information about the administrative models, see [Account Management](https://docs.thousandeyes.com/product-documentation/user-management).
The version of the OpenAPI document: 7.0.6
Generated by OpenAPI Generator (https://openapi-generator.tech)
Do not edit the class manually.
""" # noqa: E501
from __future__ import annotations
import pprint
import re # noqa: F401
import json
from pydantic import BaseModel, ConfigDict, Field
from typing import Any, ClassVar, Dict, List, Optional
from thousandeyes_sdk.admin.models.account_group_info import AccountGroupInfo
from thousandeyes_sdk.admin.models.self_links import SelfLinks
from typing import Optional, Set
from typing_extensions import Self
class AccountGroups(BaseModel):
"""
AccountGroups
""" # noqa: E501
account_groups: Optional[List[AccountGroupInfo]] = Field(default=None, alias="accountGroups")
links: Optional[SelfLinks] = Field(default=None, alias="_links")
__properties: ClassVar[List[str]] = ["accountGroups", "_links"]
model_config = ConfigDict(
populate_by_name=True,
validate_assignment=True,
protected_namespaces=(),
extra="allow",
)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True)
@classmethod
def from_json(cls, json_str: str) -> Optional[Self]:
"""Create an instance of AccountGroups from a JSON string"""
return cls.from_dict(json.loads(json_str))
def to_dict(self) -> Dict[str, Any]:
"""Return the dictionary representation of the model using alias.
This has the following differences from calling pydantic's
`self.model_dump(by_alias=True)`:
* `None` is only added to the output dict for nullable fields that
were set at model initialization. Other fields with value `None`
are ignored.
"""
excluded_fields: Set[str] = set([
])
_dict = self.model_dump(
by_alias=True,
exclude=excluded_fields,
exclude_none=True,
)
# override the default output from pydantic by calling `to_dict()` of each item in account_groups (list)
_items = []
if self.account_groups:
for _item in self.account_groups:
if _item:
_items.append(_item.to_dict())
_dict['accountGroups'] = _items
# override the default output from pydantic by calling `to_dict()` of links
if self.links:
_dict['_links'] = self.links.to_dict()
return _dict
@classmethod
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
"""Create an instance of AccountGroups from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
return cls.model_validate(obj)
_obj = cls.model_validate({
"accountGroups": [AccountGroupInfo.from_dict(_item) for _item in obj["accountGroups"]] if obj.get("accountGroups") is not None else None,
"_links": SelfLinks.from_dict(obj["_links"]) if obj.get("_links") is not None else None
})
return _obj

View File

@ -0,0 +1,125 @@
# coding: utf-8
"""
Administrative API
## Overview Manage users, accounts, and account groups in the ThousandEyes platform using the Administrative API. This API provides the following endpoints that define the operations to manage your organization: * `/account-groups`: Account groups are used to divide an organization into different sections. These endpoints can be used to create, retrieve, update and delete account groups. * `/users`: Create, retrieve, update and delete users within an organization. * `/roles`: Create, retrieve and update roles for the current user. * `/permissions`: Retrieve all assignable permissions. Used in the context of modifying roles. * `/audit-user-events`: Retrieve all activity log events. For more information about the administrative models, see [Account Management](https://docs.thousandeyes.com/product-documentation/user-management).
The version of the OpenAPI document: 7.0.6
Generated by OpenAPI Generator (https://openapi-generator.tech)
Do not edit the class manually.
""" # noqa: E501
from __future__ import annotations
import pprint
import re # noqa: F401
import json
from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr
from typing import Any, ClassVar, Dict, List, Optional
from thousandeyes_sdk.admin.models.cloud_enterprise_agent_type import CloudEnterpriseAgentType
from typing import Optional, Set
from typing_extensions import Self
class Agent(BaseModel):
"""
Agent
""" # noqa: E501
ip_addresses: Optional[List[StrictStr]] = Field(default=None, description="Array of private IP addresses.", alias="ipAddresses")
public_ip_addresses: Optional[List[StrictStr]] = Field(default=None, description="Array of public IP addresses.", alias="publicIpAddresses")
network: Optional[StrictStr] = Field(default=None, description="Network (including ASN) of agents public IP.")
agent_id: Optional[StrictStr] = Field(default=None, description="Unique ID of the agent.", alias="agentId")
agent_name: Optional[StrictStr] = Field(default=None, description="Name of the agent.", alias="agentName")
location: Optional[StrictStr] = Field(default=None, description="Location of the agent.")
country_id: Optional[StrictStr] = Field(default=None, description="2-digit ISO country code", alias="countryId")
enabled: Optional[StrictBool] = Field(default=None, description="Flag indicating if the agent is enabled.")
prefix: Optional[StrictStr] = Field(default=None, description="Prefix containing agents public IP address.")
verify_ssl_certificates: Optional[StrictBool] = Field(default=None, description="Flag indicating if has normal SSL operations or if instead it's set to ignore SSL errors on browserbot-based tests.", alias="verifySslCertificates")
agent_type: CloudEnterpriseAgentType = Field(alias="agentType")
__properties: ClassVar[List[str]] = ["ipAddresses", "publicIpAddresses", "network", "agentId", "agentName", "location", "countryId", "enabled", "prefix", "verifySslCertificates", "agentType"]
model_config = ConfigDict(
populate_by_name=True,
validate_assignment=True,
protected_namespaces=(),
extra="allow",
)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True)
@classmethod
def from_json(cls, json_str: str) -> Optional[Self]:
"""Create an instance of Agent from a JSON string"""
return cls.from_dict(json.loads(json_str))
def to_dict(self) -> Dict[str, Any]:
"""Return the dictionary representation of the model using alias.
This has the following differences from calling pydantic's
`self.model_dump(by_alias=True)`:
* `None` is only added to the output dict for nullable fields that
were set at model initialization. Other fields with value `None`
are ignored.
* OpenAPI `readOnly` fields are excluded.
* OpenAPI `readOnly` fields are excluded.
* OpenAPI `readOnly` fields are excluded.
* OpenAPI `readOnly` fields are excluded.
* OpenAPI `readOnly` fields are excluded.
* OpenAPI `readOnly` fields are excluded.
* OpenAPI `readOnly` fields are excluded.
* OpenAPI `readOnly` fields are excluded.
"""
excluded_fields: Set[str] = set([
"ip_addresses",
"public_ip_addresses",
"network",
"agent_id",
"location",
"country_id",
"prefix",
"verify_ssl_certificates",
])
_dict = self.model_dump(
by_alias=True,
exclude=excluded_fields,
exclude_none=True,
)
return _dict
@classmethod
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
"""Create an instance of Agent from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
return cls.model_validate(obj)
_obj = cls.model_validate({
"ipAddresses": obj.get("ipAddresses"),
"publicIpAddresses": obj.get("publicIpAddresses"),
"network": obj.get("network"),
"agentId": obj.get("agentId"),
"agentName": obj.get("agentName"),
"location": obj.get("location"),
"countryId": obj.get("countryId"),
"enabled": obj.get("enabled"),
"prefix": obj.get("prefix"),
"verifySslCertificates": obj.get("verifySslCertificates"),
"agentType": obj.get("agentType")
})
return _obj

View File

@ -0,0 +1,98 @@
# coding: utf-8
"""
Administrative API
## Overview Manage users, accounts, and account groups in the ThousandEyes platform using the Administrative API. This API provides the following endpoints that define the operations to manage your organization: * `/account-groups`: Account groups are used to divide an organization into different sections. These endpoints can be used to create, retrieve, update and delete account groups. * `/users`: Create, retrieve, update and delete users within an organization. * `/roles`: Create, retrieve and update roles for the current user. * `/permissions`: Retrieve all assignable permissions. Used in the context of modifying roles. * `/audit-user-events`: Retrieve all activity log events. For more information about the administrative models, see [Account Management](https://docs.thousandeyes.com/product-documentation/user-management).
The version of the OpenAPI document: 7.0.6
Generated by OpenAPI Generator (https://openapi-generator.tech)
Do not edit the class manually.
""" # noqa: E501
from __future__ import annotations
import pprint
import re # noqa: F401
import json
from pydantic import BaseModel, ConfigDict, Field, StrictStr
from typing import Any, ClassVar, Dict, List, Optional
from typing import Optional, Set
from typing_extensions import Self
class AgentBase(BaseModel):
"""
AgentBase
""" # noqa: E501
ip_addresses: Optional[List[StrictStr]] = Field(default=None, description="Array of private IP addresses.", alias="ipAddresses")
public_ip_addresses: Optional[List[StrictStr]] = Field(default=None, description="Array of public IP addresses.", alias="publicIpAddresses")
network: Optional[StrictStr] = Field(default=None, description="Network (including ASN) of agents public IP.")
__properties: ClassVar[List[str]] = ["ipAddresses", "publicIpAddresses", "network"]
model_config = ConfigDict(
populate_by_name=True,
validate_assignment=True,
protected_namespaces=(),
extra="allow",
)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True)
@classmethod
def from_json(cls, json_str: str) -> Optional[Self]:
"""Create an instance of AgentBase from a JSON string"""
return cls.from_dict(json.loads(json_str))
def to_dict(self) -> Dict[str, Any]:
"""Return the dictionary representation of the model using alias.
This has the following differences from calling pydantic's
`self.model_dump(by_alias=True)`:
* `None` is only added to the output dict for nullable fields that
were set at model initialization. Other fields with value `None`
are ignored.
* OpenAPI `readOnly` fields are excluded.
* OpenAPI `readOnly` fields are excluded.
* OpenAPI `readOnly` fields are excluded.
"""
excluded_fields: Set[str] = set([
"ip_addresses",
"public_ip_addresses",
"network",
])
_dict = self.model_dump(
by_alias=True,
exclude=excluded_fields,
exclude_none=True,
)
return _dict
@classmethod
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
"""Create an instance of AgentBase from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
return cls.model_validate(obj)
_obj = cls.model_validate({
"ipAddresses": obj.get("ipAddresses"),
"publicIpAddresses": obj.get("publicIpAddresses"),
"network": obj.get("network")
})
return _obj

View File

@ -0,0 +1,111 @@
# coding: utf-8
"""
Administrative API
## Overview Manage users, accounts, and account groups in the ThousandEyes platform using the Administrative API. This API provides the following endpoints that define the operations to manage your organization: * `/account-groups`: Account groups are used to divide an organization into different sections. These endpoints can be used to create, retrieve, update and delete account groups. * `/users`: Create, retrieve, update and delete users within an organization. * `/roles`: Create, retrieve and update roles for the current user. * `/permissions`: Retrieve all assignable permissions. Used in the context of modifying roles. * `/audit-user-events`: Retrieve all activity log events. For more information about the administrative models, see [Account Management](https://docs.thousandeyes.com/product-documentation/user-management).
The version of the OpenAPI document: 7.0.6
Generated by OpenAPI Generator (https://openapi-generator.tech)
Do not edit the class manually.
""" # noqa: E501
from __future__ import annotations
import pprint
import re # noqa: F401
import json
from datetime import datetime
from pydantic import BaseModel, ConfigDict, Field
from typing import Any, ClassVar, Dict, List, Optional
from thousandeyes_sdk.admin.models.pagination_links import PaginationLinks
from thousandeyes_sdk.admin.models.user_event import UserEvent
from typing import Optional, Set
from typing_extensions import Self
class AuditUserEvents(BaseModel):
"""
AuditUserEvents
""" # noqa: E501
audit_events: Optional[List[UserEvent]] = Field(default=None, alias="auditEvents")
start_date: Optional[datetime] = Field(default=None, description="(Optional) When passing `window` or `startDate` parameter, the client will also receive the `startDate` field indicating the UTC start date of the data's time range being retrieved (ISO date-time format).", alias="startDate")
end_date: Optional[datetime] = Field(default=None, description="(Optional) When passing `window` or `endDate` parameter, the client will also receive the `endDate` field indicating the UTC end date of the data's time range being retrieved (ISO date-time format).", alias="endDate")
links: Optional[PaginationLinks] = Field(default=None, alias="_links")
__properties: ClassVar[List[str]] = ["auditEvents", "startDate", "endDate", "_links"]
model_config = ConfigDict(
populate_by_name=True,
validate_assignment=True,
protected_namespaces=(),
extra="allow",
)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True)
@classmethod
def from_json(cls, json_str: str) -> Optional[Self]:
"""Create an instance of AuditUserEvents from a JSON string"""
return cls.from_dict(json.loads(json_str))
def to_dict(self) -> Dict[str, Any]:
"""Return the dictionary representation of the model using alias.
This has the following differences from calling pydantic's
`self.model_dump(by_alias=True)`:
* `None` is only added to the output dict for nullable fields that
were set at model initialization. Other fields with value `None`
are ignored.
* OpenAPI `readOnly` fields are excluded.
* OpenAPI `readOnly` fields are excluded.
"""
excluded_fields: Set[str] = set([
"start_date",
"end_date",
])
_dict = self.model_dump(
by_alias=True,
exclude=excluded_fields,
exclude_none=True,
)
# override the default output from pydantic by calling `to_dict()` of each item in audit_events (list)
_items = []
if self.audit_events:
for _item in self.audit_events:
if _item:
_items.append(_item.to_dict())
_dict['auditEvents'] = _items
# override the default output from pydantic by calling `to_dict()` of links
if self.links:
_dict['_links'] = self.links.to_dict()
return _dict
@classmethod
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
"""Create an instance of AuditUserEvents from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
return cls.model_validate(obj)
_obj = cls.model_validate({
"auditEvents": [UserEvent.from_dict(_item) for _item in obj["auditEvents"]] if obj.get("auditEvents") is not None else None,
"startDate": obj.get("startDate"),
"endDate": obj.get("endDate"),
"_links": PaginationLinks.from_dict(obj["_links"]) if obj.get("_links") is not None else None
})
return _obj

View File

@ -0,0 +1,92 @@
# coding: utf-8
"""
Administrative API
## Overview Manage users, accounts, and account groups in the ThousandEyes platform using the Administrative API. This API provides the following endpoints that define the operations to manage your organization: * `/account-groups`: Account groups are used to divide an organization into different sections. These endpoints can be used to create, retrieve, update and delete account groups. * `/users`: Create, retrieve, update and delete users within an organization. * `/roles`: Create, retrieve and update roles for the current user. * `/permissions`: Retrieve all assignable permissions. Used in the context of modifying roles. * `/audit-user-events`: Retrieve all activity log events. For more information about the administrative models, see [Account Management](https://docs.thousandeyes.com/product-documentation/user-management).
The version of the OpenAPI document: 7.0.6
Generated by OpenAPI Generator (https://openapi-generator.tech)
Do not edit the class manually.
""" # noqa: E501
from __future__ import annotations
import pprint
import re # noqa: F401
import json
from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr
from typing import Any, ClassVar, Dict, List, Optional
from typing import Optional, Set
from typing_extensions import Self
class BaseRole(BaseModel):
"""
BaseRole
""" # noqa: E501
name: Optional[StrictStr] = Field(default=None, description="Name of the role.")
role_id: Optional[StrictStr] = Field(default=None, description="Unique ID representing the role.", alias="roleId")
is_builtin: Optional[StrictBool] = Field(default=None, description="Flag indicating if the role is built-in (Account Admin, Organization Admin, Regular User).", alias="isBuiltin")
__properties: ClassVar[List[str]] = ["name", "roleId", "isBuiltin"]
model_config = ConfigDict(
populate_by_name=True,
validate_assignment=True,
protected_namespaces=(),
extra="allow",
)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True)
@classmethod
def from_json(cls, json_str: str) -> Optional[Self]:
"""Create an instance of BaseRole from a JSON string"""
return cls.from_dict(json.loads(json_str))
def to_dict(self) -> Dict[str, Any]:
"""Return the dictionary representation of the model using alias.
This has the following differences from calling pydantic's
`self.model_dump(by_alias=True)`:
* `None` is only added to the output dict for nullable fields that
were set at model initialization. Other fields with value `None`
are ignored.
"""
excluded_fields: Set[str] = set([
])
_dict = self.model_dump(
by_alias=True,
exclude=excluded_fields,
exclude_none=True,
)
return _dict
@classmethod
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
"""Create an instance of BaseRole from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
return cls.model_validate(obj)
_obj = cls.model_validate({
"name": obj.get("name"),
"roleId": obj.get("roleId"),
"isBuiltin": obj.get("isBuiltin")
})
return _obj

View File

@ -0,0 +1,38 @@
# coding: utf-8
"""
Administrative API
## Overview Manage users, accounts, and account groups in the ThousandEyes platform using the Administrative API. This API provides the following endpoints that define the operations to manage your organization: * `/account-groups`: Account groups are used to divide an organization into different sections. These endpoints can be used to create, retrieve, update and delete account groups. * `/users`: Create, retrieve, update and delete users within an organization. * `/roles`: Create, retrieve and update roles for the current user. * `/permissions`: Retrieve all assignable permissions. Used in the context of modifying roles. * `/audit-user-events`: Retrieve all activity log events. For more information about the administrative models, see [Account Management](https://docs.thousandeyes.com/product-documentation/user-management).
The version of the OpenAPI document: 7.0.6
Generated by OpenAPI Generator (https://openapi-generator.tech)
Do not edit the class manually.
""" # noqa: E501
from __future__ import annotations
import json
from enum import Enum
from typing_extensions import Self
class CloudEnterpriseAgentType(str, Enum):
"""
Type of the agent.
"""
"""
allowed enum values
"""
CLOUD = 'cloud'
ENTERPRISE_MINUS_CLUSTER = 'enterprise-cluster'
ENTERPRISE = 'enterprise'
@classmethod
def from_json(cls, json_str: str) -> Self:
"""Create an instance of CloudEnterpriseAgentType from a JSON string"""
return cls(json.loads(json_str))

View File

@ -0,0 +1,132 @@
# coding: utf-8
"""
Administrative API
## Overview Manage users, accounts, and account groups in the ThousandEyes platform using the Administrative API. This API provides the following endpoints that define the operations to manage your organization: * `/account-groups`: Account groups are used to divide an organization into different sections. These endpoints can be used to create, retrieve, update and delete account groups. * `/users`: Create, retrieve, update and delete users within an organization. * `/roles`: Create, retrieve and update roles for the current user. * `/permissions`: Retrieve all assignable permissions. Used in the context of modifying roles. * `/audit-user-events`: Retrieve all activity log events. For more information about the administrative models, see [Account Management](https://docs.thousandeyes.com/product-documentation/user-management).
The version of the OpenAPI document: 7.0.6
Generated by OpenAPI Generator (https://openapi-generator.tech)
Do not edit the class manually.
""" # noqa: E501
from __future__ import annotations
import pprint
import re # noqa: F401
import json
from datetime import datetime
from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr
from typing import Any, ClassVar, Dict, List, Optional
from thousandeyes_sdk.admin.models.enterprise_agent_state import EnterpriseAgentState
from thousandeyes_sdk.admin.models.error_detail import ErrorDetail
from typing import Optional, Set
from typing_extensions import Self
class ClusterMember(BaseModel):
"""
ClusterMember
""" # noqa: E501
ip_addresses: Optional[List[StrictStr]] = Field(default=None, description="Array of private IP addresses.", alias="ipAddresses")
public_ip_addresses: Optional[List[StrictStr]] = Field(default=None, description="Array of public IP addresses.", alias="publicIpAddresses")
network: Optional[StrictStr] = Field(default=None, description="Network (including ASN) of agents public IP.")
member_id: Optional[StrictStr] = Field(default=None, description="Unique ID of the cluster member", alias="memberId")
name: Optional[StrictStr] = Field(default=None, description="Name of the cluster member")
error_details: Optional[List[ErrorDetail]] = Field(default=None, 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)", alias="errorDetails")
last_seen: Optional[datetime] = Field(default=None, description="UTC last seen date (ISO date-time format).", alias="lastSeen")
agent_state: Optional[EnterpriseAgentState] = Field(default=None, alias="agentState")
target_for_tests: Optional[StrictStr] = Field(default=None, description="Test target IP address.", alias="targetForTests")
utilization: Optional[StrictInt] = Field(default=None, description="Shows overall utilization percentage (online Enterprise Agents and Enterprise Clusters only).")
__properties: ClassVar[List[str]] = ["ipAddresses", "publicIpAddresses", "network", "memberId", "name", "errorDetails", "lastSeen", "agentState", "targetForTests", "utilization"]
model_config = ConfigDict(
populate_by_name=True,
validate_assignment=True,
protected_namespaces=(),
extra="allow",
)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True)
@classmethod
def from_json(cls, json_str: str) -> Optional[Self]:
"""Create an instance of ClusterMember from a JSON string"""
return cls.from_dict(json.loads(json_str))
def to_dict(self) -> Dict[str, Any]:
"""Return the dictionary representation of the model using alias.
This has the following differences from calling pydantic's
`self.model_dump(by_alias=True)`:
* `None` is only added to the output dict for nullable fields that
were set at model initialization. Other fields with value `None`
are ignored.
* OpenAPI `readOnly` fields are excluded.
* OpenAPI `readOnly` fields are excluded.
* OpenAPI `readOnly` fields are excluded.
* OpenAPI `readOnly` fields are excluded.
* OpenAPI `readOnly` fields are excluded.
* OpenAPI `readOnly` fields are excluded.
* OpenAPI `readOnly` fields are excluded.
* OpenAPI `readOnly` fields are excluded.
"""
excluded_fields: Set[str] = set([
"ip_addresses",
"public_ip_addresses",
"network",
"member_id",
"name",
"error_details",
"last_seen",
"utilization",
])
_dict = self.model_dump(
by_alias=True,
exclude=excluded_fields,
exclude_none=True,
)
# override the default output from pydantic by calling `to_dict()` of each item in error_details (list)
_items = []
if self.error_details:
for _item in self.error_details:
if _item:
_items.append(_item.to_dict())
_dict['errorDetails'] = _items
return _dict
@classmethod
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
"""Create an instance of ClusterMember from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
return cls.model_validate(obj)
_obj = cls.model_validate({
"ipAddresses": obj.get("ipAddresses"),
"publicIpAddresses": obj.get("publicIpAddresses"),
"network": obj.get("network"),
"memberId": obj.get("memberId"),
"name": obj.get("name"),
"errorDetails": [ErrorDetail.from_dict(_item) for _item in obj["errorDetails"]] if obj.get("errorDetails") is not None else None,
"lastSeen": obj.get("lastSeen"),
"agentState": obj.get("agentState"),
"targetForTests": obj.get("targetForTests"),
"utilization": obj.get("utilization")
})
return _obj

View File

@ -0,0 +1,112 @@
# coding: utf-8
"""
Administrative API
## Overview Manage users, accounts, and account groups in the ThousandEyes platform using the Administrative API. This API provides the following endpoints that define the operations to manage your organization: * `/account-groups`: Account groups are used to divide an organization into different sections. These endpoints can be used to create, retrieve, update and delete account groups. * `/users`: Create, retrieve, update and delete users within an organization. * `/roles`: Create, retrieve and update roles for the current user. * `/permissions`: Retrieve all assignable permissions. Used in the context of modifying roles. * `/audit-user-events`: Retrieve all activity log events. For more information about the administrative models, see [Account Management](https://docs.thousandeyes.com/product-documentation/user-management).
The version of the OpenAPI document: 7.0.6
Generated by OpenAPI Generator (https://openapi-generator.tech)
Do not edit the class manually.
""" # noqa: E501
from __future__ import annotations
import pprint
import re # noqa: F401
import json
from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr
from typing import Any, ClassVar, Dict, List, Optional
from thousandeyes_sdk.admin.models.self_links import SelfLinks
from thousandeyes_sdk.admin.models.user_account_group import UserAccountGroup
from typing import Optional, Set
from typing_extensions import Self
class CreatedAccountGroup(BaseModel):
"""
CreatedAccountGroup
""" # noqa: E501
aid: Optional[StrictStr] = Field(default=None, description="A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint.")
account_group_name: Optional[StrictStr] = Field(default=None, description="Account group name", alias="accountGroupName")
is_current_account_group: Optional[StrictBool] = Field(default=None, description="Indicates whether the requested aid is the context of the current account.", alias="isCurrentAccountGroup")
is_default_account_group: Optional[StrictBool] = Field(default=None, description="Indicates whether the aid is the default one for the requesting user.", alias="isDefaultAccountGroup")
organization_name: Optional[StrictStr] = Field(default=None, description="(Optional) Indicates whether the aid is the default one for the requesting user.", alias="organizationName")
users: Optional[List[UserAccountGroup]] = None
links: Optional[SelfLinks] = Field(default=None, alias="_links")
__properties: ClassVar[List[str]] = ["aid", "accountGroupName", "isCurrentAccountGroup", "isDefaultAccountGroup", "organizationName", "users", "_links"]
model_config = ConfigDict(
populate_by_name=True,
validate_assignment=True,
protected_namespaces=(),
extra="allow",
)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True)
@classmethod
def from_json(cls, json_str: str) -> Optional[Self]:
"""Create an instance of CreatedAccountGroup from a JSON string"""
return cls.from_dict(json.loads(json_str))
def to_dict(self) -> Dict[str, Any]:
"""Return the dictionary representation of the model using alias.
This has the following differences from calling pydantic's
`self.model_dump(by_alias=True)`:
* `None` is only added to the output dict for nullable fields that
were set at model initialization. Other fields with value `None`
are ignored.
"""
excluded_fields: Set[str] = set([
])
_dict = self.model_dump(
by_alias=True,
exclude=excluded_fields,
exclude_none=True,
)
# override the default output from pydantic by calling `to_dict()` of each item in users (list)
_items = []
if self.users:
for _item in self.users:
if _item:
_items.append(_item.to_dict())
_dict['users'] = _items
# override the default output from pydantic by calling `to_dict()` of links
if self.links:
_dict['_links'] = self.links.to_dict()
return _dict
@classmethod
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
"""Create an instance of CreatedAccountGroup from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
return cls.model_validate(obj)
_obj = cls.model_validate({
"aid": obj.get("aid"),
"accountGroupName": obj.get("accountGroupName"),
"isCurrentAccountGroup": obj.get("isCurrentAccountGroup"),
"isDefaultAccountGroup": obj.get("isDefaultAccountGroup"),
"organizationName": obj.get("organizationName"),
"users": [UserAccountGroup.from_dict(_item) for _item in obj["users"]] if obj.get("users") is not None else None,
"_links": SelfLinks.from_dict(obj["_links"]) if obj.get("_links") is not None else None
})
return _obj

View File

@ -0,0 +1,127 @@
# coding: utf-8
"""
Administrative API
## Overview Manage users, accounts, and account groups in the ThousandEyes platform using the Administrative API. This API provides the following endpoints that define the operations to manage your organization: * `/account-groups`: Account groups are used to divide an organization into different sections. These endpoints can be used to create, retrieve, update and delete account groups. * `/users`: Create, retrieve, update and delete users within an organization. * `/roles`: Create, retrieve and update roles for the current user. * `/permissions`: Retrieve all assignable permissions. Used in the context of modifying roles. * `/audit-user-events`: Retrieve all activity log events. For more information about the administrative models, see [Account Management](https://docs.thousandeyes.com/product-documentation/user-management).
The version of the OpenAPI document: 7.0.6
Generated by OpenAPI Generator (https://openapi-generator.tech)
Do not edit the class manually.
""" # noqa: E501
from __future__ import annotations
import pprint
import re # noqa: F401
import json
from datetime import datetime
from pydantic import BaseModel, ConfigDict, Field, StrictStr
from typing import Any, ClassVar, Dict, List, Optional
from thousandeyes_sdk.admin.models.account_group import AccountGroup
from thousandeyes_sdk.admin.models.account_group_role import AccountGroupRole
from thousandeyes_sdk.admin.models.role import Role
from thousandeyes_sdk.admin.models.self_links import SelfLinks
from typing import Optional, Set
from typing_extensions import Self
class CreatedUser(BaseModel):
"""
CreatedUser
""" # noqa: E501
name: Optional[StrictStr] = Field(default=None, description="User's display name.")
email: Optional[StrictStr] = Field(default=None, description="User's email address.")
uid: Optional[StrictStr] = Field(default=None, description="Unique ID of the user.")
date_registered: Optional[datetime] = Field(default=None, description="UTC date the user registered their account (ISO date-time format).", alias="dateRegistered")
login_account_group: Optional[AccountGroup] = Field(default=None, alias="loginAccountGroup")
account_group_roles: Optional[List[AccountGroupRole]] = Field(default=None, alias="accountGroupRoles")
all_account_group_roles: Optional[List[Role]] = Field(default=None, alias="allAccountGroupRoles")
links: Optional[SelfLinks] = Field(default=None, alias="_links")
__properties: ClassVar[List[str]] = ["name", "email", "uid", "dateRegistered", "loginAccountGroup", "accountGroupRoles", "allAccountGroupRoles", "_links"]
model_config = ConfigDict(
populate_by_name=True,
validate_assignment=True,
protected_namespaces=(),
extra="allow",
)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True)
@classmethod
def from_json(cls, json_str: str) -> Optional[Self]:
"""Create an instance of CreatedUser from a JSON string"""
return cls.from_dict(json.loads(json_str))
def to_dict(self) -> Dict[str, Any]:
"""Return the dictionary representation of the model using alias.
This has the following differences from calling pydantic's
`self.model_dump(by_alias=True)`:
* `None` is only added to the output dict for nullable fields that
were set at model initialization. Other fields with value `None`
are ignored.
"""
excluded_fields: Set[str] = set([
])
_dict = self.model_dump(
by_alias=True,
exclude=excluded_fields,
exclude_none=True,
)
# override the default output from pydantic by calling `to_dict()` of login_account_group
if self.login_account_group:
_dict['loginAccountGroup'] = self.login_account_group.to_dict()
# override the default output from pydantic by calling `to_dict()` of each item in account_group_roles (list)
_items = []
if self.account_group_roles:
for _item in self.account_group_roles:
if _item:
_items.append(_item.to_dict())
_dict['accountGroupRoles'] = _items
# override the default output from pydantic by calling `to_dict()` of each item in all_account_group_roles (list)
_items = []
if self.all_account_group_roles:
for _item in self.all_account_group_roles:
if _item:
_items.append(_item.to_dict())
_dict['allAccountGroupRoles'] = _items
# override the default output from pydantic by calling `to_dict()` of links
if self.links:
_dict['_links'] = self.links.to_dict()
return _dict
@classmethod
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
"""Create an instance of CreatedUser from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
return cls.model_validate(obj)
_obj = cls.model_validate({
"name": obj.get("name"),
"email": obj.get("email"),
"uid": obj.get("uid"),
"dateRegistered": obj.get("dateRegistered"),
"loginAccountGroup": AccountGroup.from_dict(obj["loginAccountGroup"]) if obj.get("loginAccountGroup") is not None else None,
"accountGroupRoles": [AccountGroupRole.from_dict(_item) for _item in obj["accountGroupRoles"]] if obj.get("accountGroupRoles") is not None else None,
"allAccountGroupRoles": [Role.from_dict(_item) for _item in obj["allAccountGroupRoles"]] if obj.get("allAccountGroupRoles") is not None else None,
"_links": SelfLinks.from_dict(obj["_links"]) if obj.get("_links") is not None else None
})
return _obj

View File

@ -0,0 +1,200 @@
# coding: utf-8
"""
Administrative API
## Overview Manage users, accounts, and account groups in the ThousandEyes platform using the Administrative API. This API provides the following endpoints that define the operations to manage your organization: * `/account-groups`: Account groups are used to divide an organization into different sections. These endpoints can be used to create, retrieve, update and delete account groups. * `/users`: Create, retrieve, update and delete users within an organization. * `/roles`: Create, retrieve and update roles for the current user. * `/permissions`: Retrieve all assignable permissions. Used in the context of modifying roles. * `/audit-user-events`: Retrieve all activity log events. For more information about the administrative models, see [Account Management](https://docs.thousandeyes.com/product-documentation/user-management).
The version of the OpenAPI document: 7.0.6
Generated by OpenAPI Generator (https://openapi-generator.tech)
Do not edit the class manually.
""" # noqa: E501
from __future__ import annotations
import pprint
import re # noqa: F401
import json
from datetime import datetime
from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr
from typing import Any, ClassVar, Dict, List, Optional
from thousandeyes_sdk.admin.models.account_group import AccountGroup
from thousandeyes_sdk.admin.models.cloud_enterprise_agent_type import CloudEnterpriseAgentType
from thousandeyes_sdk.admin.models.cluster_member import ClusterMember
from thousandeyes_sdk.admin.models.enterprise_agent_ipv6_policy import EnterpriseAgentIpv6Policy
from thousandeyes_sdk.admin.models.enterprise_agent_state import EnterpriseAgentState
from thousandeyes_sdk.admin.models.error_detail import ErrorDetail
from thousandeyes_sdk.admin.models.interface_ip_mapping import InterfaceIpMapping
from typing import Optional, Set
from typing_extensions import Self
class EnterpriseAgent(BaseModel):
"""
EnterpriseAgent
""" # noqa: E501
agent_type: CloudEnterpriseAgentType = Field(alias="agentType")
ip_addresses: Optional[List[StrictStr]] = Field(default=None, description="Array of private IP addresses.", alias="ipAddresses")
public_ip_addresses: Optional[List[StrictStr]] = Field(default=None, description="Array of public IP addresses.", alias="publicIpAddresses")
network: Optional[StrictStr] = Field(default=None, description="Network (including ASN) of agents public IP.")
agent_id: Optional[StrictStr] = Field(default=None, description="Unique ID of the agent.", alias="agentId")
agent_name: Optional[StrictStr] = Field(default=None, description="Name of the agent.", alias="agentName")
location: Optional[StrictStr] = Field(default=None, description="Location of the agent.")
country_id: Optional[StrictStr] = Field(default=None, description="2-digit ISO country code", alias="countryId")
enabled: Optional[StrictBool] = Field(default=None, description="Flag indicating if the agent is enabled.")
prefix: Optional[StrictStr] = Field(default=None, description="Prefix containing agents public IP address.")
verify_ssl_certificates: Optional[StrictBool] = Field(default=None, description="Flag indicating if has normal SSL operations or if instead it's set to ignore SSL errors on browserbot-based tests.", alias="verifySslCertificates")
cluster_members: Optional[List[ClusterMember]] = Field(default=None, 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.", alias="clusterMembers")
utilization: Optional[StrictInt] = Field(default=None, description="Shows overall utilization percentage (online Enterprise Agents and Enterprise Clusters only).")
account_groups: Optional[List[AccountGroup]] = Field(default=None, description="List of account groups. See /accounts-groups to pull a list of account IDs", alias="accountGroups")
ipv6_policy: Optional[EnterpriseAgentIpv6Policy] = Field(default=None, alias="ipv6Policy")
error_details: Optional[List[ErrorDetail]] = Field(default=None, 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)", alias="errorDetails")
hostname: Optional[StrictStr] = Field(default=None, description="Fully qualified domain name of the agent (Enterprise Agents only)")
last_seen: Optional[datetime] = Field(default=None, description="UTC last seen date (ISO date-time format).", alias="lastSeen")
agent_state: Optional[EnterpriseAgentState] = Field(default=None, alias="agentState")
keep_browser_cache: Optional[StrictBool] = Field(default=None, description="Flag indicating if the agent retains cache.", alias="keepBrowserCache")
created_date: Optional[datetime] = Field(default=None, description="UTC Agent creation date (ISO date-time format).", alias="createdDate")
target_for_tests: Optional[StrictStr] = Field(default=None, description="Test target IP address.", alias="targetForTests")
local_resolution_prefixes: Optional[List[StrictStr]] = Field(default=None, 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).", alias="localResolutionPrefixes")
interface_ip_mappings: Optional[List[InterfaceIpMapping]] = Field(default=None, alias="interfaceIpMappings")
__properties: ClassVar[List[str]] = ["agentType", "ipAddresses", "publicIpAddresses", "network", "agentId", "agentName", "location", "countryId", "enabled", "prefix", "verifySslCertificates", "clusterMembers", "utilization", "accountGroups", "ipv6Policy", "errorDetails", "hostname", "lastSeen", "agentState", "keepBrowserCache", "createdDate", "targetForTests", "localResolutionPrefixes", "interfaceIpMappings"]
model_config = ConfigDict(
populate_by_name=True,
validate_assignment=True,
protected_namespaces=(),
extra="allow",
)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True)
@classmethod
def from_json(cls, json_str: str) -> Optional[Self]:
"""Create an instance of EnterpriseAgent from a JSON string"""
return cls.from_dict(json.loads(json_str))
def to_dict(self) -> Dict[str, Any]:
"""Return the dictionary representation of the model using alias.
This has the following differences from calling pydantic's
`self.model_dump(by_alias=True)`:
* `None` is only added to the output dict for nullable fields that
were set at model initialization. Other fields with value `None`
are ignored.
* OpenAPI `readOnly` fields are excluded.
* OpenAPI `readOnly` fields are excluded.
* OpenAPI `readOnly` fields are excluded.
* OpenAPI `readOnly` fields are excluded.
* OpenAPI `readOnly` fields are excluded.
* OpenAPI `readOnly` fields are excluded.
* OpenAPI `readOnly` fields are excluded.
* OpenAPI `readOnly` fields are excluded.
* OpenAPI `readOnly` fields are excluded.
* OpenAPI `readOnly` fields are excluded.
* OpenAPI `readOnly` fields are excluded.
* OpenAPI `readOnly` fields are excluded.
* OpenAPI `readOnly` fields are excluded.
* OpenAPI `readOnly` fields are excluded.
* OpenAPI `readOnly` fields are excluded.
"""
excluded_fields: Set[str] = set([
"ip_addresses",
"public_ip_addresses",
"network",
"agent_id",
"location",
"country_id",
"prefix",
"verify_ssl_certificates",
"cluster_members",
"utilization",
"error_details",
"hostname",
"last_seen",
"created_date",
"interface_ip_mappings",
])
_dict = self.model_dump(
by_alias=True,
exclude=excluded_fields,
exclude_none=True,
)
# override the default output from pydantic by calling `to_dict()` of each item in cluster_members (list)
_items = []
if self.cluster_members:
for _item in self.cluster_members:
if _item:
_items.append(_item.to_dict())
_dict['clusterMembers'] = _items
# override the default output from pydantic by calling `to_dict()` of each item in account_groups (list)
_items = []
if self.account_groups:
for _item in self.account_groups:
if _item:
_items.append(_item.to_dict())
_dict['accountGroups'] = _items
# override the default output from pydantic by calling `to_dict()` of each item in error_details (list)
_items = []
if self.error_details:
for _item in self.error_details:
if _item:
_items.append(_item.to_dict())
_dict['errorDetails'] = _items
# override the default output from pydantic by calling `to_dict()` of each item in interface_ip_mappings (list)
_items = []
if self.interface_ip_mappings:
for _item in self.interface_ip_mappings:
if _item:
_items.append(_item.to_dict())
_dict['interfaceIpMappings'] = _items
return _dict
@classmethod
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
"""Create an instance of EnterpriseAgent from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
return cls.model_validate(obj)
_obj = cls.model_validate({
"agentType": obj.get("agentType"),
"ipAddresses": obj.get("ipAddresses"),
"publicIpAddresses": obj.get("publicIpAddresses"),
"network": obj.get("network"),
"agentId": obj.get("agentId"),
"agentName": obj.get("agentName"),
"location": obj.get("location"),
"countryId": obj.get("countryId"),
"enabled": obj.get("enabled"),
"prefix": obj.get("prefix"),
"verifySslCertificates": obj.get("verifySslCertificates"),
"clusterMembers": [ClusterMember.from_dict(_item) for _item in obj["clusterMembers"]] if obj.get("clusterMembers") is not None else None,
"utilization": obj.get("utilization"),
"accountGroups": [AccountGroup.from_dict(_item) for _item in obj["accountGroups"]] if obj.get("accountGroups") is not None else None,
"ipv6Policy": obj.get("ipv6Policy"),
"errorDetails": [ErrorDetail.from_dict(_item) for _item in obj["errorDetails"]] if obj.get("errorDetails") is not None else None,
"hostname": obj.get("hostname"),
"lastSeen": obj.get("lastSeen"),
"agentState": obj.get("agentState"),
"keepBrowserCache": obj.get("keepBrowserCache"),
"createdDate": obj.get("createdDate"),
"targetForTests": obj.get("targetForTests"),
"localResolutionPrefixes": obj.get("localResolutionPrefixes"),
"interfaceIpMappings": [InterfaceIpMapping.from_dict(_item) for _item in obj["interfaceIpMappings"]] if obj.get("interfaceIpMappings") is not None else None
})
return _obj

View File

@ -0,0 +1,161 @@
# coding: utf-8
"""
Administrative API
## Overview Manage users, accounts, and account groups in the ThousandEyes platform using the Administrative API. This API provides the following endpoints that define the operations to manage your organization: * `/account-groups`: Account groups are used to divide an organization into different sections. These endpoints can be used to create, retrieve, update and delete account groups. * `/users`: Create, retrieve, update and delete users within an organization. * `/roles`: Create, retrieve and update roles for the current user. * `/permissions`: Retrieve all assignable permissions. Used in the context of modifying roles. * `/audit-user-events`: Retrieve all activity log events. For more information about the administrative models, see [Account Management](https://docs.thousandeyes.com/product-documentation/user-management).
The version of the OpenAPI document: 7.0.6
Generated by OpenAPI Generator (https://openapi-generator.tech)
Do not edit the class manually.
""" # noqa: E501
from __future__ import annotations
import pprint
import re # noqa: F401
import json
from datetime import datetime
from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr
from typing import Any, ClassVar, Dict, List, Optional
from thousandeyes_sdk.admin.models.account_group import AccountGroup
from thousandeyes_sdk.admin.models.cluster_member import ClusterMember
from thousandeyes_sdk.admin.models.enterprise_agent_ipv6_policy import EnterpriseAgentIpv6Policy
from thousandeyes_sdk.admin.models.enterprise_agent_state import EnterpriseAgentState
from thousandeyes_sdk.admin.models.error_detail import ErrorDetail
from thousandeyes_sdk.admin.models.interface_ip_mapping import InterfaceIpMapping
from typing import Optional, Set
from typing_extensions import Self
class EnterpriseAgentData(BaseModel):
"""
EnterpriseAgentData
""" # noqa: E501
cluster_members: Optional[List[ClusterMember]] = Field(default=None, 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.", alias="clusterMembers")
utilization: Optional[StrictInt] = Field(default=None, description="Shows overall utilization percentage (online Enterprise Agents and Enterprise Clusters only).")
account_groups: Optional[List[AccountGroup]] = Field(default=None, description="List of account groups. See /accounts-groups to pull a list of account IDs", alias="accountGroups")
ipv6_policy: Optional[EnterpriseAgentIpv6Policy] = Field(default=None, alias="ipv6Policy")
error_details: Optional[List[ErrorDetail]] = Field(default=None, 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)", alias="errorDetails")
hostname: Optional[StrictStr] = Field(default=None, description="Fully qualified domain name of the agent (Enterprise Agents only)")
last_seen: Optional[datetime] = Field(default=None, description="UTC last seen date (ISO date-time format).", alias="lastSeen")
agent_state: Optional[EnterpriseAgentState] = Field(default=None, alias="agentState")
keep_browser_cache: Optional[StrictBool] = Field(default=None, description="Flag indicating if the agent retains cache.", alias="keepBrowserCache")
created_date: Optional[datetime] = Field(default=None, description="UTC Agent creation date (ISO date-time format).", alias="createdDate")
target_for_tests: Optional[StrictStr] = Field(default=None, description="Test target IP address.", alias="targetForTests")
local_resolution_prefixes: Optional[List[StrictStr]] = Field(default=None, 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).", alias="localResolutionPrefixes")
interface_ip_mappings: Optional[List[InterfaceIpMapping]] = Field(default=None, alias="interfaceIpMappings")
__properties: ClassVar[List[str]] = ["clusterMembers", "utilization", "accountGroups", "ipv6Policy", "errorDetails", "hostname", "lastSeen", "agentState", "keepBrowserCache", "createdDate", "targetForTests", "localResolutionPrefixes", "interfaceIpMappings"]
model_config = ConfigDict(
populate_by_name=True,
validate_assignment=True,
protected_namespaces=(),
extra="allow",
)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True)
@classmethod
def from_json(cls, json_str: str) -> Optional[Self]:
"""Create an instance of EnterpriseAgentData from a JSON string"""
return cls.from_dict(json.loads(json_str))
def to_dict(self) -> Dict[str, Any]:
"""Return the dictionary representation of the model using alias.
This has the following differences from calling pydantic's
`self.model_dump(by_alias=True)`:
* `None` is only added to the output dict for nullable fields that
were set at model initialization. Other fields with value `None`
are ignored.
* OpenAPI `readOnly` fields are excluded.
* OpenAPI `readOnly` fields are excluded.
* OpenAPI `readOnly` fields are excluded.
* OpenAPI `readOnly` fields are excluded.
* OpenAPI `readOnly` fields are excluded.
* OpenAPI `readOnly` fields are excluded.
* OpenAPI `readOnly` fields are excluded.
"""
excluded_fields: Set[str] = set([
"cluster_members",
"utilization",
"error_details",
"hostname",
"last_seen",
"created_date",
"interface_ip_mappings",
])
_dict = self.model_dump(
by_alias=True,
exclude=excluded_fields,
exclude_none=True,
)
# override the default output from pydantic by calling `to_dict()` of each item in cluster_members (list)
_items = []
if self.cluster_members:
for _item in self.cluster_members:
if _item:
_items.append(_item.to_dict())
_dict['clusterMembers'] = _items
# override the default output from pydantic by calling `to_dict()` of each item in account_groups (list)
_items = []
if self.account_groups:
for _item in self.account_groups:
if _item:
_items.append(_item.to_dict())
_dict['accountGroups'] = _items
# override the default output from pydantic by calling `to_dict()` of each item in error_details (list)
_items = []
if self.error_details:
for _item in self.error_details:
if _item:
_items.append(_item.to_dict())
_dict['errorDetails'] = _items
# override the default output from pydantic by calling `to_dict()` of each item in interface_ip_mappings (list)
_items = []
if self.interface_ip_mappings:
for _item in self.interface_ip_mappings:
if _item:
_items.append(_item.to_dict())
_dict['interfaceIpMappings'] = _items
return _dict
@classmethod
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
"""Create an instance of EnterpriseAgentData from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
return cls.model_validate(obj)
_obj = cls.model_validate({
"clusterMembers": [ClusterMember.from_dict(_item) for _item in obj["clusterMembers"]] if obj.get("clusterMembers") is not None else None,
"utilization": obj.get("utilization"),
"accountGroups": [AccountGroup.from_dict(_item) for _item in obj["accountGroups"]] if obj.get("accountGroups") is not None else None,
"ipv6Policy": obj.get("ipv6Policy"),
"errorDetails": [ErrorDetail.from_dict(_item) for _item in obj["errorDetails"]] if obj.get("errorDetails") is not None else None,
"hostname": obj.get("hostname"),
"lastSeen": obj.get("lastSeen"),
"agentState": obj.get("agentState"),
"keepBrowserCache": obj.get("keepBrowserCache"),
"createdDate": obj.get("createdDate"),
"targetForTests": obj.get("targetForTests"),
"localResolutionPrefixes": obj.get("localResolutionPrefixes"),
"interfaceIpMappings": [InterfaceIpMapping.from_dict(_item) for _item in obj["interfaceIpMappings"]] if obj.get("interfaceIpMappings") is not None else None
})
return _obj

View File

@ -0,0 +1,38 @@
# coding: utf-8
"""
Administrative API
## Overview Manage users, accounts, and account groups in the ThousandEyes platform using the Administrative API. This API provides the following endpoints that define the operations to manage your organization: * `/account-groups`: Account groups are used to divide an organization into different sections. These endpoints can be used to create, retrieve, update and delete account groups. * `/users`: Create, retrieve, update and delete users within an organization. * `/roles`: Create, retrieve and update roles for the current user. * `/permissions`: Retrieve all assignable permissions. Used in the context of modifying roles. * `/audit-user-events`: Retrieve all activity log events. For more information about the administrative models, see [Account Management](https://docs.thousandeyes.com/product-documentation/user-management).
The version of the OpenAPI document: 7.0.6
Generated by OpenAPI Generator (https://openapi-generator.tech)
Do not edit the class manually.
""" # noqa: E501
from __future__ import annotations
import json
from enum import Enum
from typing_extensions import Self
class EnterpriseAgentIpv6Policy(str, Enum):
"""
IP version policy, (Enterprise Agents and Enterprise Clusters only)
"""
"""
allowed enum values
"""
FORCE_MINUS_IPV4 = 'force-ipv4'
PREFER_MINUS_IPV6 = 'prefer-ipv6'
FORCE_MINUS_IPV6 = 'force-ipv6'
@classmethod
def from_json(cls, json_str: str) -> Self:
"""Create an instance of EnterpriseAgentIpv6Policy from a JSON string"""
return cls(json.loads(json_str))

View File

@ -0,0 +1,38 @@
# coding: utf-8
"""
Administrative API
## Overview Manage users, accounts, and account groups in the ThousandEyes platform using the Administrative API. This API provides the following endpoints that define the operations to manage your organization: * `/account-groups`: Account groups are used to divide an organization into different sections. These endpoints can be used to create, retrieve, update and delete account groups. * `/users`: Create, retrieve, update and delete users within an organization. * `/roles`: Create, retrieve and update roles for the current user. * `/permissions`: Retrieve all assignable permissions. Used in the context of modifying roles. * `/audit-user-events`: Retrieve all activity log events. For more information about the administrative models, see [Account Management](https://docs.thousandeyes.com/product-documentation/user-management).
The version of the OpenAPI document: 7.0.6
Generated by OpenAPI Generator (https://openapi-generator.tech)
Do not edit the class manually.
""" # noqa: E501
from __future__ import annotations
import json
from enum import Enum
from typing_extensions import Self
class EnterpriseAgentState(str, Enum):
"""
State of the agent.
"""
"""
allowed enum values
"""
ONLINE = 'online'
OFFLINE = 'offline'
DISABLED = 'disabled'
@classmethod
def from_json(cls, json_str: str) -> Self:
"""Create an instance of EnterpriseAgentState from a JSON string"""
return cls(json.loads(json_str))

View File

@ -0,0 +1,96 @@
# coding: utf-8
"""
Administrative API
## Overview Manage users, accounts, and account groups in the ThousandEyes platform using the Administrative API. This API provides the following endpoints that define the operations to manage your organization: * `/account-groups`: Account groups are used to divide an organization into different sections. These endpoints can be used to create, retrieve, update and delete account groups. * `/users`: Create, retrieve, update and delete users within an organization. * `/roles`: Create, retrieve and update roles for the current user. * `/permissions`: Retrieve all assignable permissions. Used in the context of modifying roles. * `/audit-user-events`: Retrieve all activity log events. For more information about the administrative models, see [Account Management](https://docs.thousandeyes.com/product-documentation/user-management).
The version of the OpenAPI document: 7.0.6
Generated by OpenAPI Generator (https://openapi-generator.tech)
Do not edit the class manually.
""" # noqa: E501
from __future__ import annotations
import pprint
import re # noqa: F401
import json
from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr
from typing import Any, ClassVar, Dict, List, Optional
from typing import Optional, Set
from typing_extensions import Self
class Error(BaseModel):
"""
Error
""" # noqa: E501
type: Optional[StrictStr] = Field(default=None, description="A URI reference that identifies the problem type. When this member is not present, its value is assumed to be \"about:blank\".")
title: Optional[StrictStr] = Field(default=None, description="A short, human-readable summary of the problem type.")
status: Optional[StrictInt] = Field(default=None, description="The HTTP status code generated by the origin server for this occurrence of the problem.")
detail: Optional[StrictStr] = Field(default=None, description="A human-readable explanation specific to this occurrence of the problem.")
instance: Optional[StrictStr] = Field(default=None, description="A URI reference that identifies the specific occurrence of the problem.")
__properties: ClassVar[List[str]] = ["type", "title", "status", "detail", "instance"]
model_config = ConfigDict(
populate_by_name=True,
validate_assignment=True,
protected_namespaces=(),
extra="allow",
)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True)
@classmethod
def from_json(cls, json_str: str) -> Optional[Self]:
"""Create an instance of Error from a JSON string"""
return cls.from_dict(json.loads(json_str))
def to_dict(self) -> Dict[str, Any]:
"""Return the dictionary representation of the model using alias.
This has the following differences from calling pydantic's
`self.model_dump(by_alias=True)`:
* `None` is only added to the output dict for nullable fields that
were set at model initialization. Other fields with value `None`
are ignored.
"""
excluded_fields: Set[str] = set([
])
_dict = self.model_dump(
by_alias=True,
exclude=excluded_fields,
exclude_none=True,
)
return _dict
@classmethod
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
"""Create an instance of Error from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
return cls.model_validate(obj)
_obj = cls.model_validate({
"type": obj.get("type"),
"title": obj.get("title"),
"status": obj.get("status"),
"detail": obj.get("detail"),
"instance": obj.get("instance")
})
return _obj

View File

@ -0,0 +1,93 @@
# coding: utf-8
"""
Administrative API
## Overview Manage users, accounts, and account groups in the ThousandEyes platform using the Administrative API. This API provides the following endpoints that define the operations to manage your organization: * `/account-groups`: Account groups are used to divide an organization into different sections. These endpoints can be used to create, retrieve, update and delete account groups. * `/users`: Create, retrieve, update and delete users within an organization. * `/roles`: Create, retrieve and update roles for the current user. * `/permissions`: Retrieve all assignable permissions. Used in the context of modifying roles. * `/audit-user-events`: Retrieve all activity log events. For more information about the administrative models, see [Account Management](https://docs.thousandeyes.com/product-documentation/user-management).
The version of the OpenAPI document: 7.0.6
Generated by OpenAPI Generator (https://openapi-generator.tech)
Do not edit the class manually.
""" # noqa: E501
from __future__ import annotations
import pprint
import re # noqa: F401
import json
from pydantic import BaseModel, ConfigDict, Field, StrictStr
from typing import Any, ClassVar, Dict, List, Optional
from thousandeyes_sdk.admin.models.error_detail_code import ErrorDetailCode
from typing import Optional, Set
from typing_extensions import Self
class ErrorDetail(BaseModel):
"""
ErrorDetail
""" # noqa: E501
code: Optional[ErrorDetailCode] = None
description: Optional[StrictStr] = Field(default=None, description="Description for the agent error.")
__properties: ClassVar[List[str]] = ["code", "description"]
model_config = ConfigDict(
populate_by_name=True,
validate_assignment=True,
protected_namespaces=(),
extra="allow",
)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True)
@classmethod
def from_json(cls, json_str: str) -> Optional[Self]:
"""Create an instance of ErrorDetail from a JSON string"""
return cls.from_dict(json.loads(json_str))
def to_dict(self) -> Dict[str, Any]:
"""Return the dictionary representation of the model using alias.
This has the following differences from calling pydantic's
`self.model_dump(by_alias=True)`:
* `None` is only added to the output dict for nullable fields that
were set at model initialization. Other fields with value `None`
are ignored.
* OpenAPI `readOnly` fields are excluded.
"""
excluded_fields: Set[str] = set([
"description",
])
_dict = self.model_dump(
by_alias=True,
exclude=excluded_fields,
exclude_none=True,
)
return _dict
@classmethod
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
"""Create an instance of ErrorDetail from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
return cls.model_validate(obj)
_obj = cls.model_validate({
"code": obj.get("code"),
"description": obj.get("description")
})
return _obj

View File

@ -0,0 +1,43 @@
# coding: utf-8
"""
Administrative API
## Overview Manage users, accounts, and account groups in the ThousandEyes platform using the Administrative API. This API provides the following endpoints that define the operations to manage your organization: * `/account-groups`: Account groups are used to divide an organization into different sections. These endpoints can be used to create, retrieve, update and delete account groups. * `/users`: Create, retrieve, update and delete users within an organization. * `/roles`: Create, retrieve and update roles for the current user. * `/permissions`: Retrieve all assignable permissions. Used in the context of modifying roles. * `/audit-user-events`: Retrieve all activity log events. For more information about the administrative models, see [Account Management](https://docs.thousandeyes.com/product-documentation/user-management).
The version of the OpenAPI document: 7.0.6
Generated by OpenAPI Generator (https://openapi-generator.tech)
Do not edit the class manually.
""" # noqa: E501
from __future__ import annotations
import json
from enum import Enum
from typing_extensions import Self
class ErrorDetailCode(str, Enum):
"""
Code for the agent error.
"""
"""
allowed enum values
"""
AGENT_MINUS_VERSION_MINUS_OUTDATED = 'agent-version-outdated'
BROWSERBOT_MINUS_VERSION_MINUS_OUTDATED = 'browserbot-version-outdated'
APPLIANCE_MINUS_VERSION_MINUS_OUTDATED = 'appliance-version-outdated'
CLOCK_MINUS_OFFSET = 'clock-offset'
OS_MINUS_END_MINUS_OF_MINUS_INSTALLATION_MINUS_SUPPORT = 'os-end-of-installation-support'
OS_MINUS_END_MINUS_OF_MINUS_SUPPORT = 'os-end-of-support'
OS_MINUS_END_MINUS_OF_MINUS_LIFE = 'os-end-of-life'
NAT_MINUS_TRAVERSAL_MINUS_ERROR = 'nat-traversal-error'
@classmethod
def from_json(cls, json_str: str) -> Self:
"""Create an instance of ErrorDetailCode from a JSON string"""
return cls(json.loads(json_str))

View File

@ -0,0 +1,37 @@
# coding: utf-8
"""
Administrative API
## Overview Manage users, accounts, and account groups in the ThousandEyes platform using the Administrative API. This API provides the following endpoints that define the operations to manage your organization: * `/account-groups`: Account groups are used to divide an organization into different sections. These endpoints can be used to create, retrieve, update and delete account groups. * `/users`: Create, retrieve, update and delete users within an organization. * `/roles`: Create, retrieve and update roles for the current user. * `/permissions`: Retrieve all assignable permissions. Used in the context of modifying roles. * `/audit-user-events`: Retrieve all activity log events. For more information about the administrative models, see [Account Management](https://docs.thousandeyes.com/product-documentation/user-management).
The version of the OpenAPI document: 7.0.6
Generated by OpenAPI Generator (https://openapi-generator.tech)
Do not edit the class manually.
""" # noqa: E501
from __future__ import annotations
import json
from enum import Enum
from typing_extensions import Self
class Expand(str, Enum):
"""
Expand
"""
"""
allowed enum values
"""
USER = 'user'
AGENT = 'agent'
@classmethod
def from_json(cls, json_str: str) -> Self:
"""Create an instance of Expand from a JSON string"""
return cls(json.loads(json_str))

View File

@ -0,0 +1,103 @@
# coding: utf-8
"""
Administrative API
## Overview Manage users, accounts, and account groups in the ThousandEyes platform using the Administrative API. This API provides the following endpoints that define the operations to manage your organization: * `/account-groups`: Account groups are used to divide an organization into different sections. These endpoints can be used to create, retrieve, update and delete account groups. * `/users`: Create, retrieve, update and delete users within an organization. * `/roles`: Create, retrieve and update roles for the current user. * `/permissions`: Retrieve all assignable permissions. Used in the context of modifying roles. * `/audit-user-events`: Retrieve all activity log events. For more information about the administrative models, see [Account Management](https://docs.thousandeyes.com/product-documentation/user-management).
The version of the OpenAPI document: 7.0.6
Generated by OpenAPI Generator (https://openapi-generator.tech)
Do not edit the class manually.
""" # noqa: E501
from __future__ import annotations
import pprint
import re # noqa: F401
import json
from datetime import datetime
from pydantic import BaseModel, ConfigDict, Field, StrictStr
from typing import Any, ClassVar, Dict, List, Optional
from thousandeyes_sdk.admin.models.account_group import AccountGroup
from typing import Optional, Set
from typing_extensions import Self
class ExtendedUser(BaseModel):
"""
ExtendedUser
""" # noqa: E501
name: Optional[StrictStr] = Field(default=None, description="User's display name.")
email: Optional[StrictStr] = Field(default=None, description="User's email address.")
uid: Optional[StrictStr] = Field(default=None, description="Unique ID of the user.")
date_registered: Optional[datetime] = Field(default=None, description="UTC date the user registered their account (ISO date-time format).", alias="dateRegistered")
login_account_group: Optional[AccountGroup] = Field(default=None, alias="loginAccountGroup")
last_login: Optional[datetime] = Field(default=None, description="UTC last login of the user (ISO date-time format).", alias="lastLogin")
__properties: ClassVar[List[str]] = ["name", "email", "uid", "dateRegistered", "loginAccountGroup", "lastLogin"]
model_config = ConfigDict(
populate_by_name=True,
validate_assignment=True,
protected_namespaces=(),
extra="allow",
)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True)
@classmethod
def from_json(cls, json_str: str) -> Optional[Self]:
"""Create an instance of ExtendedUser from a JSON string"""
return cls.from_dict(json.loads(json_str))
def to_dict(self) -> Dict[str, Any]:
"""Return the dictionary representation of the model using alias.
This has the following differences from calling pydantic's
`self.model_dump(by_alias=True)`:
* `None` is only added to the output dict for nullable fields that
were set at model initialization. Other fields with value `None`
are ignored.
"""
excluded_fields: Set[str] = set([
])
_dict = self.model_dump(
by_alias=True,
exclude=excluded_fields,
exclude_none=True,
)
# override the default output from pydantic by calling `to_dict()` of login_account_group
if self.login_account_group:
_dict['loginAccountGroup'] = self.login_account_group.to_dict()
return _dict
@classmethod
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
"""Create an instance of ExtendedUser from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
return cls.model_validate(obj)
_obj = cls.model_validate({
"name": obj.get("name"),
"email": obj.get("email"),
"uid": obj.get("uid"),
"dateRegistered": obj.get("dateRegistered"),
"loginAccountGroup": AccountGroup.from_dict(obj["loginAccountGroup"]) if obj.get("loginAccountGroup") is not None else None,
"lastLogin": obj.get("lastLogin")
})
return _obj

View File

@ -0,0 +1,94 @@
# coding: utf-8
"""
Administrative API
## Overview Manage users, accounts, and account groups in the ThousandEyes platform using the Administrative API. This API provides the following endpoints that define the operations to manage your organization: * `/account-groups`: Account groups are used to divide an organization into different sections. These endpoints can be used to create, retrieve, update and delete account groups. * `/users`: Create, retrieve, update and delete users within an organization. * `/roles`: Create, retrieve and update roles for the current user. * `/permissions`: Retrieve all assignable permissions. Used in the context of modifying roles. * `/audit-user-events`: Retrieve all activity log events. For more information about the administrative models, see [Account Management](https://docs.thousandeyes.com/product-documentation/user-management).
The version of the OpenAPI document: 7.0.6
Generated by OpenAPI Generator (https://openapi-generator.tech)
Do not edit the class manually.
""" # noqa: E501
from __future__ import annotations
import pprint
import re # noqa: F401
import json
from pydantic import BaseModel, ConfigDict, Field, StrictStr
from typing import Any, ClassVar, Dict, List, Optional
from typing import Optional, Set
from typing_extensions import Self
class InterfaceIpMapping(BaseModel):
"""
InterfaceIpMapping
""" # noqa: E501
interface_name: Optional[StrictStr] = Field(default=None, description="Name of the mapping", alias="interfaceName")
ip_addresses: Optional[List[StrictStr]] = Field(default=None, description="Array of ipAddress entries", alias="ipAddresses")
__properties: ClassVar[List[str]] = ["interfaceName", "ipAddresses"]
model_config = ConfigDict(
populate_by_name=True,
validate_assignment=True,
protected_namespaces=(),
extra="allow",
)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True)
@classmethod
def from_json(cls, json_str: str) -> Optional[Self]:
"""Create an instance of InterfaceIpMapping from a JSON string"""
return cls.from_dict(json.loads(json_str))
def to_dict(self) -> Dict[str, Any]:
"""Return the dictionary representation of the model using alias.
This has the following differences from calling pydantic's
`self.model_dump(by_alias=True)`:
* `None` is only added to the output dict for nullable fields that
were set at model initialization. Other fields with value `None`
are ignored.
* OpenAPI `readOnly` fields are excluded.
* OpenAPI `readOnly` fields are excluded.
"""
excluded_fields: Set[str] = set([
"interface_name",
"ip_addresses",
])
_dict = self.model_dump(
by_alias=True,
exclude=excluded_fields,
exclude_none=True,
)
return _dict
@classmethod
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
"""Create an instance of InterfaceIpMapping from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
return cls.model_validate(obj)
_obj = cls.model_validate({
"interfaceName": obj.get("interfaceName"),
"ipAddresses": obj.get("ipAddresses")
})
return _obj

View File

@ -0,0 +1,102 @@
# coding: utf-8
"""
Administrative API
## Overview Manage users, accounts, and account groups in the ThousandEyes platform using the Administrative API. This API provides the following endpoints that define the operations to manage your organization: * `/account-groups`: Account groups are used to divide an organization into different sections. These endpoints can be used to create, retrieve, update and delete account groups. * `/users`: Create, retrieve, update and delete users within an organization. * `/roles`: Create, retrieve and update roles for the current user. * `/permissions`: Retrieve all assignable permissions. Used in the context of modifying roles. * `/audit-user-events`: Retrieve all activity log events. For more information about the administrative models, see [Account Management](https://docs.thousandeyes.com/product-documentation/user-management).
The version of the OpenAPI document: 7.0.6
Generated by OpenAPI Generator (https://openapi-generator.tech)
Do not edit the class manually.
""" # noqa: E501
from __future__ import annotations
import pprint
import re # noqa: F401
import json
from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr
from typing import Any, ClassVar, Dict, List, Optional
from typing import Optional, Set
from typing_extensions import Self
class Link(BaseModel):
"""
A hyperlink from the containing resource to a URI.
""" # noqa: E501
href: StrictStr = Field(description="Its value is either a URI [RFC3986] or a URI template [RFC6570].")
templated: Optional[StrictBool] = Field(default=None, description="Should be true when the link object's \"href\" property is a URI template.")
type: Optional[StrictStr] = Field(default=None, description="Used as a hint to indicate the media type expected when dereferencing the target resource.")
deprecation: Optional[StrictStr] = Field(default=None, 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: Optional[StrictStr] = Field(default=None, description="Its value may be used as a secondary key for selecting link objects that share the same relation type.")
profile: Optional[StrictStr] = Field(default=None, description="A URI that hints about the profile of the target resource.")
title: Optional[StrictStr] = Field(default=None, description="Intended for labelling the link with a human-readable identifier")
hreflang: Optional[StrictStr] = Field(default=None, description="Indicates the language of the target resource")
__properties: ClassVar[List[str]] = ["href", "templated", "type", "deprecation", "name", "profile", "title", "hreflang"]
model_config = ConfigDict(
populate_by_name=True,
validate_assignment=True,
protected_namespaces=(),
extra="allow",
)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True)
@classmethod
def from_json(cls, json_str: str) -> Optional[Self]:
"""Create an instance of Link from a JSON string"""
return cls.from_dict(json.loads(json_str))
def to_dict(self) -> Dict[str, Any]:
"""Return the dictionary representation of the model using alias.
This has the following differences from calling pydantic's
`self.model_dump(by_alias=True)`:
* `None` is only added to the output dict for nullable fields that
were set at model initialization. Other fields with value `None`
are ignored.
"""
excluded_fields: Set[str] = set([
])
_dict = self.model_dump(
by_alias=True,
exclude=excluded_fields,
exclude_none=True,
)
return _dict
@classmethod
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
"""Create an instance of Link from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
return cls.model_validate(obj)
_obj = cls.model_validate({
"href": obj.get("href"),
"templated": obj.get("templated"),
"type": obj.get("type"),
"deprecation": obj.get("deprecation"),
"name": obj.get("name"),
"profile": obj.get("profile"),
"title": obj.get("title"),
"hreflang": obj.get("hreflang")
})
return _obj

View File

@ -0,0 +1,102 @@
# coding: utf-8
"""
Administrative API
## Overview Manage users, accounts, and account groups in the ThousandEyes platform using the Administrative API. This API provides the following endpoints that define the operations to manage your organization: * `/account-groups`: Account groups are used to divide an organization into different sections. These endpoints can be used to create, retrieve, update and delete account groups. * `/users`: Create, retrieve, update and delete users within an organization. * `/roles`: Create, retrieve and update roles for the current user. * `/permissions`: Retrieve all assignable permissions. Used in the context of modifying roles. * `/audit-user-events`: Retrieve all activity log events. For more information about the administrative models, see [Account Management](https://docs.thousandeyes.com/product-documentation/user-management).
The version of the OpenAPI document: 7.0.6
Generated by OpenAPI Generator (https://openapi-generator.tech)
Do not edit the class manually.
""" # noqa: E501
from __future__ import annotations
import pprint
import re # noqa: F401
import json
from pydantic import BaseModel, ConfigDict, Field
from typing import Any, ClassVar, Dict, List, Optional
from thousandeyes_sdk.admin.models.link import Link
from typing import Optional, Set
from typing_extensions import Self
class PaginationLinks(BaseModel):
"""
A links object containing pagination related link(s).
""" # noqa: E501
previous: Optional[Link] = None
next: Optional[Link] = None
var_self: Optional[Link] = Field(default=None, alias="self")
__properties: ClassVar[List[str]] = ["previous", "next", "self"]
model_config = ConfigDict(
populate_by_name=True,
validate_assignment=True,
protected_namespaces=(),
extra="allow",
)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True)
@classmethod
def from_json(cls, json_str: str) -> Optional[Self]:
"""Create an instance of PaginationLinks from a JSON string"""
return cls.from_dict(json.loads(json_str))
def to_dict(self) -> Dict[str, Any]:
"""Return the dictionary representation of the model using alias.
This has the following differences from calling pydantic's
`self.model_dump(by_alias=True)`:
* `None` is only added to the output dict for nullable fields that
were set at model initialization. Other fields with value `None`
are ignored.
"""
excluded_fields: Set[str] = set([
])
_dict = self.model_dump(
by_alias=True,
exclude=excluded_fields,
exclude_none=True,
)
# override the default output from pydantic by calling `to_dict()` of previous
if self.previous:
_dict['previous'] = self.previous.to_dict()
# override the default output from pydantic by calling `to_dict()` of next
if self.next:
_dict['next'] = self.next.to_dict()
# override the default output from pydantic by calling `to_dict()` of var_self
if self.var_self:
_dict['self'] = self.var_self.to_dict()
return _dict
@classmethod
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
"""Create an instance of PaginationLinks from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
return cls.model_validate(obj)
_obj = cls.model_validate({
"previous": Link.from_dict(obj["previous"]) if obj.get("previous") is not None else None,
"next": Link.from_dict(obj["next"]) if obj.get("next") is not None else None,
"self": Link.from_dict(obj["self"]) if obj.get("self") is not None else None
})
return _obj

View File

@ -0,0 +1,94 @@
# coding: utf-8
"""
Administrative API
## Overview Manage users, accounts, and account groups in the ThousandEyes platform using the Administrative API. This API provides the following endpoints that define the operations to manage your organization: * `/account-groups`: Account groups are used to divide an organization into different sections. These endpoints can be used to create, retrieve, update and delete account groups. * `/users`: Create, retrieve, update and delete users within an organization. * `/roles`: Create, retrieve and update roles for the current user. * `/permissions`: Retrieve all assignable permissions. Used in the context of modifying roles. * `/audit-user-events`: Retrieve all activity log events. For more information about the administrative models, see [Account Management](https://docs.thousandeyes.com/product-documentation/user-management).
The version of the OpenAPI document: 7.0.6
Generated by OpenAPI Generator (https://openapi-generator.tech)
Do not edit the class manually.
""" # noqa: E501
from __future__ import annotations
import pprint
import re # noqa: F401
import json
from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr
from typing import Any, ClassVar, Dict, List, Optional
from typing import Optional, Set
from typing_extensions import Self
class Permission(BaseModel):
"""
Permission
""" # noqa: E501
label: Optional[StrictStr] = Field(default=None, description="Label corresponding to the permission.")
permission_id: Optional[StrictStr] = Field(default=None, description="Unique ID representing the permission.", alias="permissionId")
is_management_permission: Optional[StrictBool] = Field(default=None, description="Flag indicating whether the permission is classified as a management permission.", alias="isManagementPermission")
permission: Optional[StrictStr] = Field(default=None, description="Permission name")
__properties: ClassVar[List[str]] = ["label", "permissionId", "isManagementPermission", "permission"]
model_config = ConfigDict(
populate_by_name=True,
validate_assignment=True,
protected_namespaces=(),
extra="allow",
)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True)
@classmethod
def from_json(cls, json_str: str) -> Optional[Self]:
"""Create an instance of Permission from a JSON string"""
return cls.from_dict(json.loads(json_str))
def to_dict(self) -> Dict[str, Any]:
"""Return the dictionary representation of the model using alias.
This has the following differences from calling pydantic's
`self.model_dump(by_alias=True)`:
* `None` is only added to the output dict for nullable fields that
were set at model initialization. Other fields with value `None`
are ignored.
"""
excluded_fields: Set[str] = set([
])
_dict = self.model_dump(
by_alias=True,
exclude=excluded_fields,
exclude_none=True,
)
return _dict
@classmethod
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
"""Create an instance of Permission from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
return cls.model_validate(obj)
_obj = cls.model_validate({
"label": obj.get("label"),
"permissionId": obj.get("permissionId"),
"isManagementPermission": obj.get("isManagementPermission"),
"permission": obj.get("permission")
})
return _obj

View File

@ -0,0 +1,102 @@
# coding: utf-8
"""
Administrative API
## Overview Manage users, accounts, and account groups in the ThousandEyes platform using the Administrative API. This API provides the following endpoints that define the operations to manage your organization: * `/account-groups`: Account groups are used to divide an organization into different sections. These endpoints can be used to create, retrieve, update and delete account groups. * `/users`: Create, retrieve, update and delete users within an organization. * `/roles`: Create, retrieve and update roles for the current user. * `/permissions`: Retrieve all assignable permissions. Used in the context of modifying roles. * `/audit-user-events`: Retrieve all activity log events. For more information about the administrative models, see [Account Management](https://docs.thousandeyes.com/product-documentation/user-management).
The version of the OpenAPI document: 7.0.6
Generated by OpenAPI Generator (https://openapi-generator.tech)
Do not edit the class manually.
""" # noqa: E501
from __future__ import annotations
import pprint
import re # noqa: F401
import json
from pydantic import BaseModel, ConfigDict, Field
from typing import Any, ClassVar, Dict, List, Optional
from thousandeyes_sdk.admin.models.permission import Permission
from thousandeyes_sdk.admin.models.self_links import SelfLinks
from typing import Optional, Set
from typing_extensions import Self
class Permissions(BaseModel):
"""
Permissions
""" # noqa: E501
permissions: Optional[List[Permission]] = None
links: Optional[SelfLinks] = Field(default=None, alias="_links")
__properties: ClassVar[List[str]] = ["permissions", "_links"]
model_config = ConfigDict(
populate_by_name=True,
validate_assignment=True,
protected_namespaces=(),
extra="allow",
)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True)
@classmethod
def from_json(cls, json_str: str) -> Optional[Self]:
"""Create an instance of Permissions from a JSON string"""
return cls.from_dict(json.loads(json_str))
def to_dict(self) -> Dict[str, Any]:
"""Return the dictionary representation of the model using alias.
This has the following differences from calling pydantic's
`self.model_dump(by_alias=True)`:
* `None` is only added to the output dict for nullable fields that
were set at model initialization. Other fields with value `None`
are ignored.
"""
excluded_fields: Set[str] = set([
])
_dict = self.model_dump(
by_alias=True,
exclude=excluded_fields,
exclude_none=True,
)
# override the default output from pydantic by calling `to_dict()` of each item in permissions (list)
_items = []
if self.permissions:
for _item in self.permissions:
if _item:
_items.append(_item.to_dict())
_dict['permissions'] = _items
# override the default output from pydantic by calling `to_dict()` of links
if self.links:
_dict['_links'] = self.links.to_dict()
return _dict
@classmethod
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
"""Create an instance of Permissions from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
return cls.model_validate(obj)
_obj = cls.model_validate({
"permissions": [Permission.from_dict(_item) for _item in obj["permissions"]] if obj.get("permissions") is not None else None,
"_links": SelfLinks.from_dict(obj["_links"]) if obj.get("_links") is not None else None
})
return _obj

View File

@ -0,0 +1,90 @@
# coding: utf-8
"""
Administrative API
## Overview Manage users, accounts, and account groups in the ThousandEyes platform using the Administrative API. This API provides the following endpoints that define the operations to manage your organization: * `/account-groups`: Account groups are used to divide an organization into different sections. These endpoints can be used to create, retrieve, update and delete account groups. * `/users`: Create, retrieve, update and delete users within an organization. * `/roles`: Create, retrieve and update roles for the current user. * `/permissions`: Retrieve all assignable permissions. Used in the context of modifying roles. * `/audit-user-events`: Retrieve all activity log events. For more information about the administrative models, see [Account Management](https://docs.thousandeyes.com/product-documentation/user-management).
The version of the OpenAPI document: 7.0.6
Generated by OpenAPI Generator (https://openapi-generator.tech)
Do not edit the class manually.
""" # noqa: E501
from __future__ import annotations
import pprint
import re # noqa: F401
import json
from pydantic import BaseModel, ConfigDict, Field, StrictStr
from typing import Any, ClassVar, Dict, List, Optional
from typing import Optional, Set
from typing_extensions import Self
class Resource(BaseModel):
"""
Resource
""" # noqa: E501
type: Optional[StrictStr] = Field(default=None, description="Type of resource affected. Can be “testName”, “reportTitle”, “userDisplayName”, “alertRuleName”, etc.")
name: Optional[StrictStr] = Field(default=None, description="Name of the affected resource.")
__properties: ClassVar[List[str]] = ["type", "name"]
model_config = ConfigDict(
populate_by_name=True,
validate_assignment=True,
protected_namespaces=(),
extra="allow",
)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True)
@classmethod
def from_json(cls, json_str: str) -> Optional[Self]:
"""Create an instance of Resource from a JSON string"""
return cls.from_dict(json.loads(json_str))
def to_dict(self) -> Dict[str, Any]:
"""Return the dictionary representation of the model using alias.
This has the following differences from calling pydantic's
`self.model_dump(by_alias=True)`:
* `None` is only added to the output dict for nullable fields that
were set at model initialization. Other fields with value `None`
are ignored.
"""
excluded_fields: Set[str] = set([
])
_dict = self.model_dump(
by_alias=True,
exclude=excluded_fields,
exclude_none=True,
)
return _dict
@classmethod
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
"""Create an instance of Resource from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
return cls.model_validate(obj)
_obj = cls.model_validate({
"type": obj.get("type"),
"name": obj.get("name")
})
return _obj

View File

@ -0,0 +1,94 @@
# coding: utf-8
"""
Administrative API
## Overview Manage users, accounts, and account groups in the ThousandEyes platform using the Administrative API. This API provides the following endpoints that define the operations to manage your organization: * `/account-groups`: Account groups are used to divide an organization into different sections. These endpoints can be used to create, retrieve, update and delete account groups. * `/users`: Create, retrieve, update and delete users within an organization. * `/roles`: Create, retrieve and update roles for the current user. * `/permissions`: Retrieve all assignable permissions. Used in the context of modifying roles. * `/audit-user-events`: Retrieve all activity log events. For more information about the administrative models, see [Account Management](https://docs.thousandeyes.com/product-documentation/user-management).
The version of the OpenAPI document: 7.0.6
Generated by OpenAPI Generator (https://openapi-generator.tech)
Do not edit the class manually.
""" # noqa: E501
from __future__ import annotations
import pprint
import re # noqa: F401
import json
from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr
from typing import Any, ClassVar, Dict, List, Optional
from typing import Optional, Set
from typing_extensions import Self
class Role(BaseModel):
"""
Role
""" # noqa: E501
name: Optional[StrictStr] = Field(default=None, description="Name of the role.")
role_id: Optional[StrictStr] = Field(default=None, description="Unique ID representing the role.", alias="roleId")
is_builtin: Optional[StrictBool] = Field(default=None, description="Flag indicating if the role is built-in (Account Admin, Organization Admin, Regular User).", alias="isBuiltin")
has_management_permissions: Optional[StrictBool] = Field(default=None, description="Flag indicating whether the user has management permissions.", alias="hasManagementPermissions")
__properties: ClassVar[List[str]] = ["name", "roleId", "isBuiltin", "hasManagementPermissions"]
model_config = ConfigDict(
populate_by_name=True,
validate_assignment=True,
protected_namespaces=(),
extra="allow",
)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True)
@classmethod
def from_json(cls, json_str: str) -> Optional[Self]:
"""Create an instance of Role from a JSON string"""
return cls.from_dict(json.loads(json_str))
def to_dict(self) -> Dict[str, Any]:
"""Return the dictionary representation of the model using alias.
This has the following differences from calling pydantic's
`self.model_dump(by_alias=True)`:
* `None` is only added to the output dict for nullable fields that
were set at model initialization. Other fields with value `None`
are ignored.
"""
excluded_fields: Set[str] = set([
])
_dict = self.model_dump(
by_alias=True,
exclude=excluded_fields,
exclude_none=True,
)
return _dict
@classmethod
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
"""Create an instance of Role from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
return cls.model_validate(obj)
_obj = cls.model_validate({
"name": obj.get("name"),
"roleId": obj.get("roleId"),
"isBuiltin": obj.get("isBuiltin"),
"hasManagementPermissions": obj.get("hasManagementPermissions")
})
return _obj

View File

@ -0,0 +1,108 @@
# coding: utf-8
"""
Administrative API
## Overview Manage users, accounts, and account groups in the ThousandEyes platform using the Administrative API. This API provides the following endpoints that define the operations to manage your organization: * `/account-groups`: Account groups are used to divide an organization into different sections. These endpoints can be used to create, retrieve, update and delete account groups. * `/users`: Create, retrieve, update and delete users within an organization. * `/roles`: Create, retrieve and update roles for the current user. * `/permissions`: Retrieve all assignable permissions. Used in the context of modifying roles. * `/audit-user-events`: Retrieve all activity log events. For more information about the administrative models, see [Account Management](https://docs.thousandeyes.com/product-documentation/user-management).
The version of the OpenAPI document: 7.0.6
Generated by OpenAPI Generator (https://openapi-generator.tech)
Do not edit the class manually.
""" # noqa: E501
from __future__ import annotations
import pprint
import re # noqa: F401
import json
from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr
from typing import Any, ClassVar, Dict, List, Optional
from thousandeyes_sdk.admin.models.permission import Permission
from thousandeyes_sdk.admin.models.self_links import SelfLinks
from typing import Optional, Set
from typing_extensions import Self
class RoleDetail(BaseModel):
"""
RoleDetail
""" # noqa: E501
name: Optional[StrictStr] = Field(default=None, description="Name of the role.")
role_id: Optional[StrictStr] = Field(default=None, description="Unique ID representing the role.", alias="roleId")
is_builtin: Optional[StrictBool] = Field(default=None, description="Flag indicating if the role is built-in (Account Admin, Organization Admin, Regular User).", alias="isBuiltin")
permissions: Optional[List[Permission]] = None
links: Optional[SelfLinks] = Field(default=None, alias="_links")
__properties: ClassVar[List[str]] = ["name", "roleId", "isBuiltin", "permissions", "_links"]
model_config = ConfigDict(
populate_by_name=True,
validate_assignment=True,
protected_namespaces=(),
extra="allow",
)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True)
@classmethod
def from_json(cls, json_str: str) -> Optional[Self]:
"""Create an instance of RoleDetail from a JSON string"""
return cls.from_dict(json.loads(json_str))
def to_dict(self) -> Dict[str, Any]:
"""Return the dictionary representation of the model using alias.
This has the following differences from calling pydantic's
`self.model_dump(by_alias=True)`:
* `None` is only added to the output dict for nullable fields that
were set at model initialization. Other fields with value `None`
are ignored.
"""
excluded_fields: Set[str] = set([
])
_dict = self.model_dump(
by_alias=True,
exclude=excluded_fields,
exclude_none=True,
)
# override the default output from pydantic by calling `to_dict()` of each item in permissions (list)
_items = []
if self.permissions:
for _item in self.permissions:
if _item:
_items.append(_item.to_dict())
_dict['permissions'] = _items
# override the default output from pydantic by calling `to_dict()` of links
if self.links:
_dict['_links'] = self.links.to_dict()
return _dict
@classmethod
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
"""Create an instance of RoleDetail from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
return cls.model_validate(obj)
_obj = cls.model_validate({
"name": obj.get("name"),
"roleId": obj.get("roleId"),
"isBuiltin": obj.get("isBuiltin"),
"permissions": [Permission.from_dict(_item) for _item in obj["permissions"]] if obj.get("permissions") is not None else None,
"_links": SelfLinks.from_dict(obj["_links"]) if obj.get("_links") is not None else None
})
return _obj

View File

@ -0,0 +1,90 @@
# coding: utf-8
"""
Administrative API
## Overview Manage users, accounts, and account groups in the ThousandEyes platform using the Administrative API. This API provides the following endpoints that define the operations to manage your organization: * `/account-groups`: Account groups are used to divide an organization into different sections. These endpoints can be used to create, retrieve, update and delete account groups. * `/users`: Create, retrieve, update and delete users within an organization. * `/roles`: Create, retrieve and update roles for the current user. * `/permissions`: Retrieve all assignable permissions. Used in the context of modifying roles. * `/audit-user-events`: Retrieve all activity log events. For more information about the administrative models, see [Account Management](https://docs.thousandeyes.com/product-documentation/user-management).
The version of the OpenAPI document: 7.0.6
Generated by OpenAPI Generator (https://openapi-generator.tech)
Do not edit the class manually.
""" # noqa: E501
from __future__ import annotations
import pprint
import re # noqa: F401
import json
from pydantic import BaseModel, ConfigDict, Field, StrictStr
from typing import Any, ClassVar, Dict, List, Optional
from typing import Optional, Set
from typing_extensions import Self
class RoleRequestBody(BaseModel):
"""
RoleRequestBody
""" # noqa: E501
name: Optional[StrictStr] = Field(default=None, description="Name of the role.")
permissions: Optional[List[StrictStr]] = Field(default=None, description="Contains list of test permission IDs (get `permissionId` from `/permissions` endpoint)")
__properties: ClassVar[List[str]] = ["name", "permissions"]
model_config = ConfigDict(
populate_by_name=True,
validate_assignment=True,
protected_namespaces=(),
extra="allow",
)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True)
@classmethod
def from_json(cls, json_str: str) -> Optional[Self]:
"""Create an instance of RoleRequestBody from a JSON string"""
return cls.from_dict(json.loads(json_str))
def to_dict(self) -> Dict[str, Any]:
"""Return the dictionary representation of the model using alias.
This has the following differences from calling pydantic's
`self.model_dump(by_alias=True)`:
* `None` is only added to the output dict for nullable fields that
were set at model initialization. Other fields with value `None`
are ignored.
"""
excluded_fields: Set[str] = set([
])
_dict = self.model_dump(
by_alias=True,
exclude=excluded_fields,
exclude_none=True,
)
return _dict
@classmethod
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
"""Create an instance of RoleRequestBody from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
return cls.model_validate(obj)
_obj = cls.model_validate({
"name": obj.get("name"),
"permissions": obj.get("permissions")
})
return _obj

View File

@ -0,0 +1,102 @@
# coding: utf-8
"""
Administrative API
## Overview Manage users, accounts, and account groups in the ThousandEyes platform using the Administrative API. This API provides the following endpoints that define the operations to manage your organization: * `/account-groups`: Account groups are used to divide an organization into different sections. These endpoints can be used to create, retrieve, update and delete account groups. * `/users`: Create, retrieve, update and delete users within an organization. * `/roles`: Create, retrieve and update roles for the current user. * `/permissions`: Retrieve all assignable permissions. Used in the context of modifying roles. * `/audit-user-events`: Retrieve all activity log events. For more information about the administrative models, see [Account Management](https://docs.thousandeyes.com/product-documentation/user-management).
The version of the OpenAPI document: 7.0.6
Generated by OpenAPI Generator (https://openapi-generator.tech)
Do not edit the class manually.
""" # noqa: E501
from __future__ import annotations
import pprint
import re # noqa: F401
import json
from pydantic import BaseModel, ConfigDict, Field
from typing import Any, ClassVar, Dict, List, Optional
from thousandeyes_sdk.admin.models.role import Role
from thousandeyes_sdk.admin.models.self_links import SelfLinks
from typing import Optional, Set
from typing_extensions import Self
class Roles(BaseModel):
"""
Roles
""" # noqa: E501
roles: Optional[List[Role]] = None
links: Optional[SelfLinks] = Field(default=None, alias="_links")
__properties: ClassVar[List[str]] = ["roles", "_links"]
model_config = ConfigDict(
populate_by_name=True,
validate_assignment=True,
protected_namespaces=(),
extra="allow",
)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True)
@classmethod
def from_json(cls, json_str: str) -> Optional[Self]:
"""Create an instance of Roles from a JSON string"""
return cls.from_dict(json.loads(json_str))
def to_dict(self) -> Dict[str, Any]:
"""Return the dictionary representation of the model using alias.
This has the following differences from calling pydantic's
`self.model_dump(by_alias=True)`:
* `None` is only added to the output dict for nullable fields that
were set at model initialization. Other fields with value `None`
are ignored.
"""
excluded_fields: Set[str] = set([
])
_dict = self.model_dump(
by_alias=True,
exclude=excluded_fields,
exclude_none=True,
)
# override the default output from pydantic by calling `to_dict()` of each item in roles (list)
_items = []
if self.roles:
for _item in self.roles:
if _item:
_items.append(_item.to_dict())
_dict['roles'] = _items
# override the default output from pydantic by calling `to_dict()` of links
if self.links:
_dict['_links'] = self.links.to_dict()
return _dict
@classmethod
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
"""Create an instance of Roles from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
return cls.model_validate(obj)
_obj = cls.model_validate({
"roles": [Role.from_dict(_item) for _item in obj["roles"]] if obj.get("roles") is not None else None,
"_links": SelfLinks.from_dict(obj["_links"]) if obj.get("_links") is not None else None
})
return _obj

View File

@ -0,0 +1,92 @@
# coding: utf-8
"""
Administrative API
## Overview Manage users, accounts, and account groups in the ThousandEyes platform using the Administrative API. This API provides the following endpoints that define the operations to manage your organization: * `/account-groups`: Account groups are used to divide an organization into different sections. These endpoints can be used to create, retrieve, update and delete account groups. * `/users`: Create, retrieve, update and delete users within an organization. * `/roles`: Create, retrieve and update roles for the current user. * `/permissions`: Retrieve all assignable permissions. Used in the context of modifying roles. * `/audit-user-events`: Retrieve all activity log events. For more information about the administrative models, see [Account Management](https://docs.thousandeyes.com/product-documentation/user-management).
The version of the OpenAPI document: 7.0.6
Generated by OpenAPI Generator (https://openapi-generator.tech)
Do not edit the class manually.
""" # noqa: E501
from __future__ import annotations
import pprint
import re # noqa: F401
import json
from pydantic import BaseModel, ConfigDict, Field
from typing import Any, ClassVar, Dict, List, Optional
from thousandeyes_sdk.admin.models.link import Link
from typing import Optional, Set
from typing_extensions import Self
class SelfLinks(BaseModel):
"""
A links object containing the self link.
""" # noqa: E501
var_self: Optional[Link] = Field(default=None, alias="self")
__properties: ClassVar[List[str]] = ["self"]
model_config = ConfigDict(
populate_by_name=True,
validate_assignment=True,
protected_namespaces=(),
extra="allow",
)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True)
@classmethod
def from_json(cls, json_str: str) -> Optional[Self]:
"""Create an instance of SelfLinks from a JSON string"""
return cls.from_dict(json.loads(json_str))
def to_dict(self) -> Dict[str, Any]:
"""Return the dictionary representation of the model using alias.
This has the following differences from calling pydantic's
`self.model_dump(by_alias=True)`:
* `None` is only added to the output dict for nullable fields that
were set at model initialization. Other fields with value `None`
are ignored.
"""
excluded_fields: Set[str] = set([
])
_dict = self.model_dump(
by_alias=True,
exclude=excluded_fields,
exclude_none=True,
)
# override the default output from pydantic by calling `to_dict()` of var_self
if self.var_self:
_dict['self'] = self.var_self.to_dict()
return _dict
@classmethod
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
"""Create an instance of SelfLinks from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
return cls.model_validate(obj)
_obj = cls.model_validate({
"self": Link.from_dict(obj["self"]) if obj.get("self") is not None else None
})
return _obj

View File

@ -0,0 +1,122 @@
# coding: utf-8
"""
Administrative API
## Overview Manage users, accounts, and account groups in the ThousandEyes platform using the Administrative API. This API provides the following endpoints that define the operations to manage your organization: * `/account-groups`: Account groups are used to divide an organization into different sections. These endpoints can be used to create, retrieve, update and delete account groups. * `/users`: Create, retrieve, update and delete users within an organization. * `/roles`: Create, retrieve and update roles for the current user. * `/permissions`: Retrieve all assignable permissions. Used in the context of modifying roles. * `/audit-user-events`: Retrieve all activity log events. For more information about the administrative models, see [Account Management](https://docs.thousandeyes.com/product-documentation/user-management).
The version of the OpenAPI document: 7.0.6
Generated by OpenAPI Generator (https://openapi-generator.tech)
Do not edit the class manually.
""" # noqa: E501
from __future__ import annotations
import pprint
import re # noqa: F401
import json
from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr
from typing import Any, ClassVar, Dict, List, Optional
from typing import Optional, Set
from typing_extensions import Self
class SimpleAgent(BaseModel):
"""
SimpleAgent
""" # noqa: E501
ip_addresses: Optional[List[StrictStr]] = Field(default=None, description="Array of private IP addresses.", alias="ipAddresses")
public_ip_addresses: Optional[List[StrictStr]] = Field(default=None, description="Array of public IP addresses.", alias="publicIpAddresses")
network: Optional[StrictStr] = Field(default=None, description="Network (including ASN) of agents public IP.")
agent_id: Optional[StrictStr] = Field(default=None, description="Unique ID of the agent.", alias="agentId")
agent_name: Optional[StrictStr] = Field(default=None, description="Name of the agent.", alias="agentName")
location: Optional[StrictStr] = Field(default=None, description="Location of the agent.")
country_id: Optional[StrictStr] = Field(default=None, description="2-digit ISO country code", alias="countryId")
enabled: Optional[StrictBool] = Field(default=None, description="Flag indicating if the agent is enabled.")
prefix: Optional[StrictStr] = Field(default=None, description="Prefix containing agents public IP address.")
verify_ssl_certificates: Optional[StrictBool] = Field(default=None, description="Flag indicating if has normal SSL operations or if instead it's set to ignore SSL errors on browserbot-based tests.", alias="verifySslCertificates")
__properties: ClassVar[List[str]] = ["ipAddresses", "publicIpAddresses", "network", "agentId", "agentName", "location", "countryId", "enabled", "prefix", "verifySslCertificates"]
model_config = ConfigDict(
populate_by_name=True,
validate_assignment=True,
protected_namespaces=(),
extra="allow",
)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True)
@classmethod
def from_json(cls, json_str: str) -> Optional[Self]:
"""Create an instance of SimpleAgent from a JSON string"""
return cls.from_dict(json.loads(json_str))
def to_dict(self) -> Dict[str, Any]:
"""Return the dictionary representation of the model using alias.
This has the following differences from calling pydantic's
`self.model_dump(by_alias=True)`:
* `None` is only added to the output dict for nullable fields that
were set at model initialization. Other fields with value `None`
are ignored.
* OpenAPI `readOnly` fields are excluded.
* OpenAPI `readOnly` fields are excluded.
* OpenAPI `readOnly` fields are excluded.
* OpenAPI `readOnly` fields are excluded.
* OpenAPI `readOnly` fields are excluded.
* OpenAPI `readOnly` fields are excluded.
* OpenAPI `readOnly` fields are excluded.
* OpenAPI `readOnly` fields are excluded.
"""
excluded_fields: Set[str] = set([
"ip_addresses",
"public_ip_addresses",
"network",
"agent_id",
"location",
"country_id",
"prefix",
"verify_ssl_certificates",
])
_dict = self.model_dump(
by_alias=True,
exclude=excluded_fields,
exclude_none=True,
)
return _dict
@classmethod
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
"""Create an instance of SimpleAgent from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
return cls.model_validate(obj)
_obj = cls.model_validate({
"ipAddresses": obj.get("ipAddresses"),
"publicIpAddresses": obj.get("publicIpAddresses"),
"network": obj.get("network"),
"agentId": obj.get("agentId"),
"agentName": obj.get("agentName"),
"location": obj.get("location"),
"countryId": obj.get("countryId"),
"enabled": obj.get("enabled"),
"prefix": obj.get("prefix"),
"verifySslCertificates": obj.get("verifySslCertificates")
})
return _obj

View File

@ -0,0 +1,90 @@
# coding: utf-8
"""
Administrative API
## Overview Manage users, accounts, and account groups in the ThousandEyes platform using the Administrative API. This API provides the following endpoints that define the operations to manage your organization: * `/account-groups`: Account groups are used to divide an organization into different sections. These endpoints can be used to create, retrieve, update and delete account groups. * `/users`: Create, retrieve, update and delete users within an organization. * `/roles`: Create, retrieve and update roles for the current user. * `/permissions`: Retrieve all assignable permissions. Used in the context of modifying roles. * `/audit-user-events`: Retrieve all activity log events. For more information about the administrative models, see [Account Management](https://docs.thousandeyes.com/product-documentation/user-management).
The version of the OpenAPI document: 7.0.6
Generated by OpenAPI Generator (https://openapi-generator.tech)
Do not edit the class manually.
""" # noqa: E501
from __future__ import annotations
import pprint
import re # noqa: F401
import json
from pydantic import BaseModel, ConfigDict, StrictStr
from typing import Any, ClassVar, Dict, List, Optional
from typing import Optional, Set
from typing_extensions import Self
class UnauthorizedError(BaseModel):
"""
UnauthorizedError
""" # noqa: E501
error: Optional[StrictStr] = None
error_description: Optional[StrictStr] = None
__properties: ClassVar[List[str]] = ["error", "error_description"]
model_config = ConfigDict(
populate_by_name=True,
validate_assignment=True,
protected_namespaces=(),
extra="allow",
)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True)
@classmethod
def from_json(cls, json_str: str) -> Optional[Self]:
"""Create an instance of UnauthorizedError from a JSON string"""
return cls.from_dict(json.loads(json_str))
def to_dict(self) -> Dict[str, Any]:
"""Return the dictionary representation of the model using alias.
This has the following differences from calling pydantic's
`self.model_dump(by_alias=True)`:
* `None` is only added to the output dict for nullable fields that
were set at model initialization. Other fields with value `None`
are ignored.
"""
excluded_fields: Set[str] = set([
])
_dict = self.model_dump(
by_alias=True,
exclude=excluded_fields,
exclude_none=True,
)
return _dict
@classmethod
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
"""Create an instance of UnauthorizedError from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
return cls.model_validate(obj)
_obj = cls.model_validate({
"error": obj.get("error"),
"error_description": obj.get("error_description")
})
return _obj

Some files were not shown because too many files have changed in this diff Show More