Skip to content

Latest commit

 

History

History
682 lines (518 loc) · 23.6 KB

File metadata and controls

682 lines (518 loc) · 23.6 KB

EntitlementsApi

All URIs are relative to https://api.cloudsmith.io

Method HTTP request Description
entitlementsCreate POST /entitlements/{owner}/{repo}/ Create a specific entitlement in a repository.
entitlementsDelete DELETE /entitlements/{owner}/{repo}/{identifier}/ Delete a specific entitlement in a repository.
entitlementsDisable POST /entitlements/{owner}/{repo}/{identifier}/disable/ Disable an entitlement token in a repository.
entitlementsEnable POST /entitlements/{owner}/{repo}/{identifier}/enable/ Enable an entitlement token in a repository.
entitlementsList GET /entitlements/{owner}/{repo}/ Get a list of all entitlements in a repository.
entitlementsPartialUpdate PATCH /entitlements/{owner}/{repo}/{identifier}/ Update a specific entitlement in a repository.
entitlementsRead GET /entitlements/{owner}/{repo}/{identifier}/ Get a specific entitlement in a repository.
entitlementsRefresh POST /entitlements/{owner}/{repo}/{identifier}/refresh/ Refresh an entitlement token in a repository.
entitlementsReset POST /entitlements/{owner}/{repo}/{identifier}/reset/ Reset the statistics for an entitlement token in a repository.
entitlementsSync POST /entitlements/{owner}/{repo}/sync/ Synchronise tokens from a source repository.

entitlementsCreate

RepositoryToken entitlementsCreate(owner, repo, data, showTokens)

Create a specific entitlement in a repository.

Create a specific entitlement in a repository.

Example

// Import classes:
//import io.cloudsmith.api.ApiClient;
//import io.cloudsmith.api.ApiException;
//import io.cloudsmith.api.Configuration;
//import io.cloudsmith.api.auth.*;
//import io.cloudsmith.api.apis.EntitlementsApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure API key authorization: apikey
ApiKeyAuth apikey = (ApiKeyAuth) defaultClient.getAuthentication("apikey");
apikey.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//apikey.setApiKeyPrefix("Token");

// Configure HTTP basic authorization: basic
HttpBasicAuth basic = (HttpBasicAuth) defaultClient.getAuthentication("basic");
basic.setUsername("YOUR USERNAME");
basic.setPassword("YOUR PASSWORD");

