# PulpcoreClient::ArtifactsApi All URIs are relative to *http://localhost:24817* Method | HTTP request | Description ------------- | ------------- | ------------- [**create**](ArtifactsApi.md#create) | **POST** /pulp/api/v3/artifacts/ | Create an artifact [**delete**](ArtifactsApi.md#delete) | **DELETE** {artifact_href} | Delete an artifact [**list**](ArtifactsApi.md#list) | **GET** /pulp/api/v3/artifacts/ | List artifacts [**read**](ArtifactsApi.md#read) | **GET** {artifact_href} | Inspect an artifact ## create > ArtifactResponse create(file, opts) Create an artifact 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::ArtifactsApi.new file = File.new('/path/to/file') # File | The stored file. opts = { size: 56, # Integer | The size of the file in bytes. md5: 'md5_example', # String | The MD5 checksum of the file if available. sha1: 'sha1_example', # String | The SHA-1 checksum of the file if available. sha224: 'sha224_example', # String | The SHA-224 checksum of the file if available. sha256: 'sha256_example', # String | The SHA-256 checksum of the file if available. sha384: 'sha384_example', # String | The SHA-384 checksum of the file if available. sha512: 'sha512_example' # String | The SHA-512 checksum of the file if available. } begin #Create an artifact result = api_instance.create(file, opts) p result rescue PulpcoreClient::ApiError => e puts "Exception when calling ArtifactsApi->create: #{e}" end ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **file** | **File**| The stored file. | **size** | **Integer**| The size of the file in bytes. | [optional] **md5** | **String**| The MD5 checksum of the file if available. | [optional] **sha1** | **String**| The SHA-1 checksum of the file if available. | [optional] **sha224** | **String**| The SHA-224 checksum of the file if available. | [optional] **sha256** | **String**| The SHA-256 checksum of the file if available. | [optional] **sha384** | **String**| The SHA-384 checksum of the file if available. | [optional] **sha512** | **String**| The SHA-512 checksum of the file if available. | [optional] ### Return type [**ArtifactResponse**](ArtifactResponse.md) ### Authorization [basicAuth](../README.md#basicAuth) ### HTTP request headers - **Content-Type**: multipart/form-data, application/x-www-form-urlencoded - **Accept**: application/json ## delete > delete(artifact_href) Delete an artifact Remove Artifact only if it is not associated with any Content. ### 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::ArtifactsApi.new artifact_href = 'artifact_href_example' # String | begin #Delete an artifact api_instance.delete(artifact_href) rescue PulpcoreClient::ApiError => e puts "Exception when calling ArtifactsApi->delete: #{e}" end ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **artifact_href** | **String**| | ### Return type nil (empty response body) ### Authorization [basicAuth](../README.md#basicAuth) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: Not defined ## list > PaginatedArtifactResponseList list(opts) List artifacts 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::ArtifactsApi.new opts = { limit: 56, # Integer | Number of results to return per page. md5: 'md5_example', # String | Filter results where md5 matches 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) * `file` - File * `-file` - File (descending) * `size` - Size * `-size` - Size (descending) * `md5` - Md5 * `-md5` - Md5 (descending) * `sha1` - Sha1 * `-sha1` - Sha1 (descending) * `sha224` - Sha224 * `-sha224` - Sha224 (descending) * `sha256` - Sha256 * `-sha256` - Sha256 (descending) * `sha384` - Sha384 * `-sha384` - Sha384 (descending) * `sha512` - Sha512 * `-sha512` - Sha512 (descending) * `timestamp_of_interest` - Timestamp of interest * `-timestamp_of_interest` - Timestamp of interest (descending) * `pk` - Pk * `-pk` - Pk (descending) orphaned_for: 3.4, # Float | Minutes Artifacts have been orphaned for. -1 uses ORPHAN_PROTECTION_TIME. 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 | repository_version: 'repository_version_example', # String | Repository Version referenced by HREF sha1: 'sha1_example', # String | Filter results where sha1 matches value sha224: 'sha224_example', # String | Filter results where sha224 matches value sha256: 'sha256_example', # String | Filter results where sha256 matches value sha384: 'sha384_example', # String | Filter results where sha384 matches value sha512: 'sha512_example', # String | Filter results where sha512 matches 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 artifacts result = api_instance.list(opts) p result rescue PulpcoreClient::ApiError => e puts "Exception when calling ArtifactsApi->list: #{e}" end ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **limit** | **Integer**| Number of results to return per page. | [optional] **md5** | **String**| Filter results where md5 matches 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) * `file` - File * `-file` - File (descending) * `size` - Size * `-size` - Size (descending) * `md5` - Md5 * `-md5` - Md5 (descending) * `sha1` - Sha1 * `-sha1` - Sha1 (descending) * `sha224` - Sha224 * `-sha224` - Sha224 (descending) * `sha256` - Sha256 * `-sha256` - Sha256 (descending) * `sha384` - Sha384 * `-sha384` - Sha384 (descending) * `sha512` - Sha512 * `-sha512` - Sha512 (descending) * `timestamp_of_interest` - Timestamp of interest * `-timestamp_of_interest` - Timestamp of interest (descending) * `pk` - Pk * `-pk` - Pk (descending) | [optional] **orphaned_for** | **Float**| Minutes Artifacts have been orphaned for. -1 uses ORPHAN_PROTECTION_TIME. | [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] **repository_version** | **String**| Repository Version referenced by HREF | [optional] **sha1** | **String**| Filter results where sha1 matches value | [optional] **sha224** | **String**| Filter results where sha224 matches value | [optional] **sha256** | **String**| Filter results where sha256 matches value | [optional] **sha384** | **String**| Filter results where sha384 matches value | [optional] **sha512** | **String**| Filter results where sha512 matches 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 [**PaginatedArtifactResponseList**](PaginatedArtifactResponseList.md) ### Authorization [basicAuth](../README.md#basicAuth) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json ## read > ArtifactResponse read(artifact_href, opts) Inspect an artifact 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::ArtifactsApi.new artifact_href = 'artifact_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 artifact result = api_instance.read(artifact_href, opts) p result rescue PulpcoreClient::ApiError => e puts "Exception when calling ArtifactsApi->read: #{e}" end ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **artifact_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 [**ArtifactResponse**](ArtifactResponse.md) ### Authorization [basicAuth](../README.md#basicAuth) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json