Delete all repository contents The registry V2 API allows manifests and blobs to be deleted individually but it is not possible to remove an entire repository. This operation is provided for convenience
Example
// Import classes:importcom.ionoscloud.containerregistry.ApiClient;importcom.ionoscloud.containerregistry.ApiException;importcom.ionoscloud.containerregistry.ApiResponse;importcom.ionoscloud.containerregistry.Configuration;importcom.ionoscloud.containerregistry.auth.*;importcom.ionoscloud.containerregistry.model.*;importcom.ionoscloud.containerregistry.api.RepositoriesApi;publicclassExample {publicstaticvoidmain(String[] args) {ApiClient defaultClient =Configuration.getDefaultApiClient();// Configure HTTP basic authorization: basicAuthHttpBasicAuth basicAuthentication = (HttpBasicAuth) defaultClient.getAuthentication("basicAuth");basicAuthentication.setUsername("YOUR USERNAME");basicAuthentication.setPassword("YOUR PASSWORD");// Configure Api Key authorization: tokenAuthdefaultClient.setApiKeyWithBearerPrefix("YOUR TOKEN");RepositoriesApi apiInstance =newRepositoriesApi(defaultClient);UUID registryId =newUUID(); // UUID | The unique ID of the registryString repositoryName ="my-service"; // String | The name of the repositorytry {apiInstance.registriesRepositoriesDeleteWithHttpInfo(registryId, repositoryName); } catch (ApiException e) {System.err.println("Exception when calling RepositoriesApi#registriesRepositoriesDelete");System.err.println("Status code: "+e.getCode());System.err.println("Reason: "+e.getResponseBody());System.err.println("Response headers: "+e.getResponseHeaders());e.printStackTrace(); } }}
⚠️ Note: for the example above, you need to provide all parameters to the method call. Null values will resolve to the API defaults.
// Import classes:importcom.ionoscloud.containerregistry.ApiClient;importcom.ionoscloud.containerregistry.ApiException;importcom.ionoscloud.containerregistry.ApiResponse;importcom.ionoscloud.containerregistry.Configuration;importcom.ionoscloud.containerregistry.auth.*;importcom.ionoscloud.containerregistry.model.*;importcom.ionoscloud.containerregistry.api.RepositoriesApi;publicclassExample {publicstaticvoidmain(String[] args) {ApiClient defaultClient =Configuration.getDefaultApiClient();// Configure Api Key authorization: tokenAuthdefaultClient.setApiKeyWithBearerPrefix("YOUR TOKEN");RepositoriesApi apiInstance =newRepositoriesApi(defaultClient);UUID registryId =newUUID(); // UUID | The ID (UUID) of the Registry.String repositoryName ="my-service"; // String | The Name of the Repository that should be retrieved.try { ApiResponse<RepositoryRead> result = apiInstance.registriesRepositoriesFindByNameWithHttpInfo(registryId, repositoryName);
System.out.println("Response: "+result.getData());System.out.println("Status Code: "+result.getStatusCode());System.out.println("Headers: "+result.getHeaders()); } catch (ApiException e) {System.err.println("Exception when calling RepositoriesApi#registriesRepositoriesFindByName");System.err.println("Status code: "+e.getCode());System.err.println("Reason: "+e.getResponseBody());System.err.println("Response headers: "+e.getResponseHeaders());e.printStackTrace(); } }}
⚠️ Note: for the example above, you need to provide all parameters to the method call. Null values will resolve to the API defaults.
This endpoint enables retrieving all Repositories using pagination and optional filters.
Example
// Import classes:importcom.ionoscloud.containerregistry.ApiClient;importcom.ionoscloud.containerregistry.ApiException;importcom.ionoscloud.containerregistry.ApiResponse;importcom.ionoscloud.containerregistry.Configuration;importcom.ionoscloud.containerregistry.auth.*;importcom.ionoscloud.containerregistry.model.*;importcom.ionoscloud.containerregistry.api.RepositoriesApi;publicclassExample {publicstaticvoidmain(String[] args) {ApiClient defaultClient =Configuration.getDefaultApiClient();// Configure Api Key authorization: tokenAuthdefaultClient.setApiKeyWithBearerPrefix("YOUR TOKEN");RepositoriesApi apiInstance =newRepositoriesApi(defaultClient);UUID registryId =newUUID(); // UUID | The ID (UUID) of the Registry. Integer offset = 0; // Integer | The first element (of the total list of elements) to include in the response. Use together with limit for pagination.
Integer limit = 100; // Integer | The maximum number of elements to return. Use together with offset for pagination.
String filterName ="filterName_example"; // String | Filter resources by name. String filterVulnerabilitySeverity = "filterVulnerabilitySeverity_example"; // String | Filter resources by vulnerability severity.
String orderBy = "-lastPush"; // String | The field to order the results by. If not provided, the results will be ordered by the default field.
String orderBy ="orderBy_example"; // String | Order by fieldInteger maxResults ="maxResults_example"; // Integer | Maximum number of results to returntry { ApiResponse<RepositoryReadList> result = apiInstance.registriesRepositoriesGetWithHttpInfo(registryId, offset, limit, filterName, filterVulnerabilitySeverity, orderBy, orderBy, maxResults, filters);
System.out.println("Response: "+result.getData());System.out.println("Status Code: "+result.getStatusCode());System.out.println("Headers: "+result.getHeaders()); } catch (ApiException e) {System.err.println("Exception when calling RepositoriesApi#registriesRepositoriesGet");System.err.println("Status code: "+e.getCode());System.err.println("Reason: "+e.getResponseBody());System.err.println("Response headers: "+e.getResponseHeaders());e.printStackTrace(); } }}
⚠️ Note: for the example above, you need to provide all parameters to the method call. Null values will resolve to the API defaults.