# CloudsmithApi::EntitlementsApi All URIs are relative to *https://api.cloudsmith.io/v1* Method | HTTP request | Description ------------- | ------------- | ------------- [**entitlements_create**](EntitlementsApi.md#entitlements_create) | **POST** /entitlements/{owner}/{repo}/ | Create a specific entitlement in a repository. [**entitlements_delete**](EntitlementsApi.md#entitlements_delete) | **DELETE** /entitlements/{owner}/{repo}/{identifier}/ | Delete a specific entitlement in a repository. [**entitlements_disable**](EntitlementsApi.md#entitlements_disable) | **POST** /entitlements/{owner}/{repo}/{identifier}/disable/ | Disable an entitlement token in a repository. [**entitlements_enable**](EntitlementsApi.md#entitlements_enable) | **POST** /entitlements/{owner}/{repo}/{identifier}/enable/ | Enable an entitlement token in a repository. [**entitlements_list**](EntitlementsApi.md#entitlements_list) | **GET** /entitlements/{owner}/{repo}/ | Get a list of all entitlements in a repository. [**entitlements_partial_update**](EntitlementsApi.md#entitlements_partial_update) | **PATCH** /entitlements/{owner}/{repo}/{identifier}/ | Update a specific entitlement in a repository. [**entitlements_read**](EntitlementsApi.md#entitlements_read) | **GET** /entitlements/{owner}/{repo}/{identifier}/ | Get a specific entitlement in a repository. [**entitlements_refresh**](EntitlementsApi.md#entitlements_refresh) | **POST** /entitlements/{owner}/{repo}/{identifier}/refresh/ | Refresh an entitlement token in a repository. [**entitlements_reset**](EntitlementsApi.md#entitlements_reset) | **POST** /entitlements/{owner}/{repo}/{identifier}/reset/ | Reset the statistics for an entitlement token in a repository. [**entitlements_sync**](EntitlementsApi.md#entitlements_sync) | **POST** /entitlements/{owner}/{repo}/sync/ | Synchronise tokens from a source repository. # **entitlements_create** > RepositoryToken entitlements_create(owner, repo, opts) Create a specific entitlement in a repository. Create a specific entitlement in a repository. ### Example ```ruby # load the gem require 'cloudsmith-api' # setup authorization CloudsmithApi.configure do |config| # Configure API key authorization: apikey config.api_key['X-Api-Key'] = 'YOUR API KEY' # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) #config.api_key_prefix['X-Api-Key'] = 'Bearer' end api_instance = CloudsmithApi::EntitlementsApi.new owner = "owner_example" # String | repo = "repo_example" # String | opts = { show_tokens: true, # BOOLEAN | Show entitlement token strings in results data: CloudsmithApi::EntitlementsCreate.new # EntitlementsCreate | } begin #Create a specific entitlement in a repository. result = api_instance.entitlements_create(owner, repo, opts) p result rescue CloudsmithApi::ApiError => e puts "Exception when calling EntitlementsApi->entitlements_create: #{e}" end ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **owner** | **String**| | **repo** | **String**| | **show_tokens** | **BOOLEAN**| Show entitlement token strings in results | [optional] **data** | [**EntitlementsCreate**](EntitlementsCreate.md)| | [optional] ### Return type [**RepositoryToken**](RepositoryToken.md) ### Authorization [apikey](../README.md#apikey) ### HTTP request headers - **Content-Type**: application/json - **Accept**: Not defined # **entitlements_delete** > entitlements_delete(owner, repo, identifier) Delete a specific entitlement in a repository. Delete a specific entitlement in a repository. ### Example ```ruby # load the gem require 'cloudsmith-api' # setup authorization CloudsmithApi.configure do |config| # Configure API key authorization: apikey config.api_key['X-Api-Key'] = 'YOUR API KEY' # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) #config.api_key_prefix['X-Api-Key'] = 'Bearer' end api_instance = CloudsmithApi::EntitlementsApi.new owner = "owner_example" # String | repo = "repo_example" # String | identifier = "identifier_example" # String | begin #Delete a specific entitlement in a repository. api_instance.entitlements_delete(owner, repo, identifier) rescue CloudsmithApi::ApiError => e puts "Exception when calling EntitlementsApi->entitlements_delete: #{e}" end ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **owner** | **String**| | **repo** | **String**| | **identifier** | **String**| | ### Return type nil (empty response body) ### Authorization [apikey](../README.md#apikey) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: Not defined # **entitlements_disable** > entitlements_disable(owner, repo, identifier) Disable an entitlement token in a repository. Disable an entitlement token in a repository. ### Example ```ruby # load the gem require 'cloudsmith-api' # setup authorization CloudsmithApi.configure do |config| # Configure API key authorization: apikey config.api_key['X-Api-Key'] = 'YOUR API KEY' # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) #config.api_key_prefix['X-Api-Key'] = 'Bearer' end api_instance = CloudsmithApi::EntitlementsApi.new owner = "owner_example" # String | repo = "repo_example" # String | identifier = "identifier_example" # String | begin #Disable an entitlement token in a repository. api_instance.entitlements_disable(owner, repo, identifier) rescue CloudsmithApi::ApiError => e puts "Exception when calling EntitlementsApi->entitlements_disable: #{e}" end ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **owner** | **String**| | **repo** | **String**| | **identifier** | **String**| | ### Return type nil (empty response body) ### Authorization [apikey](../README.md#apikey) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: Not defined # **entitlements_enable** > entitlements_enable(owner, repo, identifier) Enable an entitlement token in a repository. Enable an entitlement token in a repository. ### Example ```ruby # load the gem require 'cloudsmith-api' # setup authorization CloudsmithApi.configure do |config| # Configure API key authorization: apikey config.api_key['X-Api-Key'] = 'YOUR API KEY' # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) #config.api_key_prefix['X-Api-Key'] = 'Bearer' end api_instance = CloudsmithApi::EntitlementsApi.new owner = "owner_example" # String | repo = "repo_example" # String | identifier = "identifier_example" # String | begin #Enable an entitlement token in a repository. api_instance.entitlements_enable(owner, repo, identifier) rescue CloudsmithApi::ApiError => e puts "Exception when calling EntitlementsApi->entitlements_enable: #{e}" end ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **owner** | **String**| | **repo** | **String**| | **identifier** | **String**| | ### Return type nil (empty response body) ### Authorization [apikey](../README.md#apikey) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: Not defined # **entitlements_list** > Array<RepositoryToken> entitlements_list(owner, repo, opts) Get a list of all entitlements in a repository. Get a list of all entitlements in a repository. ### Example ```ruby # load the gem require 'cloudsmith-api' # setup authorization CloudsmithApi.configure do |config| # Configure API key authorization: apikey config.api_key['X-Api-Key'] = 'YOUR API KEY' # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) #config.api_key_prefix['X-Api-Key'] = 'Bearer' end api_instance = CloudsmithApi::EntitlementsApi.new owner = "owner_example" # String | repo = "repo_example" # String | opts = { page: 56, # Integer | A page number within the paginated result set. page_size: 56, # Integer | Number of results to return per page. show_tokens: true # BOOLEAN | Show entitlement token strings in results } begin #Get a list of all entitlements in a repository. result = api_instance.entitlements_list(owner, repo, opts) p result rescue CloudsmithApi::ApiError => e puts "Exception when calling EntitlementsApi->entitlements_list: #{e}" end ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **owner** | **String**| | **repo** | **String**| | **page** | **Integer**| A page number within the paginated result set. | [optional] **page_size** | **Integer**| Number of results to return per page. | [optional] **show_tokens** | **BOOLEAN**| Show entitlement token strings in results | [optional] ### Return type [**Array<RepositoryToken>**](RepositoryToken.md) ### Authorization [apikey](../README.md#apikey) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: Not defined # **entitlements_partial_update** > RepositoryToken entitlements_partial_update(owner, repo, identifier, opts) Update a specific entitlement in a repository. Update a specific entitlement in a repository. ### Example ```ruby # load the gem require 'cloudsmith-api' # setup authorization CloudsmithApi.configure do |config| # Configure API key authorization: apikey config.api_key['X-Api-Key'] = 'YOUR API KEY' # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) #config.api_key_prefix['X-Api-Key'] = 'Bearer' end api_instance = CloudsmithApi::EntitlementsApi.new owner = "owner_example" # String | repo = "repo_example" # String | identifier = "identifier_example" # String | opts = { show_tokens: true, # BOOLEAN | Show entitlement token strings in results data: CloudsmithApi::EntitlementsPartialUpdate.new # EntitlementsPartialUpdate | } begin #Update a specific entitlement in a repository. result = api_instance.entitlements_partial_update(owner, repo, identifier, opts) p result rescue CloudsmithApi::ApiError => e puts "Exception when calling EntitlementsApi->entitlements_partial_update: #{e}" end ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **owner** | **String**| | **repo** | **String**| | **identifier** | **String**| | **show_tokens** | **BOOLEAN**| Show entitlement token strings in results | [optional] **data** | [**EntitlementsPartialUpdate**](EntitlementsPartialUpdate.md)| | [optional] ### Return type [**RepositoryToken**](RepositoryToken.md) ### Authorization [apikey](../README.md#apikey) ### HTTP request headers - **Content-Type**: application/json - **Accept**: Not defined # **entitlements_read** > RepositoryToken entitlements_read(owner, repo, identifier, opts) Get a specific entitlement in a repository. Get a specific entitlement in a repository. ### Example ```ruby # load the gem require 'cloudsmith-api' # setup authorization CloudsmithApi.configure do |config| # Configure API key authorization: apikey config.api_key['X-Api-Key'] = 'YOUR API KEY' # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) #config.api_key_prefix['X-Api-Key'] = 'Bearer' end api_instance = CloudsmithApi::EntitlementsApi.new owner = "owner_example" # String | repo = "repo_example" # String | identifier = "identifier_example" # String | opts = { show_tokens: true # BOOLEAN | Show entitlement token strings in results } begin #Get a specific entitlement in a repository. result = api_instance.entitlements_read(owner, repo, identifier, opts) p result rescue CloudsmithApi::ApiError => e puts "Exception when calling EntitlementsApi->entitlements_read: #{e}" end ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **owner** | **String**| | **repo** | **String**| | **identifier** | **String**| | **show_tokens** | **BOOLEAN**| Show entitlement token strings in results | [optional] ### Return type [**RepositoryToken**](RepositoryToken.md) ### Authorization [apikey](../README.md#apikey) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: Not defined # **entitlements_refresh** > RepositoryTokenRefresh entitlements_refresh(owner, repo, identifier, opts) Refresh an entitlement token in a repository. Refresh an entitlement token in a repository. ### Example ```ruby # load the gem require 'cloudsmith-api' # setup authorization CloudsmithApi.configure do |config| # Configure API key authorization: apikey config.api_key['X-Api-Key'] = 'YOUR API KEY' # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) #config.api_key_prefix['X-Api-Key'] = 'Bearer' end api_instance = CloudsmithApi::EntitlementsApi.new owner = "owner_example" # String | repo = "repo_example" # String | identifier = "identifier_example" # String | opts = { show_tokens: true, # BOOLEAN | Show entitlement token strings in results data: CloudsmithApi::EntitlementsRefresh.new # EntitlementsRefresh | } begin #Refresh an entitlement token in a repository. result = api_instance.entitlements_refresh(owner, repo, identifier, opts) p result rescue CloudsmithApi::ApiError => e puts "Exception when calling EntitlementsApi->entitlements_refresh: #{e}" end ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **owner** | **String**| | **repo** | **String**| | **identifier** | **String**| | **show_tokens** | **BOOLEAN**| Show entitlement token strings in results | [optional] **data** | [**EntitlementsRefresh**](EntitlementsRefresh.md)| | [optional] ### Return type [**RepositoryTokenRefresh**](RepositoryTokenRefresh.md) ### Authorization [apikey](../README.md#apikey) ### HTTP request headers - **Content-Type**: application/json - **Accept**: Not defined # **entitlements_reset** > entitlements_reset(owner, repo, identifier, opts) Reset the statistics for an entitlement token in a repository. Reset the statistics for an entitlement token in a repository. ### Example ```ruby # load the gem require 'cloudsmith-api' # setup authorization CloudsmithApi.configure do |config| # Configure API key authorization: apikey config.api_key['X-Api-Key'] = 'YOUR API KEY' # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) #config.api_key_prefix['X-Api-Key'] = 'Bearer' end api_instance = CloudsmithApi::EntitlementsApi.new owner = "owner_example" # String | repo = "repo_example" # String | identifier = "identifier_example" # String | opts = { show_tokens: true # BOOLEAN | Show entitlement token strings in results } begin #Reset the statistics for an entitlement token in a repository. api_instance.entitlements_reset(owner, repo, identifier, opts) rescue CloudsmithApi::ApiError => e puts "Exception when calling EntitlementsApi->entitlements_reset: #{e}" end ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **owner** | **String**| | **repo** | **String**| | **identifier** | **String**| | **show_tokens** | **BOOLEAN**| Show entitlement token strings in results | [optional] ### Return type nil (empty response body) ### Authorization [apikey](../README.md#apikey) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: Not defined # **entitlements_sync** > RepositoryTokenSync entitlements_sync(owner, repo, opts) Synchronise tokens from a source repository. Synchronise tokens from a source repository. ### Example ```ruby # load the gem require 'cloudsmith-api' # setup authorization CloudsmithApi.configure do |config| # Configure API key authorization: apikey config.api_key['X-Api-Key'] = 'YOUR API KEY' # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) #config.api_key_prefix['X-Api-Key'] = 'Bearer' end api_instance = CloudsmithApi::EntitlementsApi.new owner = "owner_example" # String | repo = "repo_example" # String | opts = { show_tokens: true, # BOOLEAN | Show entitlement token strings in results data: CloudsmithApi::EntitlementsSync.new # EntitlementsSync | } begin #Synchronise tokens from a source repository. result = api_instance.entitlements_sync(owner, repo, opts) p result rescue CloudsmithApi::ApiError => e puts "Exception when calling EntitlementsApi->entitlements_sync: #{e}" end ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **owner** | **String**| | **repo** | **String**| | **show_tokens** | **BOOLEAN**| Show entitlement token strings in results | [optional] **data** | [**EntitlementsSync**](EntitlementsSync.md)| | [optional] ### Return type [**RepositoryTokenSync**](RepositoryTokenSync.md) ### Authorization [apikey](../README.md#apikey) ### HTTP request headers - **Content-Type**: application/json - **Accept**: Not defined