pulpcore.client.pulpcore.UsersApi

All URIs are relative to https://pulp

Method HTTP request Description
create POST /pulp/api/v3/users/ Create an user
delete DELETE {auth_user_href} Delete an user
list GET /pulp/api/v3/users/ List users
partial_update PATCH {auth_user_href} Update an user
read GET {auth_user_href} Inspect an user
update PUT {auth_user_href} Update an user

create

UserResponse create(user)

Create an user

ViewSet for User. NOTE: This API endpoint is in \"tech preview\" and subject to change

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 https://pulp
# See configuration.py for a list of all supported configuration parameters.
configuration = pulpcore.client.pulpcore.Configuration(
    host = "https://pulp"
)

# 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 = "https://pulp",
    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.UsersApi(api_client)
    user = pulpcore.client.pulpcore.User() # User | 

    try:
        # Create an user
        api_response = api_instance.create(user)
        pprint(api_response)
    except ApiException as e:
        print("Exception when calling UsersApi->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 https://pulp
# See configuration.py for a list of all supported configuration parameters.
configuration = pulpcore.client.pulpcore.Configuration(
    host = "https://pulp"
)

# 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 = "https://pulp",
    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.UsersApi(api_client)
    user = pulpcore.client.pulpcore.User() # User | 

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

Parameters

Name Type Description Notes
user User

Return type

UserResponse

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_user_href)

Delete an user

ViewSet for User. NOTE: This API endpoint is in \"tech preview\" and subject to change

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 https://pulp
# See configuration.py for a list of all supported configuration parameters.
configuration = pulpcore.client.pulpcore.Configuration(
    host = "https://pulp"
)

