# \RepositoriesApi

All URIs are relative to *https://registry.example.com*

Method | HTTP request | Description
------------- | ------------- | -------------
[**bulk_promote_artifacts**](RepositoriesApi.md#bulk_promote_artifacts) | **POST** /api/v1/repositories/{key}/promote | Bulk promote artifacts
[**create_repository**](RepositoriesApi.md#create_repository) | **POST** /api/v1/repositories | Create repository
[**delete_artifact**](RepositoriesApi.md#delete_artifact) | **DELETE** /api/v1/repositories/{key}/artifacts/{path} | Delete artifact by path
[**delete_repository**](RepositoriesApi.md#delete_repository) | **DELETE** /api/v1/repositories/{key} | Delete repository
[**download_artifact**](RepositoriesApi.md#download_artifact) | **GET** /api/v1/repositories/{key}/download/{path} | Download artifact
[**get_promotion_history**](RepositoriesApi.md#get_promotion_history) | **GET** /api/v1/repositories/{key}/promotion-history | Get promotion history
[**get_repository**](RepositoriesApi.md#get_repository) | **GET** /api/v1/repositories/{key} | Get repository
[**get_repository_artifact**](RepositoriesApi.md#get_repository_artifact) | **GET** /api/v1/repositories/{key}/artifacts/{path} | Get artifact info by path
[**list_repositories**](RepositoriesApi.md#list_repositories) | **GET** /api/v1/repositories | List repositories
[**list_repository_artifacts**](RepositoriesApi.md#list_repository_artifacts) | **GET** /api/v1/repositories/{key}/artifacts | List artifacts in repository
[**promote_artifact**](RepositoriesApi.md#promote_artifact) | **POST** /api/v1/repositories/{key}/artifacts/{artifact_id}/promote | Promote single artifact
[**update_repository**](RepositoriesApi.md#update_repository) | **PATCH** /api/v1/repositories/{key} | Update repository
[**upload_artifact**](RepositoriesApi.md#upload_artifact) | **PUT** /api/v1/repositories/{key}/artifacts/{path} | Upload artifact



## bulk_promote_artifacts

> models::BulkPromotionResponse bulk_promote_artifacts(key, bulk_promote_artifacts_request)
Bulk promote artifacts

Promotes multiple artifacts from the source repository to a target repository in a single operation. Optionally runs promotion policies before executing.

### Parameters


Name | Type | Description  | Required | Notes
------------- | ------------- | ------------- | ------------- | -------------
**key** | **String** | Source repository key | [required] |
**bulk_promote_artifacts_request** | [**BulkPromoteArtifactsRequest**](BulkPromoteArtifactsRequest.md) |  | [required] |

### Return type

[**models::BulkPromotionResponse**](BulkPromotionResponse.md)

### Authorization

[apiKeyAuth](../README.md#apiKeyAuth), [bearerAuth](../README.md#bearerAuth)

### HTTP request headers

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

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)


## create_repository

> models::Repository create_repository(create_repository_request)
Create repository

Creates a new artifact repository. Requires admin privileges.

### Parameters


Name | Type | Description  | Required | Notes
------------- | ------------- | ------------- | ------------- | -------------
**create_repository_request** | [**CreateRepositoryRequest**](CreateRepositoryRequest.md) |  | [required] |

### Return type

[**models::Repository**](Repository.md)

### Authorization

[apiKeyAuth](../README.md#apiKeyAuth), [bearerAuth](../README.md#bearerAuth)

### HTTP request headers

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

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)


## delete_artifact

> delete_artifact(key, path)
Delete artifact by path

Permanently deletes the artifact at the specified path within the repository.

### Parameters


Name | Type | Description  | Required | Notes
------------- | ------------- | ------------- | ------------- | -------------
**key** | **String** | Repository key | [required] |
**path** | **String** | Artifact path within the repository | [required] |

### Return type

 (empty response body)

### Authorization

[apiKeyAuth](../README.md#apiKeyAuth), [bearerAuth](../README.md#bearerAuth)

### HTTP request headers

- **Content-Type**: Not defined
- **Accept**: application/json

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)


## delete_repository

> delete_repository(key, force)
Delete repository

Deletes a repository. By default, fails if the repository contains artifacts. Use the force query parameter to delete a repository and all its contents.

### Parameters


Name | Type | Description  | Required | Notes
------------- | ------------- | ------------- | ------------- | -------------
**key** | **String** | Repository key | [required] |
**force** | Option<**bool**> | Force deletion even if repository contains artifacts. |  |[default to false]

### Return type

 (empty response body)

### Authorization

[apiKeyAuth](../README.md#apiKeyAuth), [bearerAuth](../README.md#bearerAuth)

### HTTP request headers

- **Content-Type**: Not defined
- **Accept**: application/json

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)


## download_artifact

> Vec<u8> download_artifact(key, path)
Download artifact

Downloads the binary content of an artifact. The response Content-Type is determined by the artifact's MIME type.

### Parameters


Name | Type | Description  | Required | Notes
------------- | ------------- | ------------- | ------------- | -------------
**key** | **String** | Repository key | [required] |
**path** | **String** | Artifact path within the repository | [required] |

### Return type

[**Vec<u8>**](Vec<u8>.md)

### Authorization

[apiKeyAuth](../README.md#apiKeyAuth), [bearerAuth](../README.md#bearerAuth)

### HTTP request headers

- **Content-Type**: Not defined
- **Accept**: application/octet-stream, application/json

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)


## get_promotion_history

> models::GetPromotionHistory200Response get_promotion_history(key, artifact_id, page, per_page)
Get promotion history

Returns a paginated list of promotion events for the specified repository, including policy evaluation results and operator notes.

### Parameters


Name | Type | Description  | Required | Notes
------------- | ------------- | ------------- | ------------- | -------------
**key** | **String** | Repository key | [required] |
**artifact_id** | Option<**uuid::Uuid**> | Filter history to a specific artifact. |  |
**page** | Option<**i32**> | Page number for pagination |  |[default to 1]
**per_page** | Option<**i32**> | Number of items per page |  |[default to 20]

### Return type

[**models::GetPromotionHistory200Response**](getPromotionHistory_200_response.md)

### Authorization

[apiKeyAuth](../README.md#apiKeyAuth), [bearerAuth](../README.md#bearerAuth)

### HTTP request headers

- **Content-Type**: Not defined
- **Accept**: application/json

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)


## get_repository

> models::Repository get_repository(key)
Get repository

Returns detailed information about a single repository identified by its unique key.

### Parameters


Name | Type | Description  | Required | Notes
------------- | ------------- | ------------- | ------------- | -------------
**key** | **String** | Repository key (unique identifier) | [required] |

### Return type

[**models::Repository**](Repository.md)

### Authorization

[apiKeyAuth](../README.md#apiKeyAuth), [bearerAuth](../README.md#bearerAuth)

### HTTP request headers

- **Content-Type**: Not defined
- **Accept**: application/json

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)


## get_repository_artifact

> models::Artifact get_repository_artifact(key, path)
Get artifact info by path

Returns metadata for a single artifact identified by its path within the repository. The path parameter is a catch-all that supports nested paths.

### Parameters


Name | Type | Description  | Required | Notes
------------- | ------------- | ------------- | ------------- | -------------
**key** | **String** | Repository key | [required] |
**path** | **String** | Artifact path within the repository (catch-all, e.g. org/example/lib/1.0/lib-1.0.jar) | [required] |

### Return type

[**models::Artifact**](Artifact.md)

### Authorization

[apiKeyAuth](../README.md#apiKeyAuth), [bearerAuth](../README.md#bearerAuth)

### HTTP request headers

- **Content-Type**: Not defined
- **Accept**: application/json

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)


## list_repositories

> models::ListRepositories200Response list_repositories(format, r#type, search, page, per_page)
List repositories

Returns a paginated list of repositories with optional filtering by package format, repository type, and search term.

### Parameters


Name | Type | Description  | Required | Notes
------------- | ------------- | ------------- | ------------- | -------------
**format** | Option<**String**> | Filter by package format (e.g. maven, npm, pypi, docker, generic). |  |
**r#type** | Option<**String**> | Filter by repository type. |  |
**search** | Option<**String**> | Search repositories by key or name. |  |
**page** | Option<**i32**> | Page number for pagination |  |[default to 1]
**per_page** | Option<**i32**> | Number of items per page |  |[default to 20]

### Return type

[**models::ListRepositories200Response**](listRepositories_200_response.md)

### Authorization

[apiKeyAuth](../README.md#apiKeyAuth), [bearerAuth](../README.md#bearerAuth)

### HTTP request headers

- **Content-Type**: Not defined
- **Accept**: application/json

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)


## list_repository_artifacts

> models::ListRepositoryArtifacts200Response list_repository_artifacts(key, path_prefix, search, page, per_page)
List artifacts in repository

Returns a paginated list of artifacts within the specified repository with optional path prefix filtering.

### Parameters


Name | Type | Description  | Required | Notes
------------- | ------------- | ------------- | ------------- | -------------
**key** | **String** | Repository key | [required] |
**path_prefix** | Option<**String**> | Filter artifacts whose path starts with this prefix. |  |
**search** | Option<**String**> | Search within artifact names and paths. |  |
**page** | Option<**i32**> | Page number for pagination |  |[default to 1]
**per_page** | Option<**i32**> | Number of items per page |  |[default to 20]

### Return type

[**models::ListRepositoryArtifacts200Response**](listRepositoryArtifacts_200_response.md)

### Authorization

[apiKeyAuth](../README.md#apiKeyAuth), [bearerAuth](../README.md#bearerAuth)

### HTTP request headers

- **Content-Type**: Not defined
- **Accept**: application/json

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)


## promote_artifact

> models::PromotionResponse promote_artifact(key, artifact_id, promote_artifact_request)
Promote single artifact

Promotes a single artifact from the source repository to a target repository. Runs promotion policies unless explicitly skipped.

### Parameters


Name | Type | Description  | Required | Notes
------------- | ------------- | ------------- | ------------- | -------------
**key** | **String** | Source repository key | [required] |
**artifact_id** | **uuid::Uuid** | Artifact identifier | [required] |
**promote_artifact_request** | [**PromoteArtifactRequest**](PromoteArtifactRequest.md) |  | [required] |

### Return type

[**models::PromotionResponse**](PromotionResponse.md)

### Authorization

[apiKeyAuth](../README.md#apiKeyAuth), [bearerAuth](../README.md#bearerAuth)

### HTTP request headers

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

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)


## update_repository

> models::Repository update_repository(key, update_repository_request)
Update repository

Partially updates repository metadata. Requires admin privileges.

### Parameters


Name | Type | Description  | Required | Notes
------------- | ------------- | ------------- | ------------- | -------------
**key** | **String** | Repository key | [required] |
**update_repository_request** | [**UpdateRepositoryRequest**](UpdateRepositoryRequest.md) |  | [required] |

### Return type

[**models::Repository**](Repository.md)

### Authorization

[apiKeyAuth](../README.md#apiKeyAuth), [bearerAuth](../README.md#bearerAuth)

### HTTP request headers

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

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)


## upload_artifact

> models::Artifact upload_artifact(key, path, body)
Upload artifact

Uploads a binary artifact to the specified path within the repository. If an artifact already exists at the path it will be overwritten, creating a new version.

### Parameters


Name | Type | Description  | Required | Notes
------------- | ------------- | ------------- | ------------- | -------------
**key** | **String** | Repository key | [required] |
**path** | **String** | Target path within the repository | [required] |
**body** | **Vec<u8>** |  | [required] |

### Return type

[**models::Artifact**](Artifact.md)

### Authorization

[apiKeyAuth](../README.md#apiKeyAuth), [bearerAuth](../README.md#bearerAuth)

### HTTP request headers

- **Content-Type**: application/octet-stream
- **Accept**: application/json

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

