# 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_content_href} | Inspect a file content ## create > FileContent create(data) Create 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: Basic config.username = 'YOUR USERNAME' config.password = 'YOUR PASSWORD' end api_instance = PulpFileClient::ContentFilesApi.new data = PulpFileClient::FileContent.new # FileContent | begin #Create a file content result = api_instance.create(data) p result rescue PulpFileClient::ApiError => e puts "Exception when calling ContentFilesApi->create: #{e}" end ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **data** | [**FileContent**](FileContent.md)| | ### Return type [**FileContent**](FileContent.md) ### Authorization [Basic](../README.md#Basic) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json ## list > InlineResponse200 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: Basic config.username = 'YOUR USERNAME' config.password = 'YOUR PASSWORD' end api_instance = PulpFileClient::ContentFilesApi.new opts = { relative_path: 'relative_path_example', # String | Filter results where relative_path matches value digest: 'digest_example', # String | Filter results where digest 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 limit: 56, # Integer | Number of results to return per page. offset: 56, # Integer | The initial index from which to return the results. fields: 'fields_example' # String | A list of fields to include in 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 ------------- | ------------- | ------------- | ------------- **relative_path** | **String**| Filter results where relative_path matches value | [optional] **digest** | **String**| Filter results where digest 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] **limit** | **Integer**| Number of results to return per page. | [optional] **offset** | **Integer**| The initial index from which to return the results. | [optional] **fields** | **String**| A list of fields to include in the response. | [optional] ### Return type [**InlineResponse200**](InlineResponse200.md) ### Authorization [Basic](../README.md#Basic) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json ## read > FileContent read(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: Basic config.username = 'YOUR USERNAME' config.password = 'YOUR PASSWORD' end api_instance = PulpFileClient::ContentFilesApi.new file_content_href = 'file_content_href_example' # String | URI of File Content. e.g.: /pulp/api/v3/content/file/files/1/ opts = { fields: 'fields_example' # String | A list of fields to include in the response. } begin #Inspect a file content result = api_instance.read(file_content_href, opts) p result rescue PulpFileClient::ApiError => e puts "Exception when calling ContentFilesApi->read: #{e}" end ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **file_content_href** | **String**| URI of File Content. e.g.: /pulp/api/v3/content/file/files/1/ | **fields** | **String**| A list of fields to include in the response. | [optional] ### Return type [**FileContent**](FileContent.md) ### Authorization [Basic](../README.md#Basic) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json