# PulpcoreClient::TasksApi All URIs are relative to *http://pulp* Method | HTTP request | Description ------------- | ------------- | ------------- [**delete**](TasksApi.md#delete) | **DELETE** {task_href} | Delete a task [**list**](TasksApi.md#list) | **GET** /pulp/api/v3/tasks/ | List tasks [**read**](TasksApi.md#read) | **GET** {task_href} | Inspect a task [**tasks_cancel**](TasksApi.md#tasks_cancel) | **PATCH** {task_href} | Cancel a task ## delete > 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 '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::TasksApi.new task_href = 'task_href_example' # String | begin #Delete a task api_instance.delete(task_href) rescue PulpcoreClient::ApiError => e puts "Exception when calling TasksApi->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 ## list > PaginatedTaskResponseList 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 '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::TasksApi.new opts = { child_tasks: 'child_tasks_example', # String | child_tasks created_resources: 'created_resources_example', # String | created_resources finished_at: 'finished_at_example', # String | finished_at finished_at__gt: 'finished_at__gt_example', # String | finished_at__gt finished_at__gte: 'finished_at__gte_example', # String | finished_at__gte finished_at__lt: 'finished_at__lt_example', # String | finished_at__lt finished_at__lte: 'finished_at__lte_example', # String | finished_at__lte finished_at__range: 'finished_at__range_example', # String | finished_at__range limit: 56, # Integer | Number of results to return per page. name: 'name_example', # String | name name__contains: 'name__contains_example', # String | name__contains offset: 56, # Integer | The initial index from which to return the results. ordering: 'ordering_example', # String | Which field to use when ordering the results. parent_task: 'parent_task_example', # String | parent_task reserved_resources_record: 'reserved_resources_record_example', # String | reserved_resources_record started_at: 'started_at_example', # String | started_at started_at__gt: 'started_at__gt_example', # String | started_at__gt started_at__gte: 'started_at__gte_example', # String | started_at__gte started_at__lt: 'started_at__lt_example', # String | started_at__lt started_at__lte: 'started_at__lte_example', # String | started_at__lte started_at__range: 'started_at__range_example', # String | started_at__range state: 'state_example', # String | state state__in: 'state__in_example', # String | state__in task_group: 'task_group_example', # String | task_group worker: 'worker_example', # String | worker worker__in: 'worker__in_example', # String | worker__in fields: 'fields_example', # String | A list of fields to include in the response. exclude_fields: 'exclude_fields_example' # String | A list of fields to exclude from the response. } begin #List tasks result = api_instance.list(opts) p result rescue PulpcoreClient::ApiError => e puts "Exception when calling TasksApi->list: #{e}" end ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **child_tasks** | **String**| child_tasks | [optional] **created_resources** | **String**| created_resources | [optional] **finished_at** | **String**| finished_at | [optional] **finished_at__gt** | **String**| finished_at__gt | [optional] **finished_at__gte** | **String**| finished_at__gte | [optional] **finished_at__lt** | **String**| finished_at__lt | [optional] **finished_at__lte** | **String**| finished_at__lte | [optional] **finished_at__range** | **String**| finished_at__range | [optional] **limit** | **Integer**| Number of results to return per page. | [optional] **name** | **String**| name | [optional] **name__contains** | **String**| name__contains | [optional] **offset** | **Integer**| The initial index from which to return the results. | [optional] **ordering** | **String**| Which field to use when ordering the results. | [optional] **parent_task** | **String**| parent_task | [optional] **reserved_resources_record** | **String**| reserved_resources_record | [optional] **started_at** | **String**| started_at | [optional] **started_at__gt** | **String**| started_at__gt | [optional] **started_at__gte** | **String**| started_at__gte | [optional] **started_at__lt** | **String**| started_at__lt | [optional] **started_at__lte** | **String**| started_at__lte | [optional] **started_at__range** | **String**| started_at__range | [optional] **state** | **String**| state | [optional] **state__in** | **String**| state__in | [optional] **task_group** | **String**| task_group | [optional] **worker** | **String**| worker | [optional] **worker__in** | **String**| worker__in | [optional] **fields** | **String**| A list of fields to include in the response. | [optional] **exclude_fields** | **String**| 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 ## read > TaskResponse 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 '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::TasksApi.new task_href = 'task_href_example' # String | opts = { fields: 'fields_example', # String | A list of fields to include in the response. exclude_fields: 'exclude_fields_example' # String | A list of fields to exclude from the response. } begin #Inspect a task result = api_instance.read(task_href, opts) p result rescue PulpcoreClient::ApiError => e puts "Exception when calling TasksApi->read: #{e}" end ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **task_href** | **String**| | **fields** | **String**| A list of fields to include in the response. | [optional] **exclude_fields** | **String**| 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_cancel > TaskResponse tasks_cancel(task_href, patched_task_cancel) Cancel a task This operation cancels a task. ### 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::TasksApi.new task_href = 'task_href_example' # String | patched_task_cancel = PulpcoreClient::PatchedTaskCancel.new # PatchedTaskCancel | begin #Cancel a task result = api_instance.tasks_cancel(task_href, patched_task_cancel) p result rescue PulpcoreClient::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