All URIs are relative to https://api.cloudsmith.io
| Method | HTTP request | Description |
|---|---|---|
| formatsList | GET /formats/ | Get a list of all supported package formats. |
| formatsRead | GET /formats/{slug}/ | Get a specific supported package format. |
List<Format> formatsList()
Get a list of all supported package formats.
Get a list of all supported package formats.
// 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.FormatsApi;
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");
FormatsApi apiInstance = new FormatsApi();
try {
List<Format> result = apiInstance.formatsList();
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling FormatsApi#formatsList");
e.printStackTrace();
}This endpoint does not need any parameter.
- Content-Type: application/json
- Accept: application/json
Format formatsRead(slug)
Get a specific supported package format.
Get a specific supported package format.
// 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.FormatsApi;
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");
FormatsApi apiInstance = new FormatsApi();
String slug = "slug_example"; // String |
try {
Format result = apiInstance.formatsRead(slug);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling FormatsApi#formatsRead");
e.printStackTrace();
}| Name | Type | Description | Notes |
|---|---|---|---|
| slug | String |
- Content-Type: application/json
- Accept: application/json