EntitlementsApi apiInstance = new EntitlementsApi();
String owner = "owner_example"; // String | 
String repo = "repo_example"; // String | 
RepositoryTokenRequest data = new RepositoryTokenRequest(); // RepositoryTokenRequest | 
Boolean showTokens = false; // Boolean | Show entitlement token strings in results
try {
    RepositoryToken result = apiInstance.entitlementsCreate(owner, repo, data, showTokens);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling EntitlementsApi#entitlementsCreate");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
owner String
repo String
data RepositoryTokenRequest [optional]
showTokens Boolean Show entitlement token strings in results [optional] [default to false]

Return type

RepositoryToken

Authorization

apikey, basic

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

entitlementsDelete

entitlementsDelete(owner, repo, identifier)

Delete a specific entitlement in a repository.

Delete a specific entitlement in a repository.

Example

// Import classes:
//import io.cloudsmith.api.ApiClient;
//import io.cloudsmith.api.ApiException;
//import io.cloudsmith.api.Configuration;
//import io.cloudsmith.api.auth.*;
//import io.cloudsmith.api.apis.EntitlementsApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure API key authorization: apikey
ApiKeyAuth apikey = (ApiKeyAuth) defaultClient.getAuthentication("apikey");
apikey.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//apikey.setApiKeyPrefix("Token");

// Configure HTTP basic authorization: basic
HttpBasicAuth basic = (HttpBasicAuth) defaultClient.getAuthentication("basic");
basic.setUsername("YOUR USERNAME");
basic.setPassword("YOUR PASSWORD");

EntitlementsApi apiInstance = new EntitlementsApi();
String owner = "owner_example"; // String | 
String repo = "repo_example"; // String | 
String identifier = "identifier_example"; // String | 
try {
    apiInstance.entitlementsDelete(owner, repo, identifier);
} catch (ApiException e) {
    System.err.println("Exception when calling EntitlementsApi#entitlementsDelete");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
owner String
repo String
identifier String

Return type

null (empty response body)

Authorization

apikey, basic

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

entitlementsDisable

entitlementsDisable(owner, repo, identifier)

Disable an entitlement token in a repository.

Disable an entitlement token in a repository.

Example

// Import classes:
//import io.cloudsmith.api.ApiClient;
//import io.cloudsmith.api.ApiException;
//import io.cloudsmith.api.Configuration;
//import io.cloudsmith.api.auth.*;
//import io.cloudsmith.api.apis.EntitlementsApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure API key authorization: apikey
ApiKeyAuth apikey = (ApiKeyAuth) defaultClient.getAuthentication("apikey");
apikey.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//apikey.setApiKeyPrefix("Token");

// Configure HTTP basic authorization: basic
HttpBasicAuth basic = (HttpBasicAuth) defaultClient.getAuthentication("basic");
basic.setUsername("YOUR USERNAME");
basic.setPassword("YOUR PASSWORD");

EntitlementsApi apiInstance = new EntitlementsApi();
String owner = "owner_example"; // String | 
String repo = "repo_example"; // String | 
String identifier = "identifier_example"; // String | 
try {
    apiInstance.entitlementsDisable(owner, repo, identifier);
} catch (ApiException e) {
    System.err.println("Exception when calling EntitlementsApi#entitlementsDisable");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
owner String
repo String
identifier String

Return type

null (empty response body)

Authorization

apikey, basic

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

entitlementsEnable

entitlementsEnable(owner, repo, identifier)

Enable an entitlement token in a repository.

Enable an entitlement token in a repository.

Example

// Import classes:
//import io.cloudsmith.api.ApiClient;
//import io.cloudsmith.api.ApiException;
//import io.cloudsmith.api.Configuration;
//import io.cloudsmith.api.auth.*;
//import io.cloudsmith.api.apis.EntitlementsApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure API key authorization: apikey
ApiKeyAuth apikey = (ApiKeyAuth) defaultClient.getAuthentication("apikey");
apikey.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//apikey.setApiKeyPrefix("Token");

// Configure HTTP basic authorization: basic
HttpBasicAuth basic = (HttpBasicAuth) defaultClient.getAuthentication("basic");
basic.setUsername("YOUR USERNAME");
basic.setPassword("YOUR PASSWORD");

EntitlementsApi apiInstance = new EntitlementsApi();
String owner = "owner_example"; // String | 
String repo = "repo_example"; // String | 
String identifier = "identifier_example"; // String | 
try {
    apiInstance.entitlementsEnable(owner, repo, identifier);
} catch (ApiException e) {
    System.err.println("Exception when calling EntitlementsApi#entitlementsEnable");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
owner String
repo String
identifier String

Return type

null (empty response body)

Authorization

apikey, basic

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

entitlementsList

List<RepositoryToken> entitlementsList(owner, repo, page, pageSize, showTokens, query, active, sort)

Get a list of all entitlements in a repository.

Get a list of all entitlements in a repository.

Example

// Import classes:
//import io.cloudsmith.api.ApiClient;
//import io.cloudsmith.api.ApiException;
//import io.cloudsmith.api.Configuration;
//import io.cloudsmith.api.auth.*;
//import io.cloudsmith.api.apis.EntitlementsApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure API key authorization: apikey
ApiKeyAuth apikey = (ApiKeyAuth) defaultClient.getAuthentication("apikey");
apikey.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//apikey.setApiKeyPrefix("Token");

// Configure HTTP basic authorization: basic
HttpBasicAuth basic = (HttpBasicAuth) defaultClient.getAuthentication("basic");
basic.setUsername("YOUR USERNAME");
basic.setPassword("YOUR PASSWORD");

EntitlementsApi apiInstance = new EntitlementsApi();
String owner = "owner_example"; // String | 
String repo = "repo_example"; // String | 
java.math.BigInteger page = new java.math.BigInteger(); // java.math.BigInteger | A page number within the paginated result set.
java.math.BigInteger pageSize = new java.math.BigInteger(); // java.math.BigInteger | Number of results to return per page.
Boolean showTokens = false; // Boolean | Show entitlement token strings in results
String query = "query_example"; // String | A search term for querying names of entitlements.
Boolean active = false; // Boolean | If true, only include active tokens
String sort = "name"; // String | A field for sorting objects in ascending or descending order. Use `-` prefix for descending order (e.g., `-name`). Available options: name.
try {
    List<RepositoryToken> result = apiInstance.entitlementsList(owner, repo, page, pageSize, showTokens, query, active, sort);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling EntitlementsApi#entitlementsList");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
owner String
repo String
page java.math.BigInteger A page number within the paginated result set. [optional]
pageSize java.math.BigInteger Number of results to return per page. [optional]
showTokens Boolean Show entitlement token strings in results [optional] [default to false]
query String A search term for querying names of entitlements. [optional]
active Boolean If true, only include active tokens [optional] [default to false]
sort String A field for sorting objects in ascending or descending order. Use `-` prefix for descending order (e.g., `-name`). Available options: name. [optional] [default to name]

Return type

List<RepositoryToken>

Authorization

apikey, basic

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

entitlementsPartialUpdate

RepositoryToken entitlementsPartialUpdate(owner, repo, identifier, data, showTokens)

Update a specific entitlement in a repository.

Update a specific entitlement in a repository.

Example

// Import classes:
//import io.cloudsmith.api.ApiClient;
//import io.cloudsmith.api.ApiException;
//import io.cloudsmith.api.Configuration;
//import io.cloudsmith.api.auth.*;
//import io.cloudsmith.api.apis.EntitlementsApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure API key authorization: apikey
ApiKeyAuth apikey = (ApiKeyAuth) defaultClient.getAuthentication("apikey");
apikey.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//apikey.setApiKeyPrefix("Token");

// Configure HTTP basic authorization: basic
HttpBasicAuth basic = (HttpBasicAuth) defaultClient.getAuthentication("basic");
basic.setUsername("YOUR USERNAME");
basic.setPassword("YOUR PASSWORD");

EntitlementsApi apiInstance = new EntitlementsApi();
String owner = "owner_example"; // String | 
String repo = "repo_example"; // String | 
String identifier = "identifier_example"; // String | 
RepositoryTokenRequestPatch data = new RepositoryTokenRequestPatch(); // RepositoryTokenRequestPatch | 
Boolean showTokens = false; // Boolean | Show entitlement token strings in results
try {
    RepositoryToken result = apiInstance.entitlementsPartialUpdate(owner, repo, identifier, data, showTokens);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling EntitlementsApi#entitlementsPartialUpdate");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
owner String
repo String
identifier String
data RepositoryTokenRequestPatch [optional]
showTokens Boolean Show entitlement token strings in results [optional] [default to false]

Return type

RepositoryToken

Authorization

apikey, basic

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

entitlementsRead

RepositoryToken entitlementsRead(owner, repo, identifier, fuzzy, showTokens)

Get a specific entitlement in a repository.

Get a specific entitlement in a repository.

Example

// Import classes:
//import io.cloudsmith.api.ApiClient;
//import io.cloudsmith.api.ApiException;
//import io.cloudsmith.api.Configuration;
//import io.cloudsmith.api.auth.*;
//import io.cloudsmith.api.apis.EntitlementsApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure API key authorization: apikey
ApiKeyAuth apikey = (ApiKeyAuth) defaultClient.getAuthentication("apikey");
apikey.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//apikey.setApiKeyPrefix("Token");

// Configure HTTP basic authorization: basic
HttpBasicAuth basic = (HttpBasicAuth) defaultClient.getAuthentication("basic");
basic.setUsername("YOUR USERNAME");
basic.setPassword("YOUR PASSWORD");

EntitlementsApi apiInstance = new EntitlementsApi();
String owner = "owner_example"; // String | 
String repo = "repo_example"; // String | 
String identifier = "identifier_example"; // String | 
Boolean fuzzy = false; // Boolean | If true, entitlement identifiers including name will be fuzzy matched.
Boolean showTokens = false; // Boolean | Show entitlement token strings in results
try {
    RepositoryToken result = apiInstance.entitlementsRead(owner, repo, identifier, fuzzy, showTokens);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling EntitlementsApi#entitlementsRead");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
owner String
repo String
identifier String
fuzzy Boolean If true, entitlement identifiers including name will be fuzzy matched. [optional] [default to false]
showTokens Boolean Show entitlement token strings in results [optional] [default to false]

Return type

RepositoryToken

Authorization

apikey, basic

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

entitlementsRefresh

RepositoryTokenRefresh entitlementsRefresh(owner, repo, identifier, data, showTokens)

Refresh an entitlement token in a repository.

Refresh an entitlement token in a repository.

Example

// Import classes:
//import io.cloudsmith.api.ApiClient;
//import io.cloudsmith.api.ApiException;
//import io.cloudsmith.api.Configuration;
//import io.cloudsmith.api.auth.*;
//import io.cloudsmith.api.apis.EntitlementsApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure API key authorization: apikey
ApiKeyAuth apikey = (ApiKeyAuth) defaultClient.getAuthentication("apikey");
apikey.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//apikey.setApiKeyPrefix("Token");

// Configure HTTP basic authorization: basic
HttpBasicAuth basic = (HttpBasicAuth) defaultClient.getAuthentication("basic");
basic.setUsername("YOUR USERNAME");
basic.setPassword("YOUR PASSWORD");

EntitlementsApi apiInstance = new EntitlementsApi();
String owner = "owner_example"; // String | 
String repo = "repo_example"; // String | 
String identifier = "identifier_example"; // String | 
RepositoryTokenRefreshRequest data = new RepositoryTokenRefreshRequest(); // RepositoryTokenRefreshRequest | 
Boolean showTokens = false; // Boolean | Show entitlement token strings in results
try {
    RepositoryTokenRefresh result = apiInstance.entitlementsRefresh(owner, repo, identifier, data, showTokens);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling EntitlementsApi#entitlementsRefresh");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
owner String
repo String
identifier String
data RepositoryTokenRefreshRequest [optional]
showTokens Boolean Show entitlement token strings in results [optional] [default to false]

Return type

RepositoryTokenRefresh

Authorization

apikey, basic

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

entitlementsReset

entitlementsReset(owner, repo, identifier, showTokens)

Reset the statistics for an entitlement token in a repository.

Reset the statistics for an entitlement token in a repository.

Example

// Import classes:
//import io.cloudsmith.api.ApiClient;
//import io.cloudsmith.api.ApiException;
//import io.cloudsmith.api.Configuration;
//import io.cloudsmith.api.auth.*;
//import io.cloudsmith.api.apis.EntitlementsApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure API key authorization: apikey
ApiKeyAuth apikey = (ApiKeyAuth) defaultClient.getAuthentication("apikey");
apikey.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//apikey.setApiKeyPrefix("Token");

// Configure HTTP basic authorization: basic
HttpBasicAuth basic = (HttpBasicAuth) defaultClient.getAuthentication("basic");
basic.setUsername("YOUR USERNAME");
basic.setPassword("YOUR PASSWORD");

EntitlementsApi apiInstance = new EntitlementsApi();
String owner = "owner_example"; // String | 
String repo = "repo_example"; // String | 
String identifier = "identifier_example"; // String | 
Boolean showTokens = false; // Boolean | Show entitlement token strings in results
try {
    apiInstance.entitlementsReset(owner, repo, identifier, showTokens);
} catch (ApiException e) {
    System.err.println("Exception when calling EntitlementsApi#entitlementsReset");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
owner String
repo String
identifier String
showTokens Boolean Show entitlement token strings in results [optional] [default to false]

Return type

null (empty response body)

Authorization

apikey, basic

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

entitlementsSync

RepositoryTokenSync entitlementsSync(owner, repo, data, showTokens)

Synchronise tokens from a source repository.

Synchronise tokens from a source repository.

Example

// Import classes:
//import io.cloudsmith.api.ApiClient;
//import io.cloudsmith.api.ApiException;
//import io.cloudsmith.api.Configuration;
//import io.cloudsmith.api.auth.*;
//import io.cloudsmith.api.apis.EntitlementsApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure API key authorization: apikey
ApiKeyAuth apikey = (ApiKeyAuth) defaultClient.getAuthentication("apikey");
apikey.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//apikey.setApiKeyPrefix("Token");

// Configure HTTP basic authorization: basic
HttpBasicAuth basic = (HttpBasicAuth) defaultClient.getAuthentication("basic");
basic.setUsername("YOUR USERNAME");
basic.setPassword("YOUR PASSWORD");

EntitlementsApi apiInstance = new EntitlementsApi();
String owner = "owner_example"; // String | 
String repo = "repo_example"; // String | 
RepositoryTokenSyncRequest data = new RepositoryTokenSyncRequest(); // RepositoryTokenSyncRequest | 
Boolean showTokens = false; // Boolean | Show entitlement token strings in results
try {
    RepositoryTokenSync result = apiInstance.entitlementsSync(owner, repo, data, showTokens);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling EntitlementsApi#entitlementsSync");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
owner String
repo String
data RepositoryTokenSyncRequest [optional]
showTokens Boolean Show entitlement token strings in results [optional] [default to false]

Return type

RepositoryTokenSync

Authorization

apikey, basic

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json