# PulpFileClient::ContentFilesApi All URIs are relative to *http://localhost:24817* Method | HTTP request | Description ------------- | ------------- | ------------- [**create**](ContentFilesApi.md#create) | **POST** /pulp/api/v3/content/file/files/ | Create a file content [**list**](ContentFilesApi.md#list) | **GET** /pulp/api/v3/content/file/files/ | List file contents [**read**](ContentFilesApi.md#read) | **GET** {file_file_content_href} | Inspect a file content ## create > AsyncOperationResponse create(relative_path, opts) Create a file content Trigger an asynchronous task to create content,optionally create new repository version. ### 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::ContentFilesApi.new relative_path = 'relative_path_example' # String | Path where the artifact is located relative to distributions base_path opts = { repository: 'repository_example', # String | A URI of a repository the new content unit should be associated with. 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 content unit. upload: 'upload_example', # String | An uncommitted upload that may be turned into the content unit. file_url: 'file_url_example' # String | A url that Pulp can download and turn into the content unit. } begin #Create a file content result = api_instance.create(relative_path, opts) p result rescue PulpFileClient::ApiError => e puts "Exception when calling ContentFilesApi->create: #{e}" end ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **relative_path** | **String**| Path where the artifact is located relative to distributions base_path | **repository** | **String**| A URI of a repository the new content unit should be associated with. | [optional] **artifact** | **String**| Artifact file representing the physical content | [optional] **file** | **File**| An uploaded file that may be turned into the content unit. | [optional] **upload** | **String**| An uncommitted upload that may be turned into the content unit. | [optional] **file_url** | **String**| A url that Pulp can download and turn into the content unit. | [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 > PaginatedfileFileContentResponseList list(opts) List file contents FileContent represents a single file and its metadata, which can be added and removed from repositories. ### 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::ContentFilesApi.new opts = { 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 * `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) * `pulp_type` - Pulp type * `-pulp_type` - Pulp type (descending) * `upstream_id` - Upstream id * `-upstream_id` - Upstream id (descending) * `timestamp_of_interest` - Timestamp of interest * `-timestamp_of_interest` - Timestamp of interest (descending) * `relative_path` - Relative path * `-relative_path` - Relative path (descending) * `digest` - Digest * `-digest` - Digest (descending) * `pk` - Pk * `-pk` - Pk (descending) orphaned_for: 3.4, # Float | Minutes Content has 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 | Filter results by using NOT, AND and OR operations on other filters relative_path: 'relative_path_example', # String | Filter results where relative_path matches value repository_version: 'repository_version_example', # String | Repository Version referenced by HREF repository_version_added: 'repository_version_added_example', # String | Repository Version referenced by HREF repository_version_removed: 'repository_version_removed_example', # String | Repository Version referenced by HREF sha256: 'sha256_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 file contents result = api_instance.list(opts) p result rescue PulpFileClient::ApiError => e puts "Exception when calling ContentFilesApi->list: #{e}" end ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **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 * `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) * `pulp_type` - Pulp type * `-pulp_type` - Pulp type (descending) * `upstream_id` - Upstream id * `-upstream_id` - Upstream id (descending) * `timestamp_of_interest` - Timestamp of interest * `-timestamp_of_interest` - Timestamp of interest (descending) * `relative_path` - Relative path * `-relative_path` - Relative path (descending) * `digest` - Digest * `-digest` - Digest (descending) * `pk` - Pk * `-pk` - Pk (descending) | [optional] **orphaned_for** | **Float**| Minutes Content has 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**| Filter results by using NOT, AND and OR operations on other filters | [optional] **relative_path** | **String**| Filter results where relative_path matches value | [optional] **repository_version** | **String**| Repository Version referenced by HREF | [optional] **repository_version_added** | **String**| Repository Version referenced by HREF | [optional] **repository_version_removed** | **String**| Repository Version referenced by HREF | [optional] **sha256** | **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 [**PaginatedfileFileContentResponseList**](PaginatedfileFileContentResponseList.md) ### Authorization [basicAuth](../README.md#basicAuth) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json ## read > FileFileContentResponse read(file_file_content_href, opts) Inspect a file content FileContent represents a single file and its metadata, which can be added and removed from repositories. ### 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::ContentFilesApi.new file_file_content_href = 'file_file_content_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 file content result = api_instance.read(file_file_content_href, opts) p result rescue PulpFileClient::ApiError => e puts "Exception when calling ContentFilesApi->read: #{e}" end ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **file_file_content_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 [**FileFileContentResponse**](FileFileContentResponse.md) ### Authorization [basicAuth](../README.md#basicAuth) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json