# \BuildsApi

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

Method | HTTP request | Description
------------- | ------------- | -------------
[**add_build_artifacts**](BuildsApi.md#add_build_artifacts) | **POST** /api/v1/builds/{id}/artifacts | Attach artifacts to a build (POST /api/v1/builds/:id/artifacts)
[**create_build**](BuildsApi.md#create_build) | **POST** /api/v1/builds | Create a new build (POST /api/v1/builds)
[**get_build**](BuildsApi.md#get_build) | **GET** /api/v1/builds/{id} | Get a build by ID
[**get_build_diff**](BuildsApi.md#get_build_diff) | **GET** /api/v1/builds/diff | Get diff between two builds
[**list_builds**](BuildsApi.md#list_builds) | **GET** /api/v1/builds | List builds
[**update_build**](BuildsApi.md#update_build) | **PUT** /api/v1/builds/{id} | Update build status (PUT /api/v1/builds/:id)



## add_build_artifacts

> models::AddBuildArtifactsResponse add_build_artifacts(id, add_build_artifacts_request)
Attach artifacts to a build (POST /api/v1/builds/:id/artifacts)

### Parameters


Name | Type | Description  | Required | Notes
------------- | ------------- | ------------- | ------------- | -------------
**id** | **uuid::Uuid** | Build ID | [required] |
**add_build_artifacts_request** | [**AddBuildArtifactsRequest**](AddBuildArtifactsRequest.md) |  | [required] |

### Return type

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


## create_build

> models::BuildResponse create_build(create_build_request)
Create a new build (POST /api/v1/builds)

### Parameters


Name | Type | Description  | Required | Notes
------------- | ------------- | ------------- | ------------- | -------------
**create_build_request** | [**CreateBuildRequest**](CreateBuildRequest.md) |  | [required] |

### Return type

[**models::BuildResponse**](BuildResponse.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_build

> models::BuildResponse get_build(id)
Get a build by ID

### Parameters


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

### Return type

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

### Authorization

No authorization required

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

> models::BuildDiffResponse get_build_diff(build_a, build_b)
Get diff between two builds

### Parameters


Name | Type | Description  | Required | Notes
------------- | ------------- | ------------- | ------------- | -------------
**build_a** | **uuid::Uuid** |  | [required] |
**build_b** | **uuid::Uuid** |  | [required] |

### Return type

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

### Authorization

No authorization required

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

> models::BuildListResponse list_builds(page, per_page, status, search, sort_by, sort_order)
List builds

### Parameters


Name | Type | Description  | Required | Notes
------------- | ------------- | ------------- | ------------- | -------------
**page** | Option<**i32**> |  |  |
**per_page** | Option<**i32**> |  |  |
**status** | Option<**String**> |  |  |
**search** | Option<**String**> |  |  |
**sort_by** | Option<**String**> |  |  |
**sort_order** | Option<**String**> |  |  |

### Return type

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

### Authorization

No authorization required

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

> models::BuildResponse update_build(id, update_build_request)
Update build status (PUT /api/v1/builds/:id)

### Parameters


Name | Type | Description  | Required | Notes
------------- | ------------- | ------------- | ------------- | -------------
**id** | **uuid::Uuid** | Build ID | [required] |
**update_build_request** | [**UpdateBuildRequest**](UpdateBuildRequest.md) |  | [required] |

### Return type

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

