# \LifecycleApi

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

Method | HTTP request | Description
------------- | ------------- | -------------
[**create_lifecycle_policy**](LifecycleApi.md#create_lifecycle_policy) | **POST** /api/v1/admin/lifecycle | Create a lifecycle policy
[**delete_lifecycle_policy**](LifecycleApi.md#delete_lifecycle_policy) | **DELETE** /api/v1/admin/lifecycle/{id} | Delete a lifecycle policy
[**execute_all_lifecycle_policies**](LifecycleApi.md#execute_all_lifecycle_policies) | **POST** /api/v1/admin/lifecycle/execute-all | Execute all enabled lifecycle policies
[**execute_lifecycle_policy**](LifecycleApi.md#execute_lifecycle_policy) | **POST** /api/v1/admin/lifecycle/{id}/execute | Execute a lifecycle policy
[**get_lifecycle_policy**](LifecycleApi.md#get_lifecycle_policy) | **GET** /api/v1/admin/lifecycle/{id} | Get a lifecycle policy
[**list_lifecycle_policies**](LifecycleApi.md#list_lifecycle_policies) | **GET** /api/v1/admin/lifecycle | List lifecycle policies
[**preview_lifecycle_policy**](LifecycleApi.md#preview_lifecycle_policy) | **POST** /api/v1/admin/lifecycle/{id}/preview | Preview a lifecycle policy
[**update_lifecycle_policy**](LifecycleApi.md#update_lifecycle_policy) | **PATCH** /api/v1/admin/lifecycle/{id} | Update a lifecycle policy



## create_lifecycle_policy

> models::LifecyclePolicy create_lifecycle_policy(create_lifecycle_policy_request)
Create a lifecycle policy

Create a new lifecycle policy for automated artifact retention and cleanup.

### Parameters


Name | Type | Description  | Required | Notes
------------- | ------------- | ------------- | ------------- | -------------
**create_lifecycle_policy_request** | [**CreateLifecyclePolicyRequest**](CreateLifecyclePolicyRequest.md) |  | [required] |

### Return type

[**models::LifecyclePolicy**](LifecyclePolicy.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_lifecycle_policy

> delete_lifecycle_policy(id)
Delete a lifecycle policy

Permanently remove a lifecycle policy. Running executions are not affected.

### Parameters


Name | Type | Description  | Required | Notes
------------- | ------------- | ------------- | ------------- | -------------
**id** | **uuid::Uuid** | Unique identifier of the lifecycle policy to delete. | [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)


## execute_all_lifecycle_policies

> Vec<models::PolicyExecutionResult> execute_all_lifecycle_policies()
Execute all enabled lifecycle policies

Trigger an immediate execution of every enabled lifecycle policy in priority order. Matched artifacts will be permanently removed.

### Parameters

This endpoint does not need any parameter.

### Return type

[**Vec<models::PolicyExecutionResult>**](PolicyExecutionResult.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)


## execute_lifecycle_policy

> models::PolicyExecutionResult execute_lifecycle_policy(id)
Execute a lifecycle policy

Trigger an immediate execution of the specified lifecycle policy. Matched artifacts will be permanently removed.

### Parameters


Name | Type | Description  | Required | Notes
------------- | ------------- | ------------- | ------------- | -------------
**id** | **uuid::Uuid** | Unique identifier of the lifecycle policy to execute. | [required] |

### Return type

[**models::PolicyExecutionResult**](PolicyExecutionResult.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_lifecycle_policy

> models::LifecyclePolicy get_lifecycle_policy(id)
Get a lifecycle policy

Retrieve a single lifecycle policy by its unique identifier.

### Parameters


Name | Type | Description  | Required | Notes
------------- | ------------- | ------------- | ------------- | -------------
**id** | **uuid::Uuid** | Unique identifier of the lifecycle policy. | [required] |

### Return type

[**models::LifecyclePolicy**](LifecyclePolicy.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_lifecycle_policies

> Vec<models::LifecyclePolicy> list_lifecycle_policies(repository_id)
List lifecycle policies

Retrieve all lifecycle policies, optionally filtered by repository.

### Parameters


Name | Type | Description  | Required | Notes
------------- | ------------- | ------------- | ------------- | -------------
**repository_id** | Option<**uuid::Uuid**> | Filter policies by repository identifier. |  |

### Return type

[**Vec<models::LifecyclePolicy>**](LifecyclePolicy.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)


## preview_lifecycle_policy

> models::PolicyExecutionResult preview_lifecycle_policy(id)
Preview a lifecycle policy

Perform a dry-run execution of the specified lifecycle policy. No artifacts are modified or removed.

### Parameters


Name | Type | Description  | Required | Notes
------------- | ------------- | ------------- | ------------- | -------------
**id** | **uuid::Uuid** | Unique identifier of the lifecycle policy to preview. | [required] |

### Return type

[**models::PolicyExecutionResult**](PolicyExecutionResult.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)


## update_lifecycle_policy

> models::LifecyclePolicy update_lifecycle_policy(id, update_lifecycle_policy_request)
Update a lifecycle policy

Partially update an existing lifecycle policy. Only provided fields are modified.

### Parameters


Name | Type | Description  | Required | Notes
------------- | ------------- | ------------- | ------------- | -------------
**id** | **uuid::Uuid** | Unique identifier of the lifecycle policy to update. | [required] |
**update_lifecycle_policy_request** | [**UpdateLifecyclePolicyRequest**](UpdateLifecyclePolicyRequest.md) |  | [required] |

### Return type

[**models::LifecyclePolicy**](LifecyclePolicy.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)

