mirror of
https://github.com/thousandeyes/thousandeyes-sdk-python.git
synced 2025-12-06 06:26:51 +00:00
197 lines
15 KiB
Markdown
197 lines
15 KiB
Markdown
# thousandeyes-sdk-administrative
|
|
Manage users, accounts, and account groups in the ThousandEyes platform using the Administrative API.
|
|
This API provides the following operations to manage your organization:
|
|
|
|
* `/account-groups`: Account groups are used to divide an organization into different sections. These operations 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.58
|
|
- Generator version: 7.6.0
|
|
- Build package: com.thousandeyes.api.codegen.ThousandeyesPythonGenerator
|
|
|
|
## Requirements.
|
|
|
|
Python 3.8+
|
|
|
|
## Installation & Usage
|
|
### pip install
|
|
|
|
Install directly via PyPi:
|
|
|
|
```sh
|
|
pip install thousandeyes-sdk-administrative
|
|
```
|
|
(you may need to run `pip` with root permission: `sudo pip install thousandeyes-sdk-administrative`)
|
|
|
|
Then import the package:
|
|
```python
|
|
import thousandeyes_sdk.administrative
|
|
```
|
|
|
|
### 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.administrative
|
|
```
|
|
|
|
### Tests
|
|
|
|
Execute `pytest` to run the tests.
|
|
|
|
## Getting Started
|
|
|
|
Please follow the installation procedure and then run the following:
|
|
|
|
```python
|
|
|
|
import thousandeyes_sdk.core
|
|
import thousandeyes_sdk.administrative
|
|
from thousandeyes_sdk.core.exceptions import ApiException
|
|
from pprint import pprint
|
|
|
|
# Defining the host is optional and defaults to https://api.thousandeyes.com/v7
|
|
# See configuration.py for a list of all supported configuration parameters.
|
|
configuration = thousandeyes_sdk.core.Configuration(
|
|
host = "https://api.thousandeyes.com/v7"
|
|
)
|
|
|
|
# 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.administrative.AccountGroupsApi(api_client)
|
|
account_group_request = thousandeyes_sdk.administrative.AccountGroupRequest() # AccountGroupRequest |
|
|
expand = [thousandeyes_sdk.administrative.ExpandAccountGroupOptions()] # List[ExpandAccountGroupOptions] | 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/v7*
|
|
|
|
Class | Method | HTTP request | Description
|
|
------------ | ------------- | ------------- | -------------
|
|
*AccountGroupsApi* | [**create_account_group**](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-administrative/docs/AccountGroupsApi.md#create_account_group) | **POST** /account-groups | Create account group
|
|
*AccountGroupsApi* | [**delete_account_group**](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-administrative/docs/AccountGroupsApi.md#delete_account_group) | **DELETE** /account-groups/{id} | Delete account group
|
|
*AccountGroupsApi* | [**get_account_group**](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-administrative/docs/AccountGroupsApi.md#get_account_group) | **GET** /account-groups/{id} | Retrieve account group
|
|
*AccountGroupsApi* | [**get_account_groups**](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-administrative/docs/AccountGroupsApi.md#get_account_groups) | **GET** /account-groups | List account groups
|
|
*AccountGroupsApi* | [**update_account_group**](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-administrative/docs/AccountGroupsApi.md#update_account_group) | **PUT** /account-groups/{id} | Update account group
|
|
*PermissionsApi* | [**get_permissions**](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-administrative/docs/PermissionsApi.md#get_permissions) | **GET** /permissions | List assignable permissions
|
|
*RolesApi* | [**create_role**](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-administrative/docs/RolesApi.md#create_role) | **POST** /roles | Create role
|
|
*RolesApi* | [**delete_role**](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-administrative/docs/RolesApi.md#delete_role) | **DELETE** /roles/{id} | Delete role
|
|
*RolesApi* | [**get_role**](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-administrative/docs/RolesApi.md#get_role) | **GET** /roles/{id} | Retrieve role
|
|
*RolesApi* | [**get_roles**](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-administrative/docs/RolesApi.md#get_roles) | **GET** /roles | List roles
|
|
*RolesApi* | [**update_role**](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-administrative/docs/RolesApi.md#update_role) | **PUT** /roles/{id} | Update role
|
|
*UserEventsApi* | [**get_user_events**](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-administrative/docs/UserEventsApi.md#get_user_events) | **GET** /audit-user-events | List activity log events
|
|
*UsersApi* | [**create_user**](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-administrative/docs/UsersApi.md#create_user) | **POST** /users | Create user
|
|
*UsersApi* | [**delete_user**](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-administrative/docs/UsersApi.md#delete_user) | **DELETE** /users/{id} | Delete user
|
|
*UsersApi* | [**get_current_user**](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-administrative/docs/UsersApi.md#get_current_user) | **GET** /users/current | Retrieve current user
|
|
*UsersApi* | [**get_user**](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-administrative/docs/UsersApi.md#get_user) | **GET** /users/{id} | Retrieve user
|
|
*UsersApi* | [**get_users**](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-administrative/docs/UsersApi.md#get_users) | **GET** /users | List users
|
|
*UsersApi* | [**update_user**](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-administrative/docs/UsersApi.md#update_user) | **PUT** /users/{id} | Update user
|
|
|
|
|
|
## Documentation For Models
|
|
|
|
- [AccountGroup](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-administrative/docs/AccountGroup.md)
|
|
- [AccountGroupDetail](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-administrative/docs/AccountGroupDetail.md)
|
|
- [AccountGroupInfo](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-administrative/docs/AccountGroupInfo.md)
|
|
- [AccountGroupRequest](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-administrative/docs/AccountGroupRequest.md)
|
|
- [AccountGroupRole](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-administrative/docs/AccountGroupRole.md)
|
|
- [AccountGroups](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-administrative/docs/AccountGroups.md)
|
|
- [AgentBase](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-administrative/docs/AgentBase.md)
|
|
- [AgentResponse](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-administrative/docs/AgentResponse.md)
|
|
- [AuditUserEvents](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-administrative/docs/AuditUserEvents.md)
|
|
- [BaseRole](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-administrative/docs/BaseRole.md)
|
|
- [CloudEnterpriseAgentType](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-administrative/docs/CloudEnterpriseAgentType.md)
|
|
- [ClusterMember](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-administrative/docs/ClusterMember.md)
|
|
- [CreatedAccountGroup](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-administrative/docs/CreatedAccountGroup.md)
|
|
- [CreatedUser](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-administrative/docs/CreatedUser.md)
|
|
- [EnterpriseAgent](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-administrative/docs/EnterpriseAgent.md)
|
|
- [EnterpriseAgentData](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-administrative/docs/EnterpriseAgentData.md)
|
|
- [EnterpriseAgentIpv6Policy](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-administrative/docs/EnterpriseAgentIpv6Policy.md)
|
|
- [EnterpriseAgentState](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-administrative/docs/EnterpriseAgentState.md)
|
|
- [Error](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-administrative/docs/Error.md)
|
|
- [ErrorDetail](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-administrative/docs/ErrorDetail.md)
|
|
- [ErrorDetailCode](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-administrative/docs/ErrorDetailCode.md)
|
|
- [ExpandAccountGroupOptions](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-administrative/docs/ExpandAccountGroupOptions.md)
|
|
- [ExtendedUser](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-administrative/docs/ExtendedUser.md)
|
|
- [InterfaceIpMapping](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-administrative/docs/InterfaceIpMapping.md)
|
|
- [Link](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-administrative/docs/Link.md)
|
|
- [PaginationLinks](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-administrative/docs/PaginationLinks.md)
|
|
- [Permission](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-administrative/docs/Permission.md)
|
|
- [Permissions](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-administrative/docs/Permissions.md)
|
|
- [Resource](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-administrative/docs/Resource.md)
|
|
- [Role](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-administrative/docs/Role.md)
|
|
- [RoleDetail](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-administrative/docs/RoleDetail.md)
|
|
- [RoleRequestBody](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-administrative/docs/RoleRequestBody.md)
|
|
- [Roles](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-administrative/docs/Roles.md)
|
|
- [SelfLinks](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-administrative/docs/SelfLinks.md)
|
|
- [SimpleAgent](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-administrative/docs/SimpleAgent.md)
|
|
- [SimpleTest](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-administrative/docs/SimpleTest.md)
|
|
- [TestInterval](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-administrative/docs/TestInterval.md)
|
|
- [TestLinks](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-administrative/docs/TestLinks.md)
|
|
- [TestSelfLink](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-administrative/docs/TestSelfLink.md)
|
|
- [TestType](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-administrative/docs/TestType.md)
|
|
- [UnauthorizedError](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-administrative/docs/UnauthorizedError.md)
|
|
- [User](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-administrative/docs/User.md)
|
|
- [UserAccountGroup](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-administrative/docs/UserAccountGroup.md)
|
|
- [UserAccountGroupRole](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-administrative/docs/UserAccountGroupRole.md)
|
|
- [UserDetail](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-administrative/docs/UserDetail.md)
|
|
- [UserEvent](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-administrative/docs/UserEvent.md)
|
|
- [UserRequest](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-administrative/docs/UserRequest.md)
|
|
- [Users](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-administrative/docs/Users.md)
|
|
- [ValidationError](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-administrative/docs/ValidationError.md)
|
|
- [ValidationErrorItem](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-administrative/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
|
|
|
|
<a href="mailto:api-team@thousandeyes.com">ThousandEyes API Team </a>
|
|
|
|
|