# 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 = "https://pulp",
    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.UsersApi(api_client)
    auth_user_href = 'auth_user_href_example' # str | 

    try:
        # Delete an user
        api_instance.delete(auth_user_href)
    except ApiException as e:
        print("Exception when calling UsersApi->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 https://pulp
# See configuration.py for a list of all supported configuration parameters.
configuration = pulpcore.client.pulpcore.Configuration(
    host = "https://pulp"
)

# 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 = "https://pulp",
    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.UsersApi(api_client)
    auth_user_href = 'auth_user_href_example' # str | 

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

Parameters

Name Type Description Notes
auth_user_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

PaginatedUserResponseList list(email=email, email__contains=email__contains, email__icontains=email__icontains, email__iexact=email__iexact, email__in=email__in, first_name=first_name, first_name__contains=first_name__contains, first_name__icontains=first_name__icontains, first_name__iexact=first_name__iexact, first_name__in=first_name__in, is_active=is_active, is_staff=is_staff, last_name=last_name, last_name__contains=last_name__contains, last_name__icontains=last_name__icontains, last_name__iexact=last_name__iexact, last_name__in=last_name__in, limit=limit, offset=offset, ordering=ordering, username=username, username__contains=username__contains, username__icontains=username__icontains, username__iexact=username__iexact, username__in=username__in, fields=fields, exclude_fields=exclude_fields)

List users

ViewSet for User. NOTE: This API endpoint is in \"tech preview\" and subject to change

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 https://pulp
# See configuration.py for a list of all supported configuration parameters.
configuration = pulpcore.client.pulpcore.Configuration(
    host = "https://pulp"
)

# 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 = "https://pulp",
    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.UsersApi(api_client)
    email = 'email_example' # str | Filter results where email matches value (optional)
email__contains = 'email__contains_example' # str | Filter results where email contains value (optional)
email__icontains = 'email__icontains_example' # str | Filter results where email contains value (optional)
email__iexact = 'email__iexact_example' # str | Filter results where email matches value (optional)
email__in = ['email__in_example'] # list[str] | Filter results where email is in a comma-separated list of values (optional)
first_name = 'first_name_example' # str | Filter results where first_name matches value (optional)
first_name__contains = 'first_name__contains_example' # str | Filter results where first_name contains value (optional)
first_name__icontains = 'first_name__icontains_example' # str | Filter results where first_name contains value (optional)
first_name__iexact = 'first_name__iexact_example' # str | Filter results where first_name matches value (optional)
first_name__in = ['first_name__in_example'] # list[str] | Filter results where first_name is in a comma-separated list of values (optional)
is_active = True # bool | Filter results where is_active matches value (optional)
is_staff = True # bool | Filter results where is_staff matches value (optional)
last_name = 'last_name_example' # str | Filter results where last_name matches value (optional)
last_name__contains = 'last_name__contains_example' # str | Filter results where last_name contains value (optional)
last_name__icontains = 'last_name__icontains_example' # str | Filter results where last_name contains value (optional)
last_name__iexact = 'last_name__iexact_example' # str | Filter results where last_name matches value (optional)
last_name__in = ['last_name__in_example'] # list[str] | Filter results where last_name is in a comma-separated list of values (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 (optional)
username = 'username_example' # str | Filter results where username matches value (optional)
username__contains = 'username__contains_example' # str | Filter results where username contains value (optional)
username__icontains = 'username__icontains_example' # str | Filter results where username contains value (optional)
username__iexact = 'username__iexact_example' # str | Filter results where username matches value (optional)
username__in = ['username__in_example'] # list[str] | Filter results where username is in a comma-separated list of values (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 users
        api_response = api_instance.list(email=email, email__contains=email__contains, email__icontains=email__icontains, email__iexact=email__iexact, email__in=email__in, first_name=first_name, first_name__contains=first_name__contains, first_name__icontains=first_name__icontains, first_name__iexact=first_name__iexact, first_name__in=first_name__in, is_active=is_active, is_staff=is_staff, last_name=last_name, last_name__contains=last_name__contains, last_name__icontains=last_name__icontains, last_name__iexact=last_name__iexact, last_name__in=last_name__in, limit=limit, offset=offset, ordering=ordering, username=username, username__contains=username__contains, username__icontains=username__icontains, username__iexact=username__iexact, username__in=username__in, fields=fields, exclude_fields=exclude_fields)
        pprint(api_response)
    except ApiException as e:
        print("Exception when calling UsersApi->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 https://pulp
# See configuration.py for a list of all supported configuration parameters.
configuration = pulpcore.client.pulpcore.Configuration(
    host = "https://pulp"
)

# 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 = "https://pulp",
    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.UsersApi(api_client)
    email = 'email_example' # str | Filter results where email matches value (optional)
email__contains = 'email__contains_example' # str | Filter results where email contains value (optional)
email__icontains = 'email__icontains_example' # str | Filter results where email contains value (optional)
email__iexact = 'email__iexact_example' # str | Filter results where email matches value (optional)
email__in = ['email__in_example'] # list[str] | Filter results where email is in a comma-separated list of values (optional)
first_name = 'first_name_example' # str | Filter results where first_name matches value (optional)
first_name__contains = 'first_name__contains_example' # str | Filter results where first_name contains value (optional)
first_name__icontains = 'first_name__icontains_example' # str | Filter results where first_name contains value (optional)
first_name__iexact = 'first_name__iexact_example' # str | Filter results where first_name matches value (optional)
first_name__in = ['first_name__in_example'] # list[str] | Filter results where first_name is in a comma-separated list of values (optional)
is_active = True # bool | Filter results where is_active matches value (optional)
is_staff = True # bool | Filter results where is_staff matches value (optional)
last_name = 'last_name_example' # str | Filter results where last_name matches value (optional)
last_name__contains = 'last_name__contains_example' # str | Filter results where last_name contains value (optional)
last_name__icontains = 'last_name__icontains_example' # str | Filter results where last_name contains value (optional)
last_name__iexact = 'last_name__iexact_example' # str | Filter results where last_name matches value (optional)
last_name__in = ['last_name__in_example'] # list[str] | Filter results where last_name is in a comma-separated list of values (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 (optional)
username = 'username_example' # str | Filter results where username matches value (optional)
username__contains = 'username__contains_example' # str | Filter results where username contains value (optional)
username__icontains = 'username__icontains_example' # str | Filter results where username contains value (optional)
username__iexact = 'username__iexact_example' # str | Filter results where username matches value (optional)
username__in = ['username__in_example'] # list[str] | Filter results where username is in a comma-separated list of values (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 users
        api_response = api_instance.list(email=email, email__contains=email__contains, email__icontains=email__icontains, email__iexact=email__iexact, email__in=email__in, first_name=first_name, first_name__contains=first_name__contains, first_name__icontains=first_name__icontains, first_name__iexact=first_name__iexact, first_name__in=first_name__in, is_active=is_active, is_staff=is_staff, last_name=last_name, last_name__contains=last_name__contains, last_name__icontains=last_name__icontains, last_name__iexact=last_name__iexact, last_name__in=last_name__in, limit=limit, offset=offset, ordering=ordering, username=username, username__contains=username__contains, username__icontains=username__icontains, username__iexact=username__iexact, username__in=username__in, fields=fields, exclude_fields=exclude_fields)
        pprint(api_response)
    except ApiException as e:
        print("Exception when calling UsersApi->list: %s\n" % e)

Parameters

Name Type Description Notes
email str Filter results where email matches value [optional]
email__contains str Filter results where email contains value [optional]
email__icontains str Filter results where email contains value [optional]
email__iexact str Filter results where email matches value [optional]
email__in list[str] Filter results where email is in a comma-separated list of values [optional]
first_name str Filter results where first_name matches value [optional]
first_name__contains str Filter results where first_name contains value [optional]
first_name__icontains str Filter results where first_name contains value [optional]
first_name__iexact str Filter results where first_name matches value [optional]
first_name__in list[str] Filter results where first_name is in a comma-separated list of values [optional]
is_active bool Filter results where is_active matches value [optional]
is_staff bool Filter results where is_staff matches value [optional]
last_name str Filter results where last_name matches value [optional]
last_name__contains str Filter results where last_name contains value [optional]
last_name__icontains str Filter results where last_name contains value [optional]
last_name__iexact str Filter results where last_name matches value [optional]
last_name__in list[str] Filter results where last_name is in a comma-separated list of values [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 [optional]
username str Filter results where username matches value [optional]
username__contains str Filter results where username contains value [optional]
username__icontains str Filter results where username contains value [optional]
username__iexact str Filter results where username matches value [optional]
username__in list[str] Filter results where username is in a comma-separated list of values [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

PaginatedUserResponseList

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]

partial_update

UserResponse partial_update(auth_user_href, patched_user)

Update an user

ViewSet for User. NOTE: This API endpoint is in \"tech preview\" and subject to change

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 https://pulp
# See configuration.py for a list of all supported configuration parameters.
configuration = pulpcore.client.pulpcore.Configuration(
    host = "https://pulp"
)

# 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 = "https://pulp",
    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.UsersApi(api_client)
    auth_user_href = 'auth_user_href_example' # str | 
patched_user = pulpcore.client.pulpcore.PatchedUser() # PatchedUser | 

    try:
        # Update an user
        api_response = api_instance.partial_update(auth_user_href, patched_user)
        pprint(api_response)
    except ApiException as e:
        print("Exception when calling UsersApi->partial_update: %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 https://pulp
# See configuration.py for a list of all supported configuration parameters.
configuration = pulpcore.client.pulpcore.Configuration(
    host = "https://pulp"
)

# 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 = "https://pulp",
    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.UsersApi(api_client)
    auth_user_href = 'auth_user_href_example' # str | 
patched_user = pulpcore.client.pulpcore.PatchedUser() # PatchedUser | 

    try:
        # Update an user
        api_response = api_instance.partial_update(auth_user_href, patched_user)
        pprint(api_response)
    except ApiException as e:
        print("Exception when calling UsersApi->partial_update: %s\n" % e)

Parameters

Name Type Description Notes
auth_user_href str
patched_user PatchedUser

Return type

UserResponse

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
200 -

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

read

UserResponse read(auth_user_href, fields=fields, exclude_fields=exclude_fields)

Inspect an user

ViewSet for User. NOTE: This API endpoint is in \"tech preview\" and subject to change

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 https://pulp
# See configuration.py for a list of all supported configuration parameters.
configuration = pulpcore.client.pulpcore.Configuration(
    host = "https://pulp"
)

# 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 = "https://pulp",
    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.UsersApi(api_client)
    auth_user_href = 'auth_user_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
        api_response = api_instance.read(auth_user_href, fields=fields, exclude_fields=exclude_fields)
        pprint(api_response)
    except ApiException as e:
        print("Exception when calling UsersApi->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 https://pulp
# See configuration.py for a list of all supported configuration parameters.
configuration = pulpcore.client.pulpcore.Configuration(
    host = "https://pulp"
)

# 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 = "https://pulp",
    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.UsersApi(api_client)
    auth_user_href = 'auth_user_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
        api_response = api_instance.read(auth_user_href, fields=fields, exclude_fields=exclude_fields)
        pprint(api_response)
    except ApiException as e:
        print("Exception when calling UsersApi->read: %s\n" % e)

Parameters

Name Type Description Notes
auth_user_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

UserResponse

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]

update

UserResponse update(auth_user_href, user)

Update an user

ViewSet for User. NOTE: This API endpoint is in \"tech preview\" and subject to change

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 https://pulp
# See configuration.py for a list of all supported configuration parameters.
configuration = pulpcore.client.pulpcore.Configuration(
    host = "https://pulp"
)

# 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 = "https://pulp",
    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.UsersApi(api_client)
    auth_user_href = 'auth_user_href_example' # str | 
user = pulpcore.client.pulpcore.User() # User | 

    try:
        # Update an user
        api_response = api_instance.update(auth_user_href, user)
        pprint(api_response)
    except ApiException as e:
        print("Exception when calling UsersApi->update: %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 https://pulp
# See configuration.py for a list of all supported configuration parameters.
configuration = pulpcore.client.pulpcore.Configuration(
    host = "https://pulp"
)

# 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 = "https://pulp",
    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.UsersApi(api_client)
    auth_user_href = 'auth_user_href_example' # str | 
user = pulpcore.client.pulpcore.User() # User | 

    try:
        # Update an user
        api_response = api_instance.update(auth_user_href, user)
        pprint(api_response)
    except ApiException as e:
        print("Exception when calling UsersApi->update: %s\n" % e)

Parameters

Name Type Description Notes
auth_user_href str
user User

Return type

UserResponse

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
200 -

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