# PulpRpmClient::ContentPackagesApi All URIs are relative to *http://pulp* Method | HTTP request | Description ------------- | ------------- | ------------- [**create**](ContentPackagesApi.md#create) | **POST** /pulp/api/v3/content/rpm/packages/ | Create a package [**list**](ContentPackagesApi.md#list) | **GET** /pulp/api/v3/content/rpm/packages/ | List packages [**read**](ContentPackagesApi.md#read) | **GET** {rpm_package_href} | Inspect a package ## create > AsyncOperationResponse create(relative_path, opts) Create a package Trigger an asynchronous task to create content,optionally create new repository version. ### Example ```ruby # load the gem require 'pulp_rpm_client' # setup authorization PulpRpmClient.configure do |config| # Configure HTTP basic authorization: basicAuth config.username = 'YOUR USERNAME' config.password = 'YOUR PASSWORD' end api_instance = PulpRpmClient::ContentPackagesApi.new relative_path = 'relative_path_example' # String | Path where the artifact is located relative to distributions base_path opts = { artifact: 'artifact_example', # String | Artifact file representing the physical content file: File.new('/path/to/file'), # File | An uploaded file that may be turned into the artifact of the content unit. repository: 'repository_example' # String | A URI of a repository the new content unit should be associated with. } begin #Create a package result = api_instance.create(relative_path, opts) p result rescue PulpRpmClient::ApiError => e puts "Exception when calling ContentPackagesApi->create: #{e}" end ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **relative_path** | **String**| Path where the artifact is located relative to distributions base_path | **artifact** | **String**| Artifact file representing the physical content | [optional] **file** | **File**| An uploaded file that may be turned into the artifact of the content unit. | [optional] **repository** | **String**| A URI of a repository the new content unit should be associated with. | [optional] ### Return type [**AsyncOperationResponse**](AsyncOperationResponse.md) ### Authorization [basicAuth](../README.md#basicAuth) ### HTTP request headers - **Content-Type**: multipart/form-data, application/x-www-form-urlencoded - **Accept**: application/json ## list > InlineResponse2008 list(opts) List packages A ViewSet for Package. Define endpoint name which will appear in the API endpoint for this content type. For example:: http://pulp.example.com/pulp/api/v3/content/rpm/packages/ Also specify queryset and serializer for Package. ### Example ```ruby # load the gem require 'pulp_rpm_client' # setup authorization PulpRpmClient.configure do |config| # Configure HTTP basic authorization: basicAuth config.username = 'YOUR USERNAME' config.password = 'YOUR PASSWORD' end api_instance = PulpRpmClient::ContentPackagesApi.new opts = { arch: 'arch_example', # String | arch arch__in: 'arch__in_example', # String | arch__in arch__ne: 'arch__ne_example', # String | arch__ne checksum_type: 'checksum_type_example', # String | checksum_type checksum_type__in: 'checksum_type__in_example', # String | checksum_type__in checksum_type__ne: 'checksum_type__ne_example', # String | checksum_type__ne epoch: 'epoch_example', # String | epoch epoch__in: 'epoch__in_example', # String | epoch__in epoch__ne: 'epoch__ne_example', # String | epoch__ne limit: 56, # Integer | Number of results to return per page. name: 'name_example', # String | name name__in: 'name__in_example', # String | name__in name__ne: 'name__ne_example', # String | name__ne offset: 56, # Integer | The initial index from which to return the results. ordering: 'ordering_example', # String | Which field to use when ordering the results. pkg_id: 'pkg_id_example', # String | pkgId pkg_id__in: 'pkg_id__in_example', # String | pkgId__in release: 'release_example', # String | release release__in: 'release__in_example', # String | release__in release__ne: 'release__ne_example', # String | release__ne repository_version: 'repository_version_example', # String | repository_version repository_version_added: 'repository_version_added_example', # String | repository_version_added repository_version_removed: 'repository_version_removed_example', # String | repository_version_removed sha256: 'sha256_example', # String | sha256 version: 'version_example', # String | version version__in: 'version__in_example', # String | version__in version__ne: 'version__ne_example', # String | version__ne 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 packages result = api_instance.list(opts) p result rescue PulpRpmClient::ApiError => e puts "Exception when calling ContentPackagesApi->list: #{e}" end ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **arch** | **String**| arch | [optional] **arch__in** | **String**| arch__in | [optional] **arch__ne** | **String**| arch__ne | [optional] **checksum_type** | **String**| checksum_type | [optional] **checksum_type__in** | **String**| checksum_type__in | [optional] **checksum_type__ne** | **String**| checksum_type__ne | [optional] **epoch** | **String**| epoch | [optional] **epoch__in** | **String**| epoch__in | [optional] **epoch__ne** | **String**| epoch__ne | [optional] **limit** | **Integer**| Number of results to return per page. | [optional] **name** | **String**| name | [optional] **name__in** | **String**| name__in | [optional] **name__ne** | **String**| name__ne | [optional] **offset** | **Integer**| The initial index from which to return the results. | [optional] **ordering** | **String**| Which field to use when ordering the results. | [optional] **pkg_id** | **String**| pkgId | [optional] **pkg_id__in** | **String**| pkgId__in | [optional] **release** | **String**| release | [optional] **release__in** | **String**| release__in | [optional] **release__ne** | **String**| release__ne | [optional] **repository_version** | **String**| repository_version | [optional] **repository_version_added** | **String**| repository_version_added | [optional] **repository_version_removed** | **String**| repository_version_removed | [optional] **sha256** | **String**| sha256 | [optional] **version** | **String**| version | [optional] **version__in** | **String**| version__in | [optional] **version__ne** | **String**| version__ne | [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 [**InlineResponse2008**](InlineResponse2008.md) ### Authorization [basicAuth](../README.md#basicAuth) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json ## read > RpmPackageResponse read(rpm_package_href, opts) Inspect a package A ViewSet for Package. Define endpoint name which will appear in the API endpoint for this content type. For example:: http://pulp.example.com/pulp/api/v3/content/rpm/packages/ Also specify queryset and serializer for Package. ### Example ```ruby # load the gem require 'pulp_rpm_client' # setup authorization PulpRpmClient.configure do |config| # Configure HTTP basic authorization: basicAuth config.username = 'YOUR USERNAME' config.password = 'YOUR PASSWORD' end api_instance = PulpRpmClient::ContentPackagesApi.new rpm_package_href = 'rpm_package_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 package result = api_instance.read(rpm_package_href, opts) p result rescue PulpRpmClient::ApiError => e puts "Exception when calling ContentPackagesApi->read: #{e}" end ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **rpm_package_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 [**RpmPackageResponse**](RpmPackageResponse.md) ### Authorization [basicAuth](../README.md#basicAuth) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json