# \LifecycleApi

All URIs are relative to *http://localhost*

Method | HTTP request | Description
------------- | ------------- | -------------
[**create_lifecycle_policy**](LifecycleApi.md#create_lifecycle_policy) | **POST** /api/v1/admin/lifecycle | POST /api/v1/admin/lifecycle
[**delete_lifecycle_policy**](LifecycleApi.md#delete_lifecycle_policy) | **DELETE** /api/v1/admin/lifecycle/{id} | DELETE /api/v1/admin/lifecycle/:id
[**execute_all_policies**](LifecycleApi.md#execute_all_policies) | **POST** /api/v1/admin/lifecycle/execute-all | POST /api/v1/admin/lifecycle/execute-all
[**execute_policy**](LifecycleApi.md#execute_policy) | **POST** /api/v1/admin/lifecycle/{id}/execute | POST /api/v1/admin/lifecycle/:id/execute
[**get_lifecycle_policy**](LifecycleApi.md#get_lifecycle_policy) | **GET** /api/v1/admin/lifecycle/{id} | GET /api/v1/admin/lifecycle/:id
[**list_lifecycle_policies**](LifecycleApi.md#list_lifecycle_policies) | **GET** /api/v1/admin/lifecycle | GET /api/v1/admin/lifecycle
[**preview_policy**](LifecycleApi.md#preview_policy) | **POST** /api/v1/admin/lifecycle/{id}/preview | POST /api/v1/admin/lifecycle/:id/preview - dry-run
[**update_lifecycle_policy**](LifecycleApi.md#update_lifecycle_policy) | **PATCH** /api/v1/admin/lifecycle/{id} | PATCH /api/v1/admin/lifecycle/:id



## create_lifecycle_policy

> models::LifecyclePolicy create_lifecycle_policy(create_policy_request)
POST /api/v1/admin/lifecycle

### Parameters


Name | Type | Description  | Required | Notes
------------- | ------------- | ------------- | ------------- | -------------
**create_policy_request** | [**CreatePolicyRequest**](CreatePolicyRequest.md) |  | [required] |

### Return type

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

### Authorization

[bearer_auth](../README.md#bearer_auth)

### 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 /api/v1/admin/lifecycle/:id

### Parameters


Name | Type | Description  | Required | Notes
------------- | ------------- | ------------- | ------------- | -------------
**id** | **uuid::Uuid** | Policy ID | [required] |

### Return type

 (empty response body)

### Authorization

[bearer_auth](../README.md#bearer_auth)

### HTTP request headers

- **Content-Type**: Not defined
- **Accept**: Not defined

[[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_policies

> Vec<models::PolicyExecutionResult> execute_all_policies()
POST /api/v1/admin/lifecycle/execute-all

### Parameters

This endpoint does not need any parameter.

### Return type

[**Vec<models::PolicyExecutionResult>**](PolicyExecutionResult.md)

### Authorization

[bearer_auth](../README.md#bearer_auth)

### 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_policy

> models::PolicyExecutionResult execute_policy(id)
POST /api/v1/admin/lifecycle/:id/execute

### Parameters


Name | Type | Description  | Required | Notes
------------- | ------------- | ------------- | ------------- | -------------
**id** | **uuid::Uuid** | Policy ID | [required] |

### Return type

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

### Authorization

[bearer_auth](../README.md#bearer_auth)

### 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 /api/v1/admin/lifecycle/:id

### Parameters


Name | Type | Description  | Required | Notes
------------- | ------------- | ------------- | ------------- | -------------
**id** | **uuid::Uuid** | Policy ID | [required] |

### Return type

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

### Authorization

[bearer_auth](../README.md#bearer_auth)

### 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)
GET /api/v1/admin/lifecycle

### Parameters


Name | Type | Description  | Required | Notes
------------- | ------------- | ------------- | ------------- | -------------
**repository_id** | Option<**uuid::Uuid**> |  |  |

### Return type

[**Vec<models::LifecyclePolicy>**](LifecyclePolicy.md)

### Authorization

[bearer_auth](../README.md#bearer_auth)

### 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_policy

> models::PolicyExecutionResult preview_policy(id)
POST /api/v1/admin/lifecycle/:id/preview - dry-run

### Parameters


Name | Type | Description  | Required | Notes
------------- | ------------- | ------------- | ------------- | -------------
**id** | **uuid::Uuid** | Policy ID | [required] |

### Return type

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

### Authorization

[bearer_auth](../README.md#bearer_auth)

### 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_policy_request)
PATCH /api/v1/admin/lifecycle/:id

### Parameters


Name | Type | Description  | Required | Notes
------------- | ------------- | ------------- | ------------- | -------------
**id** | **uuid::Uuid** | Policy ID | [required] |
**update_policy_request** | [**UpdatePolicyRequest**](UpdatePolicyRequest.md) |  | [required] |

### Return type

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

### Authorization

[bearer_auth](../README.md#bearer_auth)

### 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)

