# PulpFileClient::TasksApi All URIs are relative to *http://localhost:24817* Method | HTTP request | Description ------------- | ------------- | ------------- [**tasks_add_role**](TasksApi.md#tasks_add_role) | **POST** {task_href}add_role/ | Add a role [**tasks_cancel**](TasksApi.md#tasks_cancel) | **PATCH** {task_href} | Cancel a task [**tasks_delete**](TasksApi.md#tasks_delete) | **DELETE** {task_href} | Delete a task [**tasks_list**](TasksApi.md#tasks_list) | **GET** /pulp/api/v3/tasks/ | List tasks [**tasks_list_roles**](TasksApi.md#tasks_list_roles) | **GET** {task_href}list_roles/ | List roles [**tasks_my_permissions**](TasksApi.md#tasks_my_permissions) | **GET** {task_href}my_permissions/ | List user permissions [**tasks_purge**](TasksApi.md#tasks_purge) | **POST** /pulp/api/v3/tasks/purge/ | Purge Completed Tasks [**tasks_read**](TasksApi.md#tasks_read) | **GET** {task_href} | Inspect a task [**tasks_remove_role**](TasksApi.md#tasks_remove_role) | **POST** {task_href}remove_role/ | Remove a role ## tasks_add_role > NestedRoleResponse tasks_add_role(task_href, nested_role) Add a role Add a role for this object to users/groups. ### Example ```ruby # load the gem require 'pulp_file_client' # setup authorization PulpFileClient.configure do |config| # Configure HTTP basic authorization: basicAuth config.username = 'YOUR USERNAME' config.password = 'YOUR PASSWORD' end api_instance = PulpFileClient::TasksApi.new task_href = 'task_href_example' # String | nested_role = PulpFileClient::NestedRole.new # NestedRole | begin #Add a role result = api_instance.tasks_add_role(task_href, nested_role) p result rescue PulpFileClient::ApiError => e puts "Exception when calling TasksApi->tasks_add_role: #{e}" end ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **task_href** | **String**| | **nested_role** | [**NestedRole**](NestedRole.md)| | ### Return type [**NestedRoleResponse**](NestedRoleResponse.md) ### Authorization [basicAuth](../README.md#basicAuth) ### HTTP request headers - **Content-Type**: application/json, application/x-www-form-urlencoded, multipart/form-data - **Accept**: application/json ## tasks_cancel > TaskResponse tasks_cancel(task_href, patched_task_cancel) Cancel a task This operation cancels a task. ### Example ```ruby # load the gem require 'pulp_file_client' # setup authorization PulpFileClient.configure do |config| # Configure HTTP basic authorization: basicAuth config.username = 'YOUR USERNAME' config.password = 'YOUR PASSWORD' end api_instance = PulpFileClient::TasksApi.new task_href = 'task_href_example' # String | patched_task_cancel = PulpFileClient::PatchedTaskCancel.new # PatchedTaskCancel | begin #Cancel a task result = api_instance.tasks_cancel(task_href, patched_task_cancel) p result rescue PulpFileClient::ApiError => e puts "Exception when calling TasksApi->tasks_cancel: #{e}" end ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **task_href** | **String**| | **patched_task_cancel** | [**PatchedTaskCancel**](PatchedTaskCancel.md)| | ### Return type [**TaskResponse**](TaskResponse.md) ### Authorization [basicAuth](../README.md#basicAuth) ### HTTP request headers - **Content-Type**: application/json, application/x-www-form-urlencoded, multipart/form-data - **Accept**: application/json ## tasks_delete > tasks_delete(task_href) Delete a task A customized named ModelViewSet that knows how to register itself with the Pulp API router. This viewset is discoverable by its name. \"Normal\" Django Models and Master/Detail models are supported by the ``register_with`` method. Attributes: lookup_field (str): The name of the field by which an object should be looked up, in addition to any parent lookups if this ViewSet is nested. Defaults to 'pk' endpoint_name (str): The name of the final path segment that should identify the ViewSet's collection endpoint. nest_prefix (str): Optional prefix under which this ViewSet should be nested. This must correspond to the \"parent_prefix\" of a router with rest_framework_nested.NestedMixin. None indicates this ViewSet should not be nested. parent_lookup_kwargs (dict): Optional mapping of key names that would appear in self.kwargs to django model filter expressions that can be used with the corresponding value from self.kwargs, used only by a nested ViewSet to filter based on the parent object's identity. schema (DefaultSchema): The schema class to use by default in a viewset. ### Example ```ruby # load the gem require 'pulp_file_client' # setup authorization PulpFileClient.configure do |config| # Configure HTTP basic authorization: basicAuth config.username = 'YOUR USERNAME' config.password = 'YOUR PASSWORD' end api_instance = PulpFileClient::TasksApi.new task_href = 'task_href_example' # String | begin #Delete a task api_instance.tasks_delete(task_href) rescue PulpFileClient::ApiError => e puts "Exception when calling TasksApi->tasks_delete: #{e}" end ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **task_href** | **String**| | ### Return type nil (empty response body) ### Authorization [basicAuth](../README.md#basicAuth) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: Not defined ## tasks_list > PaginatedTaskResponseList tasks_list(opts) List tasks A customized named ModelViewSet that knows how to register itself with the Pulp API router. This viewset is discoverable by its name. \"Normal\" Django Models and Master/Detail models are supported by the ``register_with`` method. Attributes: lookup_field (str): The name of the field by which an object should be looked up, in addition to any parent lookups if this ViewSet is nested. Defaults to 'pk' endpoint_name (str): The name of the final path segment that should identify the ViewSet's collection endpoint. nest_prefix (str): Optional prefix under which this ViewSet should be nested. This must correspond to the \"parent_prefix\" of a router with rest_framework_nested.NestedMixin. None indicates this ViewSet should not be nested. parent_lookup_kwargs (dict): Optional mapping of key names that would appear in self.kwargs to django model filter expressions that can be used with the corresponding value from self.kwargs, used only by a nested ViewSet to filter based on the parent object's identity. schema (DefaultSchema): The schema class to use by default in a viewset. ### Example ```ruby # load the gem require 'pulp_file_client' # setup authorization PulpFileClient.configure do |config| # Configure HTTP basic authorization: basicAuth config.username = 'YOUR USERNAME' config.password = 'YOUR PASSWORD' end api_instance = PulpFileClient::TasksApi.new opts = { child_tasks: 'child_tasks_example', # String | Filter results where child_tasks matches value created_resources: 'created_resources_example', # String | exclusive_resources: 'exclusive_resources_example', # String | exclusive_resources__in: ['exclusive_resources__in_example'], # Array | Multiple values may be separated by commas. finished_at: DateTime.parse('2013-10-20T19:20:30+01:00'), # DateTime | Filter results where finished_at matches value finished_at__gt: DateTime.parse('2013-10-20T19:20:30+01:00'), # DateTime | Filter results where finished_at is greater than value finished_at__gte: DateTime.parse('2013-10-20T19:20:30+01:00'), # DateTime | Filter results where finished_at is greater than or equal to value finished_at__lt: DateTime.parse('2013-10-20T19:20:30+01:00'), # DateTime | Filter results where finished_at is less than value finished_at__lte: DateTime.parse('2013-10-20T19:20:30+01:00'), # DateTime | Filter results where finished_at is less than or equal to value finished_at__range: [DateTime.parse('2013-10-20T19:20:30+01:00')], # Array | Filter results where finished_at is between two comma separated values limit: 56, # Integer | Number of results to return per page. logging_cid: 'logging_cid_example', # String | Filter results where logging_cid matches value logging_cid__contains: 'logging_cid__contains_example', # String | Filter results where logging_cid contains value name: 'name_example', # String | Filter results where name matches value name__contains: 'name__contains_example', # String | Filter results where name contains value name__in: ['name__in_example'], # Array | Filter results where name is in a comma-separated list of values name__ne: 'name__ne_example', # String | Filter results where name not equal to value offset: 56, # Integer | The initial index from which to return the results. ordering: ['ordering_example'], # Array | Ordering * `pulp_id` - Pulp id * `-pulp_id` - Pulp id (descending) * `pulp_created` - Pulp created * `-pulp_created` - Pulp created (descending) * `pulp_last_updated` - Pulp last updated * `-pulp_last_updated` - Pulp last updated (descending) * `state` - State * `-state` - State (descending) * `name` - Name * `-name` - Name (descending) * `logging_cid` - Logging cid * `-logging_cid` - Logging cid (descending) * `unblocked_at` - Unblocked at * `-unblocked_at` - Unblocked at (descending) * `started_at` - Started at * `-started_at` - Started at (descending) * `finished_at` - Finished at * `-finished_at` - Finished at (descending) * `error` - Error * `-error` - Error (descending) * `enc_args` - Enc args * `-enc_args` - Enc args (descending) * `enc_kwargs` - Enc kwargs * `-enc_kwargs` - Enc kwargs (descending) * `reserved_resources_record` - Reserved resources record * `-reserved_resources_record` - Reserved resources record (descending) * `versions` - Versions * `-versions` - Versions (descending) * `pk` - Pk * `-pk` - Pk (descending) parent_task: 'parent_task_example', # String | Filter results where parent_task matches value 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 | reserved_resources: 'reserved_resources_example', # String | reserved_resources__in: ['reserved_resources__in_example'], # Array | Multiple values may be separated by commas. shared_resources: 'shared_resources_example', # String | shared_resources__in: ['shared_resources__in_example'], # Array | Multiple values may be separated by commas. started_at: DateTime.parse('2013-10-20T19:20:30+01:00'), # DateTime | Filter results where started_at matches value started_at__gt: DateTime.parse('2013-10-20T19:20:30+01:00'), # DateTime | Filter results where started_at is greater than value started_at__gte: DateTime.parse('2013-10-20T19:20:30+01:00'), # DateTime | Filter results where started_at is greater than or equal to value started_at__lt: DateTime.parse('2013-10-20T19:20:30+01:00'), # DateTime | Filter results where started_at is less than value started_at__lte: DateTime.parse('2013-10-20T19:20:30+01:00'), # DateTime | Filter results where started_at is less than or equal to value started_at__range: [DateTime.parse('2013-10-20T19:20:30+01:00')], # Array | Filter results where started_at is between two comma separated values state: 'state_example', # String | Filter results where state matches value * `waiting` - Waiting * `skipped` - Skipped * `running` - Running * `completed` - Completed * `failed` - Failed * `canceled` - Canceled * `canceling` - Canceling state__in: ['state__in_example'], # Array | Filter results where state is in a comma-separated list of values state__ne: 'state__ne_example', # String | Filter results where state not equal to value task_group: 'task_group_example', # String | Filter results where task_group matches value worker: 'worker_example', # String | Filter results where worker matches value worker__in: ['worker__in_example'], # Array | Filter results where worker is in a comma-separated list of values worker__isnull: true, # Boolean | Filter results where worker has a null value 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 tasks result = api_instance.tasks_list(opts) p result rescue PulpFileClient::ApiError => e puts "Exception when calling TasksApi->tasks_list: #{e}" end ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **child_tasks** | [**String**](.md)| Filter results where child_tasks matches value | [optional] **created_resources** | [**String**](.md)| | [optional] **exclusive_resources** | **String**| | [optional] **exclusive_resources__in** | [**Array<String>**](String.md)| Multiple values may be separated by commas. | [optional] **finished_at** | **DateTime**| Filter results where finished_at matches value | [optional] **finished_at__gt** | **DateTime**| Filter results where finished_at is greater than value | [optional] **finished_at__gte** | **DateTime**| Filter results where finished_at is greater than or equal to value | [optional] **finished_at__lt** | **DateTime**| Filter results where finished_at is less than value | [optional] **finished_at__lte** | **DateTime**| Filter results where finished_at is less than or equal to value | [optional] **finished_at__range** | [**Array<DateTime>**](DateTime.md)| Filter results where finished_at is between two comma separated values | [optional] **limit** | **Integer**| Number of results to return per page. | [optional] **logging_cid** | **String**| Filter results where logging_cid matches value | [optional] **logging_cid__contains** | **String**| Filter results where logging_cid contains value | [optional] **name** | **String**| Filter results where name matches value | [optional] **name__contains** | **String**| Filter results where name contains value | [optional] **name__in** | [**Array<String>**](String.md)| Filter results where name is in a comma-separated list of values | [optional] **name__ne** | **String**| Filter results where name not equal to value | [optional] **offset** | **Integer**| The initial index from which to return the results. | [optional] **ordering** | [**Array<String>**](String.md)| Ordering * `pulp_id` - Pulp id * `-pulp_id` - Pulp id (descending) * `pulp_created` - Pulp created * `-pulp_created` - Pulp created (descending) * `pulp_last_updated` - Pulp last updated * `-pulp_last_updated` - Pulp last updated (descending) * `state` - State * `-state` - State (descending) * `name` - Name * `-name` - Name (descending) * `logging_cid` - Logging cid * `-logging_cid` - Logging cid (descending) * `unblocked_at` - Unblocked at * `-unblocked_at` - Unblocked at (descending) * `started_at` - Started at * `-started_at` - Started at (descending) * `finished_at` - Finished at * `-finished_at` - Finished at (descending) * `error` - Error * `-error` - Error (descending) * `enc_args` - Enc args * `-enc_args` - Enc args (descending) * `enc_kwargs` - Enc kwargs * `-enc_kwargs` - Enc kwargs (descending) * `reserved_resources_record` - Reserved resources record * `-reserved_resources_record` - Reserved resources record (descending) * `versions` - Versions * `-versions` - Versions (descending) * `pk` - Pk * `-pk` - Pk (descending) | [optional] **parent_task** | [**String**](.md)| Filter results where parent_task matches value | [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] **reserved_resources** | **String**| | [optional] **reserved_resources__in** | [**Array<String>**](String.md)| Multiple values may be separated by commas. | [optional] **shared_resources** | **String**| | [optional] **shared_resources__in** | [**Array<String>**](String.md)| Multiple values may be separated by commas. | [optional] **started_at** | **DateTime**| Filter results where started_at matches value | [optional] **started_at__gt** | **DateTime**| Filter results where started_at is greater than value | [optional] **started_at__gte** | **DateTime**| Filter results where started_at is greater than or equal to value | [optional] **started_at__lt** | **DateTime**| Filter results where started_at is less than value | [optional] **started_at__lte** | **DateTime**| Filter results where started_at is less than or equal to value | [optional] **started_at__range** | [**Array<DateTime>**](DateTime.md)| Filter results where started_at is between two comma separated values | [optional] **state** | **String**| Filter results where state matches value * `waiting` - Waiting * `skipped` - Skipped * `running` - Running * `completed` - Completed * `failed` - Failed * `canceled` - Canceled * `canceling` - Canceling | [optional] **state__in** | [**Array<String>**](String.md)| Filter results where state is in a comma-separated list of values | [optional] **state__ne** | **String**| Filter results where state not equal to value | [optional] **task_group** | [**String**](.md)| Filter results where task_group matches value | [optional] **worker** | [**String**](.md)| Filter results where worker matches value | [optional] **worker__in** | [**Array<String>**](String.md)| Filter results where worker is in a comma-separated list of values | [optional] **worker__isnull** | **Boolean**| Filter results where worker has a null value | [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 [**PaginatedTaskResponseList**](PaginatedTaskResponseList.md) ### Authorization [basicAuth](../README.md#basicAuth) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json ## tasks_list_roles > ObjectRolesResponse tasks_list_roles(task_href, opts) List roles List roles assigned to this object. ### Example ```ruby # load the gem require 'pulp_file_client' # setup authorization PulpFileClient.configure do |config| # Configure HTTP basic authorization: basicAuth config.username = 'YOUR USERNAME' config.password = 'YOUR PASSWORD' end api_instance = PulpFileClient::TasksApi.new task_href = 'task_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 #List roles result = api_instance.tasks_list_roles(task_href, opts) p result rescue PulpFileClient::ApiError => e puts "Exception when calling TasksApi->tasks_list_roles: #{e}" end ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **task_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 [**ObjectRolesResponse**](ObjectRolesResponse.md) ### Authorization [basicAuth](../README.md#basicAuth) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json ## tasks_my_permissions > MyPermissionsResponse tasks_my_permissions(task_href, opts) List user permissions List permissions available to the current user on this object. ### Example ```ruby # load the gem require 'pulp_file_client' # setup authorization PulpFileClient.configure do |config| # Configure HTTP basic authorization: basicAuth config.username = 'YOUR USERNAME' config.password = 'YOUR PASSWORD' end api_instance = PulpFileClient::TasksApi.new task_href = 'task_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 #List user permissions result = api_instance.tasks_my_permissions(task_href, opts) p result rescue PulpFileClient::ApiError => e puts "Exception when calling TasksApi->tasks_my_permissions: #{e}" end ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **task_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 [**MyPermissionsResponse**](MyPermissionsResponse.md) ### Authorization [basicAuth](../README.md#basicAuth) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json ## tasks_purge > AsyncOperationResponse tasks_purge(purge) Purge Completed Tasks Trigger an asynchronous task that deletes completed tasks that finished prior to a specified timestamp. ### Example ```ruby # load the gem require 'pulp_file_client' # setup authorization PulpFileClient.configure do |config| # Configure HTTP basic authorization: basicAuth config.username = 'YOUR USERNAME' config.password = 'YOUR PASSWORD' end api_instance = PulpFileClient::TasksApi.new purge = PulpFileClient::Purge.new # Purge | begin #Purge Completed Tasks result = api_instance.tasks_purge(purge) p result rescue PulpFileClient::ApiError => e puts "Exception when calling TasksApi->tasks_purge: #{e}" end ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **purge** | [**Purge**](Purge.md)| | ### Return type [**AsyncOperationResponse**](AsyncOperationResponse.md) ### Authorization [basicAuth](../README.md#basicAuth) ### HTTP request headers - **Content-Type**: application/json, application/x-www-form-urlencoded, multipart/form-data - **Accept**: application/json ## tasks_read > TaskResponse tasks_read(task_href, opts) Inspect a task A customized named ModelViewSet that knows how to register itself with the Pulp API router. This viewset is discoverable by its name. \"Normal\" Django Models and Master/Detail models are supported by the ``register_with`` method. Attributes: lookup_field (str): The name of the field by which an object should be looked up, in addition to any parent lookups if this ViewSet is nested. Defaults to 'pk' endpoint_name (str): The name of the final path segment that should identify the ViewSet's collection endpoint. nest_prefix (str): Optional prefix under which this ViewSet should be nested. This must correspond to the \"parent_prefix\" of a router with rest_framework_nested.NestedMixin. None indicates this ViewSet should not be nested. parent_lookup_kwargs (dict): Optional mapping of key names that would appear in self.kwargs to django model filter expressions that can be used with the corresponding value from self.kwargs, used only by a nested ViewSet to filter based on the parent object's identity. schema (DefaultSchema): The schema class to use by default in a viewset. ### Example ```ruby # load the gem require 'pulp_file_client' # setup authorization PulpFileClient.configure do |config| # Configure HTTP basic authorization: basicAuth config.username = 'YOUR USERNAME' config.password = 'YOUR PASSWORD' end api_instance = PulpFileClient::TasksApi.new task_href = 'task_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 a task result = api_instance.tasks_read(task_href, opts) p result rescue PulpFileClient::ApiError => e puts "Exception when calling TasksApi->tasks_read: #{e}" end ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **task_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 [**TaskResponse**](TaskResponse.md) ### Authorization [basicAuth](../README.md#basicAuth) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json ## tasks_remove_role > NestedRoleResponse tasks_remove_role(task_href, nested_role) Remove a role Remove a role for this object from users/groups. ### Example ```ruby # load the gem require 'pulp_file_client' # setup authorization PulpFileClient.configure do |config| # Configure HTTP basic authorization: basicAuth config.username = 'YOUR USERNAME' config.password = 'YOUR PASSWORD' end api_instance = PulpFileClient::TasksApi.new task_href = 'task_href_example' # String | nested_role = PulpFileClient::NestedRole.new # NestedRole | begin #Remove a role result = api_instance.tasks_remove_role(task_href, nested_role) p result rescue PulpFileClient::ApiError => e puts "Exception when calling TasksApi->tasks_remove_role: #{e}" end ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **task_href** | **String**| | **nested_role** | [**NestedRole**](NestedRole.md)| | ### Return type [**NestedRoleResponse**](NestedRoleResponse.md) ### Authorization [basicAuth](../README.md#basicAuth) ### HTTP request headers - **Content-Type**: application/json, application/x-www-form-urlencoded, multipart/form-data - **Accept**: application/json