All URIs are relative to http://localhost/service/rest
| Method | HTTP request | Description |
|---|---|---|
| change_password | PUT /beta/security/users/{userId}/change-password | Change a user's password. |
| create_user | POST /beta/security/users | Create a new user in the default source. |
| delete_user | DELETE /beta/security/users/{userId} | Delete a user. |
| get_users | GET /beta/security/users | Retrieve a list of users. Note if the source is not 'default' the response is limited to 100 users. |
| update_user | PUT /beta/security/users/{userId} | Update an existing user. |
change_password(user_id, body=body)
Change a user's password.
from __future__ import print_function
import time
import nexus_api_python_client
from nexus_api_python_client.rest import ApiException
from pprint import pprint
# Enter a context with an instance of the API client
with nexus_api_python_client.ApiClient() as api_client:
# Create an instance of the API class
api_instance = nexus_api_python_client.SecurityManagementUsersApi(api_client)
user_id = 'user_id_example' # str | The userid the request should apply to.
body = 'body_example' # str | The new password to use. (optional)
try:
# Change a user's password.
api_instance.change_password(user_id, body=body)
except ApiException as e:
print("Exception when calling SecurityManagementUsersApi->change_password: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| user_id | str | The userid the request should apply to. | |
| body | str | The new password to use. | [optional] |
void (empty response body)
No authorization required
- Content-Type: text/plain
- Accept: Not defined
| Status code | Description | Response headers |
|---|---|---|
| 400 | Password was not supplied in the body of the request | - |
| 403 | The user does not have permission to perform the operation. | - |
| 404 | User not found in the system. | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ApiUser create_user(body=body)
Create a new user in the default source.
from __future__ import print_function
import time
import nexus_api_python_client
from nexus_api_python_client.rest import ApiException
from pprint import pprint
# Enter a context with an instance of the API client
with nexus_api_python_client.ApiClient() as api_client:
# Create an instance of the API class
api_instance = nexus_api_python_client.SecurityManagementUsersApi(api_client)
body = nexus_api_python_client.ApiCreateUser() # ApiCreateUser | A representation of the user to create. (optional)
try:
# Create a new user in the default source.
api_response = api_instance.create_user(body=body)
pprint(api_response)
except ApiException as e:
print("Exception when calling SecurityManagementUsersApi->create_user: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| body | ApiCreateUser | A representation of the user to create. | [optional] |
No authorization required
- Content-Type: application/json
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | successful operation | - |
| 400 | Password was not supplied in the body of the request | - |
| 403 | The user does not have permission to perform the operation. | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
delete_user(user_id)
Delete a user.
from __future__ import print_function
import time
import nexus_api_python_client
from nexus_api_python_client.rest import ApiException
from pprint import pprint
# Enter a context with an instance of the API client
with nexus_api_python_client.ApiClient() as api_client:
# Create an instance of the API class
api_instance = nexus_api_python_client.SecurityManagementUsersApi(api_client)
user_id = 'user_id_example' # str | The userid the request should apply to.
try:
# Delete a user.
api_instance.delete_user(user_id)
except ApiException as e:
print("Exception when calling SecurityManagementUsersApi->delete_user: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| user_id | str | The userid the request should apply to. |
void (empty response body)
No authorization required
- Content-Type: Not defined
- Accept: Not defined
| Status code | Description | Response headers |
|---|---|---|
| 400 | Password was not supplied in the body of the request | - |
| 403 | The user does not have permission to perform the operation. | - |
| 404 | User or user source not found in the system. | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
list[ApiUser] get_users(user_id=user_id, source=source)
Retrieve a list of users. Note if the source is not 'default' the response is limited to 100 users.
from __future__ import print_function
import time
import nexus_api_python_client
from nexus_api_python_client.rest import ApiException
from pprint import pprint
# Enter a context with an instance of the API client
with nexus_api_python_client.ApiClient() as api_client:
# Create an instance of the API class
api_instance = nexus_api_python_client.SecurityManagementUsersApi(api_client)
user_id = 'user_id_example' # str | An optional term to search userids for. (optional)
source = 'source_example' # str | An optional user source to restrict the search to. (optional)
try:
# Retrieve a list of users. Note if the source is not 'default' the response is limited to 100 users.
api_response = api_instance.get_users(user_id=user_id, source=source)
pprint(api_response)
except ApiException as e:
print("Exception when calling SecurityManagementUsersApi->get_users: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| user_id | str | An optional term to search userids for. | [optional] |
| source | str | An optional user source to restrict the search to. | [optional] |
No authorization required
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | successful operation | - |
| 400 | Password was not supplied in the body of the request | - |
| 403 | The user does not have permission to perform the operation. | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
update_user(user_id, body=body)
Update an existing user.
from __future__ import print_function
import time
import nexus_api_python_client
from nexus_api_python_client.rest import ApiException
from pprint import pprint
# Enter a context with an instance of the API client
with nexus_api_python_client.ApiClient() as api_client:
# Create an instance of the API class
api_instance = nexus_api_python_client.SecurityManagementUsersApi(api_client)
user_id = 'user_id_example' # str | The userid the request should apply to.
body = nexus_api_python_client.ApiUser() # ApiUser | A representation of the user to update. (optional)
try:
# Update an existing user.
api_instance.update_user(user_id, body=body)
except ApiException as e:
print("Exception when calling SecurityManagementUsersApi->update_user: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| user_id | str | The userid the request should apply to. | |
| body | ApiUser | A representation of the user to update. | [optional] |
void (empty response body)
No authorization required
- Content-Type: application/json
- Accept: Not defined
| Status code | Description | Response headers |
|---|---|---|
| 400 | Password was not supplied in the body of the request | - |
| 403 | The user does not have permission to perform the operation. | - |
| 404 | User or user source not found in the system. | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]