# PulpcoreClient::UsersRolesApi All URIs are relative to *http://localhost:24817* Method | HTTP request | Description ------------- | ------------- | ------------- [**users_roles_create**](UsersRolesApi.md#users_roles_create) | **POST** {auth_user_href}roles/ | Create an user role [**users_roles_delete**](UsersRolesApi.md#users_roles_delete) | **DELETE** {auth_users_user_role_href} | Delete an user role [**users_roles_list**](UsersRolesApi.md#users_roles_list) | **GET** {auth_user_href}roles/ | List user roles [**users_roles_read**](UsersRolesApi.md#users_roles_read) | **GET** {auth_users_user_role_href} | Inspect an user role ## users_roles_create > UserRoleResponse users_roles_create(auth_user_href, user_role) Create an user role ViewSet for UserRole. ### Example ```ruby # load the gem require 'pulpcore_client' # setup authorization PulpcoreClient.configure do |config| # Configure HTTP basic authorization: basicAuth config.username = 'YOUR USERNAME' config.password = 'YOUR PASSWORD' end api_instance = PulpcoreClient::UsersRolesApi.new auth_user_href = 'auth_user_href_example' # String | user_role = PulpcoreClient::UserRole.new # UserRole | begin #Create an user role result = api_instance.users_roles_create(auth_user_href, user_role) p result rescue PulpcoreClient::ApiError => e puts "Exception when calling UsersRolesApi->users_roles_create: #{e}" end ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **auth_user_href** | **String**| | **user_role** | [**UserRole**](UserRole.md)| | ### Return type [**UserRoleResponse**](UserRoleResponse.md) ### Authorization [basicAuth](../README.md#basicAuth) ### HTTP request headers - **Content-Type**: application/json, application/x-www-form-urlencoded, multipart/form-data - **Accept**: application/json ## users_roles_delete > users_roles_delete(auth_users_user_role_href) Delete an user role ViewSet for UserRole. ### Example ```ruby # load the gem require 'pulpcore_client' # setup authorization PulpcoreClient.configure do |config| # Configure HTTP basic authorization: basicAuth config.username = 'YOUR USERNAME' config.password = 'YOUR PASSWORD' end api_instance = PulpcoreClient::UsersRolesApi.new auth_users_user_role_href = 'auth_users_user_role_href_example' # String | begin #Delete an user role api_instance.users_roles_delete(auth_users_user_role_href) rescue PulpcoreClient::ApiError => e puts "Exception when calling UsersRolesApi->users_roles_delete: #{e}" end ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **auth_users_user_role_href** | **String**| | ### Return type nil (empty response body) ### Authorization [basicAuth](../README.md#basicAuth) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: Not defined ## users_roles_list > PaginatedUserRoleResponseList users_roles_list(auth_user_href, opts) List user roles ViewSet for UserRole. ### Example ```ruby # load the gem require 'pulpcore_client' # setup authorization PulpcoreClient.configure do |config| # Configure HTTP basic authorization: basicAuth config.username = 'YOUR USERNAME' config.password = 'YOUR PASSWORD' end api_instance = PulpcoreClient::UsersRolesApi.new auth_user_href = 'auth_user_href_example' # String | opts = { content_object: 'content_object_example', # String | content_object domain: 'domain_example', # String | Foreign Key referenced by HREF limit: 56, # Integer | Number of results to return per page. offset: 56, # Integer | The initial index from which to return the results. ordering: ['ordering_example'], # Array | 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) pulp_href__in: ['pulp_href__in_example'], # Array | Multiple values may be separated by commas. pulp_id__in: ['pulp_id__in_example'], # Array | Multiple values may be separated by commas. q: 'q_example', # String | role: 'role_example', # String | role__contains: 'role__contains_example', # String | role__icontains: 'role__icontains_example', # String | role__in: ['role__in_example'], # Array | Multiple values may be separated by commas. role__startswith: 'role__startswith_example', # String | fields: ['fields_example'], # Array | A list of fields to include in the response. exclude_fields: ['exclude_fields_example'] # Array | A list of fields to exclude from the response. } begin #List user roles result = api_instance.users_roles_list(auth_user_href, opts) p result rescue PulpcoreClient::ApiError => e puts "Exception when calling UsersRolesApi->users_roles_list: #{e}" end ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **auth_user_href** | **String**| | **content_object** | **String**| content_object | [optional] **domain** | [**String**](.md)| Foreign Key referenced by HREF | [optional] **limit** | **Integer**| Number of results to return per page. | [optional] **offset** | **Integer**| The initial index from which to return the results. | [optional] **ordering** | [**Array<String>**](String.md)| 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** | [**Array<String>**](String.md)| Multiple values may be separated by commas. | [optional] **pulp_id__in** | [**Array<String>**](String.md)| Multiple values may be separated by commas. | [optional] **q** | **String**| | [optional] **role** | **String**| | [optional] **role__contains** | **String**| | [optional] **role__icontains** | **String**| | [optional] **role__in** | [**Array<String>**](String.md)| Multiple values may be separated by commas. | [optional] **role__startswith** | **String**| | [optional] **fields** | [**Array<String>**](String.md)| A list of fields to include in the response. | [optional] **exclude_fields** | [**Array<String>**](String.md)| A list of fields to exclude from the response. | [optional] ### Return type [**PaginatedUserRoleResponseList**](PaginatedUserRoleResponseList.md) ### Authorization [basicAuth](../README.md#basicAuth) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json ## users_roles_read > UserRoleResponse users_roles_read(auth_users_user_role_href, opts) Inspect an user role ViewSet for UserRole. ### Example ```ruby # load the gem require 'pulpcore_client' # setup authorization PulpcoreClient.configure do |config| # Configure HTTP basic authorization: basicAuth config.username = 'YOUR USERNAME' config.password = 'YOUR PASSWORD' end api_instance = PulpcoreClient::UsersRolesApi.new auth_users_user_role_href = 'auth_users_user_role_href_example' # String | opts = { fields: ['fields_example'], # Array | A list of fields to include in the response. exclude_fields: ['exclude_fields_example'] # Array | A list of fields to exclude from the response. } begin #Inspect an user role result = api_instance.users_roles_read(auth_users_user_role_href, opts) p result rescue PulpcoreClient::ApiError => e puts "Exception when calling UsersRolesApi->users_roles_read: #{e}" end ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **auth_users_user_role_href** | **String**| | **fields** | [**Array<String>**](String.md)| A list of fields to include in the response. | [optional] **exclude_fields** | [**Array<String>**](String.md)| A list of fields to exclude from the response. | [optional] ### Return type [**UserRoleResponse**](UserRoleResponse.md) ### Authorization [basicAuth](../README.md#basicAuth) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json