Administrative API
- API version: 7.0.25
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.
Automatically generated by the OpenAPI Generator
Building the API client library requires:
- Java 11+
- Maven/Gradle
To install the API client library to your local Maven repository, simply execute:
mvn clean install
To deploy it to a remote Maven repository instead, configure the settings of the repository and execute:
mvn clean deploy
Refer to the OSSRH Guide for more information.
Add this dependency to your project's POM:
<dependencies>
<dependency>
<groupId>com.thousandeyes.sdk</groupId>
<artifactId>administrative</artifactId>
<version>version</version>
</dependency>
<dependency>
<groupId>com.thousandeyes.sdk</groupId>
<artifactId>client</artifactId>
<version>version</version>
</dependency>
<!-- Example only, you can use your own client implementation -->
<dependency>
<groupId>com.thousandeyes.sdk</groupId>
<artifactId>client-native</artifactId>
<version>version</version>
</dependency>
</dependencies>
Add this dependency to your project's build file:
implementation "com.thousandeyes.sdk:client:<version>"
implementation "com.thousandeyes.sdk:client-native:<version>" #Example only, you can use your own client implementation
implementation "com.thousandeyes.sdk:administrative:<version>"
At first generate the JAR by executing:
mvn clean package
Then manually install the following JARs:
target/administrative-version.jar
target/lib/*.jar
Please follow the installation instruction and execute the following Java code:
import com.thousandeyes.sdk.account.management.*;
import com.thousandeyes.sdk.account.management.client.*;
import com.thousandeyes.sdk.account.management.administrative.model.*;
import com.thousandeyes.sdk.account.management.administrative.AccountGroupsApi;
public class AccountGroupsApiExample {
public static void main(String[] args) {
// Configure clients using the `defaultClient` object, such as
// overriding the host and port, timeout, etc. In this example we are using the NativeApiClient
// but you can use your own client implementation
ApiClient defaultClient = NativeApiClient
.builder()
.baseUri("https://api.thousandeyes.com/v7")
.bearerToken("<bearer-token>")
.build();
AccountGroupsApi apiInstance = new AccountGroupsApi(defaultClient);
AccountGroupRequest accountGroupRequest = new AccountGroupRequest(); // AccountGroupRequest |
List<ExpandAccountGroupOptions> expand = Arrays.asList(); // 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.
try {
CreatedAccountGroup result = apiInstance.createAccountGroup(accountGroupRequest, expand);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling AccountGroupsApi#createAccountGroup");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}
All URIs are relative to https://api.thousandeyes.com/v7
Class | Method | HTTP request | Description |
---|---|---|---|
AccountGroupsApi | createAccountGroup | POST /account-groups | Create account group |
AccountGroupsApi | createAccountGroupWithHttpInfo | POST /account-groups | Create account group |
AccountGroupsApi | deleteAccountGroup | DELETE /account-groups/{id} | Delete account group |
AccountGroupsApi | deleteAccountGroupWithHttpInfo | DELETE /account-groups/{id} | Delete account group |
AccountGroupsApi | getAccountGroup | GET /account-groups/{id} | Retrieve account group |
AccountGroupsApi | getAccountGroupWithHttpInfo | GET /account-groups/{id} | Retrieve account group |
AccountGroupsApi | getAccountGroups | GET /account-groups | List account groups |
AccountGroupsApi | getAccountGroupsWithHttpInfo | GET /account-groups | List account groups |
AccountGroupsApi | updateAccountGroup | PUT /account-groups/{id} | Update account group |
AccountGroupsApi | updateAccountGroupWithHttpInfo | PUT /account-groups/{id} | Update account group |
PermissionsApi | getPermissions | GET /permissions | List assignable permissions |
PermissionsApi | getPermissionsWithHttpInfo | GET /permissions | List assignable permissions |
RolesApi | createRole | POST /roles | Create role |
RolesApi | createRoleWithHttpInfo | POST /roles | Create role |
RolesApi | deleteRole | DELETE /roles/{id} | Delete role |
RolesApi | deleteRoleWithHttpInfo | DELETE /roles/{id} | Delete role |
RolesApi | getRole | GET /roles/{id} | Retrieve role |
RolesApi | getRoleWithHttpInfo | GET /roles/{id} | Retrieve role |
RolesApi | getRoles | GET /roles | List roles |
RolesApi | getRolesWithHttpInfo | GET /roles | List roles |
RolesApi | updateRole | PUT /roles/{id} | Update role |
RolesApi | updateRoleWithHttpInfo | PUT /roles/{id} | Update role |
UserEventsApi | getUserEvents | GET /audit-user-events | List activity log events |
UserEventsApi | getUserEventsWithHttpInfo | GET /audit-user-events | List activity log events |
UsersApi | createUser | POST /users | Create user |
UsersApi | createUserWithHttpInfo | POST /users | Create user |
UsersApi | deleteUser | DELETE /users/{id} | Delete user |
UsersApi | deleteUserWithHttpInfo | DELETE /users/{id} | Delete user |
UsersApi | getCurrentUser | GET /users/current | Retrieve current user |
UsersApi | getCurrentUserWithHttpInfo | GET /users/current | Retrieve current user |
UsersApi | getUser | GET /users/{id} | Retrieve user |
UsersApi | getUserWithHttpInfo | GET /users/{id} | Retrieve user |
UsersApi | getUsers | GET /users | List users |
UsersApi | getUsersWithHttpInfo | GET /users | List users |
UsersApi | updateUser | PUT /users/{id} | Update user |
UsersApi | updateUserWithHttpInfo | PUT /users/{id} | Update user |
Authentication schemes defined for the API:
- Type: HTTP Bearer Token authentication
It's recommended to create an instance of ApiClient
per thread in a multithreaded environment to avoid any potential issues.
However, the instances of the api clients created from the ApiClient
are thread-safe and can be re-used.