# \ApprovalApi

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

Method | HTTP request | Description
------------- | ------------- | -------------
[**approve_promotion**](ApprovalApi.md#approve_promotion) | **POST** /api/v1/approval/{id}/approve | Approve a pending promotion request. Admin-only.
[**get_approval**](ApprovalApi.md#get_approval) | **GET** /api/v1/approval/{id} | Get a single approval request by ID.
[**list_approval_history**](ApprovalApi.md#list_approval_history) | **GET** /api/v1/approval/history | List approval history with optional filtering by status or source repository.
[**list_pending_approvals**](ApprovalApi.md#list_pending_approvals) | **GET** /api/v1/approval/pending | List pending approval requests. Optionally filter by source repository.
[**reject_promotion**](ApprovalApi.md#reject_promotion) | **POST** /api/v1/approval/{id}/reject | Reject a pending promotion request. Admin-only.
[**request_approval**](ApprovalApi.md#request_approval) | **POST** /api/v1/approval/request | Request approval for promoting an artifact from staging to release.



## approve_promotion

> models::ApprovalResponse approve_promotion(id, review_request)
Approve a pending promotion request. Admin-only.

This copies the artifact from the staging repo to the release repo, inserts the new artifact record, records promotion history, and updates the approval status to \"approved\".

### Parameters


Name | Type | Description  | Required | Notes
------------- | ------------- | ------------- | ------------- | -------------
**id** | **uuid::Uuid** | Approval request ID | [required] |
**review_request** | [**ReviewRequest**](ReviewRequest.md) |  | [required] |

### Return type

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


## get_approval

> models::ApprovalResponse get_approval(id)
Get a single approval request by ID.

### Parameters


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

### Return type

[**models::ApprovalResponse**](ApprovalResponse.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_approval_history

> models::ApprovalListResponse list_approval_history(page, per_page, status, source_repository)
List approval history with optional filtering by status or source repository.

### Parameters


Name | Type | Description  | Required | Notes
------------- | ------------- | ------------- | ------------- | -------------
**page** | Option<**i32**> | Page number (1-indexed) |  |
**per_page** | Option<**i32**> | Items per page (max 100) |  |
**status** | Option<**String**> | Filter by status (pending, approved, rejected) |  |
**source_repository** | Option<**String**> | Filter by source repository key |  |

### Return type

[**models::ApprovalListResponse**](ApprovalListResponse.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_pending_approvals

> models::ApprovalListResponse list_pending_approvals(page, per_page, source_repository)
List pending approval requests. Optionally filter by source repository.

### Parameters


Name | Type | Description  | Required | Notes
------------- | ------------- | ------------- | ------------- | -------------
**page** | Option<**i32**> | Page number (1-indexed) |  |
**per_page** | Option<**i32**> | Items per page (max 100) |  |
**source_repository** | Option<**String**> | Filter by source repository key |  |

### Return type

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


## reject_promotion

> models::ApprovalResponse reject_promotion(id, review_request)
Reject a pending promotion request. Admin-only.

### Parameters


Name | Type | Description  | Required | Notes
------------- | ------------- | ------------- | ------------- | -------------
**id** | **uuid::Uuid** | Approval request ID | [required] |
**review_request** | [**ReviewRequest**](ReviewRequest.md) |  | [required] |

### Return type

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


## request_approval

> models::ApprovalResponse request_approval(approval_request)
Request approval for promoting an artifact from staging to release.

### Parameters


Name | Type | Description  | Required | Notes
------------- | ------------- | ------------- | ------------- | -------------
**approval_request** | [**ApprovalRequest**](ApprovalRequest.md) |  | [required] |

### Return type

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

