pulpcore.client.pulpcore.UsersRolesApi

All URIs are relative to http://localhost:24817

Method HTTP request Description
create POST {auth_user_href}roles/ Create an user role
delete DELETE {auth_users_user_role_href} Delete an user role
list GET {auth_user_href}roles/ List user roles
read GET {auth_users_user_role_href} Inspect an user role

create

UserRoleResponse create(auth_user_href, user_role)

Create an user role

ViewSet for UserRole.

Example

  • Basic Authentication (basicAuth):
from __future__ import print_function
import time
import pulpcore.client.pulpcore
from pulpcore.client.pulpcore.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to http://localhost:24817
# See configuration.py for a list of all supported configuration parameters.
configuration = pulpcore.client.pulpcore.Configuration(
    host = "http://localhost:24817"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure HTTP basic authorization: basicAuth
configuration = pulpcore.client.pulpcore.Configuration(
    username = 'YOUR_USERNAME',
    password = 'YOUR_PASSWORD'
)

# Configure API key authorization: cookieAuth
configuration = pulpcore.client.pulpcore.Configuration(
    host = "http://localhost:24817",
    api_key = {
        'sessionid': 'YOUR_API_KEY'
    }
)
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['sessionid'] = 'Bearer'

# Enter a context with an instance of the API client
with pulpcore.client.pulpcore.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = pulpcore.client.pulpcore.UsersRolesApi(api_client)
    auth_user_href = 'auth_user_href_example' # str | 
user_role = pulpcore.client.pulpcore.UserRole() # UserRole | 

    try:
        # Create an user role
        api_response = api_instance.create(auth_user_href, user_role)
        pprint(api_response)
    except ApiException as e:
        print("Exception when calling UsersRolesApi->create: %s\n" % e)
  • Api Key Authentication (cookieAuth):
from __future__ import print_function
import time
import pulpcore.client.pulpcore
from pulpcore.client.pulpcore.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to http://localhost:24817
# See configuration.py for a list of all supported configuration parameters.
configuration = pulpcore.client.pulpcore.Configuration(
    host = "http://localhost:24817"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure HTTP basic authorization: basicAuth
configuration = pulpcore.client.pulpcore.Configuration(
    username = 'YOUR_USERNAME',
    password = 'YOUR_PASSWORD'
)

# Configure API key authorization: cookieAuth
configuration = pulpcore.client.pulpcore.Configuration(
    host = "http://localhost:24817",
    api_key = {
        'sessionid': 'YOUR_API_KEY'
    }
)
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['sessionid'] = 'Bearer'

# Enter a context with an instance of the API client
with pulpcore.client.pulpcore.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = pulpcore.client.pulpcore.UsersRolesApi(api_client)
    auth_user_href = 'auth_user_href_example' # str | 
user_role = pulpcore.client.pulpcore.UserRole() # UserRole | 

    try:
        # Create an user role
        api_response = api_instance.create(auth_user_href, user_role)
        pprint(api_response)
    except ApiException as e:
        print("Exception when calling UsersRolesApi->create: %s\n" % e)

Parameters

Name Type Description Notes
auth_user_href str
user_role UserRole

Return type

UserRoleResponse

Authorization

basicAuth, cookieAuth

HTTP request headers

  • Content-Type: application/json, application/x-www-form-urlencoded, multipart/form-data
  • Accept: application/json

HTTP response details

Status code Description Response headers
201 -

[Back to top] [Back to API list] [Back to Model list] [Back to HOME]

delete

delete(auth_users_user_role_href)

Delete an user role

ViewSet for UserRole.

Example

  • Basic Authentication (basicAuth):
from __future__ import print_function
import time
import pulpcore.client.pulpcore
from pulpcore.client.pulpcore.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to http://localhost:24817
# See configuration.py for a list of all supported configuration parameters.
configuration = pulpcore.client.pulpcore.Configuration(
    host = "http://localhost:24817"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure HTTP basic authorization: basicAuth
configuration = pulpcore.client.pulpcore.Configuration(
    username = 'YOUR_USERNAME',
    password = 'YOUR_PASSWORD'
)

# Configure API key authorization: cookieAuth
configuration = pulpcore.client.pulpcore.Configuration(
    host = "http://localhost:24817",
    api_key = {
        'sessionid': 'YOUR_API_KEY'
    }
)
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['sessionid'] = 'Bearer'

# Enter a context with an instance of the API client
with pulpcore.client.pulpcore.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = pulpcore.client.pulpcore.UsersRolesApi(api_client)
    auth_users_user_role_href = 'auth_users_user_role_href_example' # str | 

    try:
        # Delete an user role
        api_instance.delete(auth_users_user_role_href)
    except ApiException as e:
        print("Exception when calling UsersRolesApi->delete: %s\n" % e)
  • Api Key Authentication (cookieAuth):
from __future__ import print_function
import time
import pulpcore.client.pulpcore
from pulpcore.client.pulpcore.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to http://localhost:24817
# See configuration.py for a list of all supported configuration parameters.
configuration = pulpcore.client.pulpcore.Configuration(
    host = "http://localhost:24817"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure HTTP basic authorization: basicAuth
configuration = pulpcore.client.pulpcore.Configuration(
    username = 'YOUR_USERNAME',
    password = 'YOUR_PASSWORD'
)

# Configure API key authorization: cookieAuth
configuration = pulpcore.client.pulpcore.Configuration(
    host = "http://localhost:24817",
    api_key = {
        'sessionid': 'YOUR_API_KEY'
    }
)
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['sessionid'] = 'Bearer'

# Enter a context with an instance of the API client
with pulpcore.client.pulpcore.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = pulpcore.client.pulpcore.UsersRolesApi(api_client)
    auth_users_user_role_href = 'auth_users_user_role_href_example' # str | 

    try:
        # Delete an user role
        api_instance.delete(auth_users_user_role_href)
    except ApiException as e:
        print("Exception when calling UsersRolesApi->delete: %s\n" % e)

Parameters

Name Type Description Notes
auth_users_user_role_href str

Return type

void (empty response body)

Authorization

basicAuth, cookieAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

HTTP response details

Status code Description Response headers
204 No response body -

[Back to top] [Back to API list] [Back to Model list] [Back to HOME]

list

PaginatedUserRoleResponseList list(auth_user_href, content_object=content_object, domain=domain, limit=limit, offset=offset, ordering=ordering, pulp_href__in=pulp_href__in, pulp_id__in=pulp_id__in, q=q, role=role, role__contains=role__contains, role__icontains=role__icontains, role__in=role__in, role__startswith=role__startswith, fields=fields, exclude_fields=exclude_fields)

List user roles

ViewSet for UserRole.

Example

  • Basic Authentication (basicAuth):
from __future__ import print_function
import time
import pulpcore.client.pulpcore
from pulpcore.client.pulpcore.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to http://localhost:24817
# See configuration.py for a list of all supported configuration parameters.
configuration = pulpcore.client.pulpcore.Configuration(
    host = "http://localhost:24817"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure HTTP basic authorization: basicAuth
configuration = pulpcore.client.pulpcore.Configuration(
    username = 'YOUR_USERNAME',
    password = 'YOUR_PASSWORD'
)

# Configure API key authorization: cookieAuth
configuration = pulpcore.client.pulpcore.Configuration(
    host = "http://localhost:24817",
    api_key = {
        'sessionid': 'YOUR_API_KEY'
    }
)
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['sessionid'] = 'Bearer'

# Enter a context with an instance of the API client
with pulpcore.client.pulpcore.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = pulpcore.client.pulpcore.UsersRolesApi(api_client)
    auth_user_href = 'auth_user_href_example' # str | 
content_object = 'content_object_example' # str | content_object (optional)
domain = 'domain_example' # str | Foreign Key referenced by HREF (optional)
limit = 56 # int | Number of results to return per page. (optional)
offset = 56 # int | The initial index from which to return the results. (optional)
ordering = ['ordering_example'] # list[str] | Ordering  * `role` - Role * `-role` - Role (descending) * `description` - Description * `-description` - Description (descending) * `pulp_created` - Pulp created * `-pulp_created` - Pulp created (descending) * `pk` - Pk * `-pk` - Pk (descending) (optional)
pulp_href__in = ['pulp_href__in_example'] # list[str] | Multiple values may be separated by commas. (optional)
pulp_id__in = ['pulp_id__in_example'] # list[str] | Multiple values may be separated by commas. (optional)
q = 'q_example' # str |  (optional)
role = 'role_example' # str |  (optional)
role__contains = 'role__contains_example' # str |  (optional)
role__icontains = 'role__icontains_example' # str |  (optional)
role__in = ['role__in_example'] # list[str] | Multiple values may be separated by commas. (optional)
role__startswith = 'role__startswith_example' # str |  (optional)
fields = ['fields_example'] # list[str] | A list of fields to include in the response. (optional)
exclude_fields = ['exclude_fields_example'] # list[str] | A list of fields to exclude from the response. (optional)

    try:
        # List user roles
        api_response = api_instance.list(auth_user_href, content_object=content_object, domain=domain, limit=limit, offset=offset, ordering=ordering, pulp_href__in=pulp_href__in, pulp_id__in=pulp_id__in, q=q, role=role, role__contains=role__contains, role__icontains=role__icontains, role__in=role__in, role__startswith=role__startswith, fields=fields, exclude_fields=exclude_fields)
        pprint(api_response)
    except ApiException as e:
        print("Exception when calling UsersRolesApi->list: %s\n" % e)
  • Api Key Authentication (cookieAuth):
from __future__ import print_function
import time
import pulpcore.client.pulpcore
from pulpcore.client.pulpcore.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to http://localhost:24817
# See configuration.py for a list of all supported configuration parameters.
configuration = pulpcore.client.pulpcore.Configuration(
    host = "http://localhost:24817"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure HTTP basic authorization: basicAuth
configuration = pulpcore.client.pulpcore.Configuration(
    username = 'YOUR_USERNAME',
    password = 'YOUR_PASSWORD'
)

# Configure API key authorization: cookieAuth
configuration = pulpcore.client.pulpcore.Configuration(
    host = "http://localhost:24817",
    api_key = {
        'sessionid': 'YOUR_API_KEY'
    }
)
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['sessionid'] = 'Bearer'

# Enter a context with an instance of the API client
with pulpcore.client.pulpcore.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = pulpcore.client.pulpcore.UsersRolesApi(api_client)
    auth_user_href = 'auth_user_href_example' # str | 
content_object = 'content_object_example' # str | content_object (optional)
domain = 'domain_example' # str | Foreign Key referenced by HREF (optional)
limit = 56 # int | Number of results to return per page. (optional)
offset = 56 # int | The initial index from which to return the results. (optional)
ordering = ['ordering_example'] # list[str] | Ordering  * `role` - Role * `-role` - Role (descending) * `description` - Description * `-description` - Description (descending) * `pulp_created` - Pulp created * `-pulp_created` - Pulp created (descending) * `pk` - Pk * `-pk` - Pk (descending) (optional)
pulp_href__in = ['pulp_href__in_example'] # list[str] | Multiple values may be separated by commas. (optional)
pulp_id__in = ['pulp_id__in_example'] # list[str] | Multiple values may be separated by commas. (optional)
q = 'q_example' # str |  (optional)
role = 'role_example' # str |  (optional)
role__contains = 'role__contains_example' # str |  (optional)
role__icontains = 'role__icontains_example' # str |  (optional)
role__in = ['role__in_example'] # list[str] | Multiple values may be separated by commas. (optional)
role__startswith = 'role__startswith_example' # str |  (optional)
fields = ['fields_example'] # list[str] | A list of fields to include in the response. (optional)
exclude_fields = ['exclude_fields_example'] # list[str] | A list of fields to exclude from the response. (optional)

    try:
        # List user roles
        api_response = api_instance.list(auth_user_href, content_object=content_object, domain=domain, limit=limit, offset=offset, ordering=ordering, pulp_href__in=pulp_href__in, pulp_id__in=pulp_id__in, q=q, role=role, role__contains=role__contains, role__icontains=role__icontains, role__in=role__in, role__startswith=role__startswith, fields=fields, exclude_fields=exclude_fields)
        pprint(api_response)
    except ApiException as e:
        print("Exception when calling UsersRolesApi->list: %s\n" % e)

Parameters

Name Type Description Notes
auth_user_href str
content_object str content_object [optional]
domain str Foreign Key referenced by HREF [optional]
limit int Number of results to return per page. [optional]
offset int The initial index from which to return the results. [optional]
ordering list[str] Ordering * `role` - Role * `-role` - Role (descending) * `description` - Description * `-description` - Description (descending) * `pulp_created` - Pulp created * `-pulp_created` - Pulp created (descending) * `pk` - Pk * `-pk` - Pk (descending) [optional]
pulp_href__in list[str] Multiple values may be separated by commas. [optional]
pulp_id__in list[str] Multiple values may be separated by commas. [optional]
q str [optional]
role str [optional]
role__contains str [optional]
role__icontains str [optional]
role__in list[str] Multiple values may be separated by commas. [optional]
role__startswith str [optional]
fields list[str] A list of fields to include in the response. [optional]
exclude_fields list[str] A list of fields to exclude from the response. [optional]

Return type

PaginatedUserRoleResponseList

Authorization

basicAuth, cookieAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 -

[Back to top] [Back to API list] [Back to Model list] [Back to HOME]

read

UserRoleResponse read(auth_users_user_role_href, fields=fields, exclude_fields=exclude_fields)

Inspect an user role

ViewSet for UserRole.

Example

  • Basic Authentication (basicAuth):
from __future__ import print_function
import time
import pulpcore.client.pulpcore
from pulpcore.client.pulpcore.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to http://localhost:24817
# See configuration.py for a list of all supported configuration parameters.
configuration = pulpcore.client.pulpcore.Configuration(
    host = "http://localhost:24817"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure HTTP basic authorization: basicAuth
configuration = pulpcore.client.pulpcore.Configuration(
    username = 'YOUR_USERNAME',
    password = 'YOUR_PASSWORD'
)

# Configure API key authorization: cookieAuth
configuration = pulpcore.client.pulpcore.Configuration(
    host = "http://localhost:24817",
    api_key = {
        'sessionid': 'YOUR_API_KEY'
    }
)
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['sessionid'] = 'Bearer'

# Enter a context with an instance of the API client
with pulpcore.client.pulpcore.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = pulpcore.client.pulpcore.UsersRolesApi(api_client)
    auth_users_user_role_href = 'auth_users_user_role_href_example' # str | 
fields = ['fields_example'] # list[str] | A list of fields to include in the response. (optional)
exclude_fields = ['exclude_fields_example'] # list[str] | A list of fields to exclude from the response. (optional)

    try:
        # Inspect an user role
        api_response = api_instance.read(auth_users_user_role_href, fields=fields, exclude_fields=exclude_fields)
        pprint(api_response)
    except ApiException as e:
        print("Exception when calling UsersRolesApi->read: %s\n" % e)
  • Api Key Authentication (cookieAuth):
from __future__ import print_function
import time
import pulpcore.client.pulpcore
from pulpcore.client.pulpcore.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to http://localhost:24817
# See configuration.py for a list of all supported configuration parameters.
configuration = pulpcore.client.pulpcore.Configuration(
    host = "http://localhost:24817"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure HTTP basic authorization: basicAuth
configuration = pulpcore.client.pulpcore.Configuration(
    username = 'YOUR_USERNAME',
    password = 'YOUR_PASSWORD'
)

# Configure API key authorization: cookieAuth
configuration = pulpcore.client.pulpcore.Configuration(
    host = "http://localhost:24817",
    api_key = {
        'sessionid': 'YOUR_API_KEY'
    }
)
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['sessionid'] = 'Bearer'

# Enter a context with an instance of the API client
with pulpcore.client.pulpcore.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = pulpcore.client.pulpcore.UsersRolesApi(api_client)
    auth_users_user_role_href = 'auth_users_user_role_href_example' # str | 
fields = ['fields_example'] # list[str] | A list of fields to include in the response. (optional)
exclude_fields = ['exclude_fields_example'] # list[str] | A list of fields to exclude from the response. (optional)

    try:
        # Inspect an user role
        api_response = api_instance.read(auth_users_user_role_href, fields=fields, exclude_fields=exclude_fields)
        pprint(api_response)
    except ApiException as e:
        print("Exception when calling UsersRolesApi->read: %s\n" % e)

Parameters

Name Type Description Notes
auth_users_user_role_href str
fields list[str] A list of fields to include in the response. [optional]
exclude_fields list[str] A list of fields to exclude from the response. [optional]

Return type

UserRoleResponse

Authorization

basicAuth, cookieAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 -

[Back to top] [Back to API list] [Back to Model list] [Back to HOME]