-
Notifications
You must be signed in to change notification settings - Fork 1
TokenApi
Víctor Cañizares edited this page Dec 14, 2020
·
1 revision
All URIs are relative to https://demo.iriusrisk.com/api/v1
Method | HTTP request | Description |
---|---|---|
usersUsernameTokenPost | POST /users/{username}/token | Generates a user API token |
String usersUsernameTokenPost(apiToken, username)
Generates a user API token
Generates a new user API token. If the user already has a generated API token, generates a new one. Conditions to be able to perform the action: - To have the permission ALL_USERS_UPDATE granted, or - To have the permission MANAGE_USERS_BU granted. Having this permission you can generate a user API token to users who belongs to some of your user groups.
// Import classes:
//import io.swagger.client.ApiException;
//import io.swagger.client.api.TokenApi;
TokenApi apiInstance = new TokenApi();
String apiToken = "apiToken_example"; // String | Authentication token
String username = "username_example"; // String | User's username
try {
String result = apiInstance.usersUsernameTokenPost(apiToken, username);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling TokenApi#usersUsernameTokenPost");
e.printStackTrace();
}
Name | Type | Description | Notes |
---|---|---|---|
apiToken | String | Authentication token | |
username | String | User's username |
String
No authorization required
- Content-Type: Not defined
- Accept: application/json