# \PromotionApi

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

Method | HTTP request | Description
------------- | ------------- | -------------
[**create_rule**](PromotionApi.md#create_rule) | **POST** /api/v1/promotion-rules | Create a promotion rule
[**delete_rule**](PromotionApi.md#delete_rule) | **DELETE** /api/v1/promotion-rules/{id} | Delete a promotion rule
[**evaluate_rule**](PromotionApi.md#evaluate_rule) | **POST** /api/v1/promotion-rules/{id}/evaluate | Dry-run evaluate a rule against all artifacts in its source repository
[**get_rule**](PromotionApi.md#get_rule) | **GET** /api/v1/promotion-rules/{id} | Get a promotion rule by ID
[**list_rules**](PromotionApi.md#list_rules) | **GET** /api/v1/promotion-rules | List all promotion rules
[**promote_artifact**](PromotionApi.md#promote_artifact) | **POST** /api/v1/promotion/repositories/{key}/artifacts/{artifact_id}/promote | 
[**promote_artifacts_bulk**](PromotionApi.md#promote_artifacts_bulk) | **POST** /api/v1/promotion/repositories/{key}/promote | 
[**promotion_history**](PromotionApi.md#promotion_history) | **GET** /api/v1/promotion/repositories/{key}/promotion-history | 
[**reject_artifact**](PromotionApi.md#reject_artifact) | **POST** /api/v1/promotion/repositories/{key}/artifacts/{artifact_id}/reject | 
[**update_rule**](PromotionApi.md#update_rule) | **PUT** /api/v1/promotion-rules/{id} | Update a promotion rule



## create_rule

> models::PromotionRuleResponse create_rule(create_rule_request)
Create a promotion rule

### Parameters


Name | Type | Description  | Required | Notes
------------- | ------------- | ------------- | ------------- | -------------
**create_rule_request** | [**CreateRuleRequest**](CreateRuleRequest.md) |  | [required] |

### Return type

[**models::PromotionRuleResponse**](PromotionRuleResponse.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_rule

> delete_rule(id)
Delete a promotion rule

### Parameters


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

### Return type

 (empty response body)

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


## evaluate_rule

> models::BulkEvaluationResponse evaluate_rule(id)
Dry-run evaluate a rule against all artifacts in its source repository

### Parameters


Name | Type | Description  | Required | Notes
------------- | ------------- | ------------- | ------------- | -------------
**id** | **uuid::Uuid** | Promotion rule ID to evaluate | [required] |

### Return type

[**models::BulkEvaluationResponse**](BulkEvaluationResponse.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_rule

> models::PromotionRuleResponse get_rule(id)
Get a promotion rule by ID

### Parameters


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

### Return type

[**models::PromotionRuleResponse**](PromotionRuleResponse.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_rules

> models::PromotionRuleListResponse list_rules(source_repo_id)
List all promotion rules

### Parameters


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

### Return type

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


## promote_artifact

> models::PromotionResponse promote_artifact(key, artifact_id, promote_artifact_request)


### Parameters


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

### Return type

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


## promote_artifacts_bulk

> models::BulkPromotionResponse promote_artifacts_bulk(key, bulk_promote_request)


### Parameters


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

### Return type

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


## promotion_history

> models::PromotionHistoryResponse promotion_history(key, page, per_page, artifact_id, status)


### Parameters


Name | Type | Description  | Required | Notes
------------- | ------------- | ------------- | ------------- | -------------
**key** | **String** | Repository key | [required] |
**page** | Option<**i32**> | Page number (1-indexed) |  |
**per_page** | Option<**i32**> | Items per page (max 100) |  |
**artifact_id** | Option<**uuid::Uuid**> | Filter by artifact ID |  |
**status** | Option<**String**> | Filter by status (promoted, rejected, pending_approval) |  |

### Return type

[**models::PromotionHistoryResponse**](PromotionHistoryResponse.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_artifact

> models::RejectionResponse reject_artifact(key, artifact_id, reject_artifact_request)


### Parameters


Name | Type | Description  | Required | Notes
------------- | ------------- | ------------- | ------------- | -------------
**key** | **String** | Source repository key | [required] |
**artifact_id** | **uuid::Uuid** | Artifact ID to reject | [required] |
**reject_artifact_request** | [**RejectArtifactRequest**](RejectArtifactRequest.md) |  | [required] |

### Return type

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


## update_rule

> models::PromotionRuleResponse update_rule(id, update_rule_request)
Update a promotion rule

### Parameters


Name | Type | Description  | Required | Notes
------------- | ------------- | ------------- | ------------- | -------------
**id** | **uuid::Uuid** | Promotion rule ID | [required] |
**update_rule_request** | [**UpdateRuleRequest**](UpdateRuleRequest.md) |  | [required] |

### Return type

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

