All URIs are relative to https://localhost
| Method | HTTP request | Description |
|---|---|---|
| create_or_update_user | POST /api/v2/user | Creates or updates a user |
| delete_user | DELETE /api/v2/user/{id} | Deletes a user identified by id |
| get_all_user | GET /api/v2/user | Get all users |
| get_user | GET /api/v2/user/{id} | Retrieves a user by identifier (email addr) |
| grant_user_permission | POST /api/v2/user/{id}/grant | Grants a specific user permission |
| revoke_user_permission | POST /api/v2/user/{id}/revoke | Revokes a specific user permission |
UserModel create_or_update_user(send_email=send_email, body=body)
Creates or updates a user
from __future__ import print_function
import time
import wavefront_api_client
from wavefront_api_client.rest import ApiException
from pprint import pprint
# Configure API key authorization: api_key
configuration = wavefront_api_client.Configuration()
configuration.api_key['X-AUTH-TOKEN'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['X-AUTH-TOKEN'] = 'Bearer'
# create an instance of the API class
api_instance = wavefront_api_client.UserApi(wavefront_api_client.ApiClient(configuration))
send_email = true # bool | Whether to send email notification to the user, if created. Default: false (optional)
body = wavefront_api_client.UserToCreate() # UserToCreate | Example Body: <pre>{ \"emailAddress\": \"user@example.com\", \"groups\": [ \"browse\" ] }</pre> (optional)
try:
# Creates or updates a user
api_response = api_instance.create_or_update_user(send_email=send_email, body=body)
pprint(api_response)
except ApiException as e:
print("Exception when calling UserApi->create_or_update_user: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| send_email | bool | Whether to send email notification to the user, if created. Default: false | [optional] |
| body | UserToCreate | Example Body: <pre>{ "emailAddress": "user@example.com", "groups": [ "browse" ] }</pre> | [optional] |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
delete_user(id)
Deletes a user identified by id
from __future__ import print_function
import time
import wavefront_api_client
from wavefront_api_client.rest import ApiException
from pprint import pprint
# Configure API key authorization: api_key
configuration = wavefront_api_client.Configuration()
configuration.api_key['X-AUTH-TOKEN'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['X-AUTH-TOKEN'] = 'Bearer'
# create an instance of the API class
api_instance = wavefront_api_client.UserApi(wavefront_api_client.ApiClient(configuration))
id = 'id_example' # str |
try:
# Deletes a user identified by id
api_instance.delete_user(id)
except ApiException as e:
print("Exception when calling UserApi->delete_user: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| id | str |
void (empty response body)
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
list[UserModel] get_all_user()
Get all users
Returns all users
from __future__ import print_function
import time
import wavefront_api_client
from wavefront_api_client.rest import ApiException
from pprint import pprint
# Configure API key authorization: api_key
configuration = wavefront_api_client.Configuration()
configuration.api_key['X-AUTH-TOKEN'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['X-AUTH-TOKEN'] = 'Bearer'
# create an instance of the API class
api_instance = wavefront_api_client.UserApi(wavefront_api_client.ApiClient(configuration))
try:
# Get all users
api_response = api_instance.get_all_user()
pprint(api_response)
except ApiException as e:
print("Exception when calling UserApi->get_all_user: %s\n" % e)This endpoint does not need any parameter.
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
UserModel get_user(id)
Retrieves a user by identifier (email addr)
from __future__ import print_function
import time
import wavefront_api_client
from wavefront_api_client.rest import ApiException
from pprint import pprint
# Configure API key authorization: api_key
configuration = wavefront_api_client.Configuration()
configuration.api_key['X-AUTH-TOKEN'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['X-AUTH-TOKEN'] = 'Bearer'
# create an instance of the API class
api_instance = wavefront_api_client.UserApi(wavefront_api_client.ApiClient(configuration))
id = 'id_example' # str |
try:
# Retrieves a user by identifier (email addr)
api_response = api_instance.get_user(id)
pprint(api_response)
except ApiException as e:
print("Exception when calling UserApi->get_user: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| id | str |
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
UserModel grant_user_permission(id, group=group)
Grants a specific user permission
from __future__ import print_function
import time
import wavefront_api_client
from wavefront_api_client.rest import ApiException
from pprint import pprint
# Configure API key authorization: api_key
configuration = wavefront_api_client.Configuration()
configuration.api_key['X-AUTH-TOKEN'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['X-AUTH-TOKEN'] = 'Bearer'
# create an instance of the API class
api_instance = wavefront_api_client.UserApi(wavefront_api_client.ApiClient(configuration))
id = 'id_example' # str |
group = 'group_example' # str | Permission group to grant to this user. Please note that 'host_tag_management' is the equivalent of the 'Source Tag Management' permission (optional)
try:
# Grants a specific user permission
api_response = api_instance.grant_user_permission(id, group=group)
pprint(api_response)
except ApiException as e:
print("Exception when calling UserApi->grant_user_permission: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| id | str | ||
| group | str | Permission group to grant to this user. Please note that 'host_tag_management' is the equivalent of the 'Source Tag Management' permission | [optional] |
- Content-Type: application/x-www-form-urlencoded
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
UserModel revoke_user_permission(id, group=group)
Revokes a specific user permission
from __future__ import print_function
import time
import wavefront_api_client
from wavefront_api_client.rest import ApiException
from pprint import pprint
# Configure API key authorization: api_key
configuration = wavefront_api_client.Configuration()
configuration.api_key['X-AUTH-TOKEN'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['X-AUTH-TOKEN'] = 'Bearer'
# create an instance of the API class
api_instance = wavefront_api_client.UserApi(wavefront_api_client.ApiClient(configuration))
id = 'id_example' # str |
group = 'group_example' # str | (optional)
try:
# Revokes a specific user permission
api_response = api_instance.revoke_user_permission(id, group=group)
pprint(api_response)
except ApiException as e:
print("Exception when calling UserApi->revoke_user_permission: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| id | str | ||
| group | str | [optional] |
- Content-Type: application/x-www-form-urlencoded
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]