All URIs are relative to http://localhost/service/rest
| Method | HTTP request | Description |
|---|---|---|
| create | POST /beta/security/roles | Create role |
| delete | DELETE /beta/security/roles/{id} | Delete role |
| get_role | GET /beta/security/roles/{id} | Get role |
| get_roles | GET /beta/security/roles | List roles |
| update | PUT /beta/security/roles/{id} | Update role |
RoleXOResponse create(body)
Create role
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.SecurityManagementRolesApi(api_client)
body = nexus_api_python_client.RoleXORequest() # RoleXORequest | A role configuration
try:
# Create role
api_response = api_instance.create(body)
pprint(api_response)
except ApiException as e:
print("Exception when calling SecurityManagementRolesApi->create: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| body | RoleXORequest | A role configuration |
No authorization required
- Content-Type: application/json
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | successful operation | - |
| 403 | Insufficient permissions to create role | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
delete(id)
Delete role
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.SecurityManagementRolesApi(api_client)
id = 'id_example' # str | The id of the role to delete
try:
# Delete role
api_instance.delete(id)
except ApiException as e:
print("Exception when calling SecurityManagementRolesApi->delete: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| id | str | The id of the role to delete |
void (empty response body)
No authorization required
- Content-Type: Not defined
- Accept: Not defined
| Status code | Description | Response headers |
|---|---|---|
| 403 | Insufficient permissions to delete role | - |
| 404 | Role not found | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
RoleXOResponse get_role(id, source=source)
Get role
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.SecurityManagementRolesApi(api_client)
id = 'id_example' # str | The id of the role to get
source = 'default' # str | The id of the user source to filter the roles by. Available sources can be fetched using the 'User Sources' endpoint. (optional) (default to 'default')
try:
# Get role
api_response = api_instance.get_role(id, source=source)
pprint(api_response)
except ApiException as e:
print("Exception when calling SecurityManagementRolesApi->get_role: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| id | str | The id of the role to get | |
| source | str | The id of the user source to filter the roles by. Available sources can be fetched using the 'User Sources' endpoint. | [optional] [default to 'default'] |
No authorization required
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | successful operation | - |
| 400 | The specified source does not exist | - |
| 403 | Insufficient permissions to read roles | - |
| 404 | Role not found | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
list[RoleXOResponse] get_roles(source=source)
List roles
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.SecurityManagementRolesApi(api_client)
source = 'source_example' # str | The id of the user source to filter the roles by, if supplied. Otherwise roles from all user sources will be returned. (optional)
try:
# List roles
api_response = api_instance.get_roles(source=source)
pprint(api_response)
except ApiException as e:
print("Exception when calling SecurityManagementRolesApi->get_roles: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| source | str | The id of the user source to filter the roles by, if supplied. Otherwise roles from all user sources will be returned. | [optional] |
No authorization required
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | successful operation | - |
| 400 | The specified source does not exist | - |
| 403 | Insufficient permissions to read roles | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
update(id, body)
Update role
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.SecurityManagementRolesApi(api_client)
id = 'id_example' # str | The id of the role to update
body = nexus_api_python_client.RoleXORequest() # RoleXORequest | A role configuration
try:
# Update role
api_instance.update(id, body)
except ApiException as e:
print("Exception when calling SecurityManagementRolesApi->update: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| id | str | The id of the role to update | |
| body | RoleXORequest | A role configuration |
void (empty response body)
No authorization required
- Content-Type: application/json
- Accept: Not defined
| Status code | Description | Response headers |
|---|---|---|
| 403 | Insufficient permissions to update role | - |
| 404 | Role not found | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]