# AlertManagementApi

All URIs are relative to *https://www.gitlab.com/api/v4*

|Method | HTTP request | Description|
|------------- | ------------- | -------------|
|[**deleteApiV4ProjectsIdAlertManagementAlertsAlertIidMetricImagesMetricImageId**](#deleteapiv4projectsidalertmanagementalertsalertiidmetricimagesmetricimageid) | **DELETE** /projects/{id}/alert_management_alerts/{alert_iid}/metric_images/{metric_image_id} | |
|[**getApiV4ProjectsIdAlertManagementAlertsAlertIidMetricImages**](#getapiv4projectsidalertmanagementalertsalertiidmetricimages) | **GET** /projects/{id}/alert_management_alerts/{alert_iid}/metric_images | |
|[**postApiV4ProjectsIdAlertManagementAlertsAlertIidMetricImages**](#postapiv4projectsidalertmanagementalertsalertiidmetricimages) | **POST** /projects/{id}/alert_management_alerts/{alert_iid}/metric_images | |
|[**postApiV4ProjectsIdAlertManagementAlertsAlertIidMetricImagesAuthorize**](#postapiv4projectsidalertmanagementalertsalertiidmetricimagesauthorize) | **POST** /projects/{id}/alert_management_alerts/{alert_iid}/metric_images/authorize | |
|[**putApiV4ProjectsIdAlertManagementAlertsAlertIidMetricImagesMetricImageId**](#putapiv4projectsidalertmanagementalertsalertiidmetricimagesmetricimageid) | **PUT** /projects/{id}/alert_management_alerts/{alert_iid}/metric_images/{metric_image_id} | |

# **deleteApiV4ProjectsIdAlertManagementAlertsAlertIidMetricImagesMetricImageId**
> APIEntitiesMetricImage deleteApiV4ProjectsIdAlertManagementAlertsAlertIidMetricImagesMetricImageId()

Remove a metric image for an alert

### Example

```typescript
import {
    AlertManagementApi,
    Configuration,
    DeleteApiV4ProjectsIdRepositoryMergedBranchesIdParameter
} from 'berg';

const configuration = new Configuration();
const apiInstance = new AlertManagementApi(configuration);

let id: DeleteApiV4ProjectsIdRepositoryMergedBranchesIdParameter; //The ID or [URL-encoded path of the project](https://docs.gitlab.com/api/rest/#namespaced-paths). (default to undefined)
let alertIid: number; //The IID of the Alert (default to undefined)
let metricImageId: number; //The ID of metric image (default to undefined)

const { status, data } = await apiInstance.deleteApiV4ProjectsIdAlertManagementAlertsAlertIidMetricImagesMetricImageId(
    id,
    alertIid,
    metricImageId
);
```

### Parameters

|Name | Type | Description  | Notes|
|------------- | ------------- | ------------- | -------------|
| **id** | **DeleteApiV4ProjectsIdRepositoryMergedBranchesIdParameter** | The ID or [URL-encoded path of the project](https://docs.gitlab.com/api/rest/#namespaced-paths). | defaults to undefined|
| **alertIid** | [**number**] | The IID of the Alert | defaults to undefined|
| **metricImageId** | [**number**] | The ID of metric image | defaults to undefined|


### Return type

**APIEntitiesMetricImage**

### Authorization

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

### HTTP request headers

 - **Content-Type**: Not defined
 - **Accept**: application/json


### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
|**204** | Remove a metric image for an alert |  -  |
|**403** | Forbidden |  -  |
|**422** | Unprocessable entity |  -  |

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

# **getApiV4ProjectsIdAlertManagementAlertsAlertIidMetricImages**
> Array<APIEntitiesMetricImage> getApiV4ProjectsIdAlertManagementAlertsAlertIidMetricImages()

Metric Images for alert

### Example

```typescript
import {
    AlertManagementApi,
    Configuration,
    DeleteApiV4ProjectsIdRepositoryMergedBranchesIdParameter
} from 'berg';

const configuration = new Configuration();
const apiInstance = new AlertManagementApi(configuration);

let id: DeleteApiV4ProjectsIdRepositoryMergedBranchesIdParameter; //The ID or [URL-encoded path of the project](https://docs.gitlab.com/api/rest/#namespaced-paths). (default to undefined)
let alertIid: number; //The IID of the Alert (default to undefined)

const { status, data } = await apiInstance.getApiV4ProjectsIdAlertManagementAlertsAlertIidMetricImages(
    id,
    alertIid
);
```

### Parameters

|Name | Type | Description  | Notes|
|------------- | ------------- | ------------- | -------------|
| **id** | **DeleteApiV4ProjectsIdRepositoryMergedBranchesIdParameter** | The ID or [URL-encoded path of the project](https://docs.gitlab.com/api/rest/#namespaced-paths). | defaults to undefined|
| **alertIid** | [**number**] | The IID of the Alert | defaults to undefined|


### Return type

**Array<APIEntitiesMetricImage>**

### Authorization

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

### HTTP request headers

 - **Content-Type**: Not defined
 - **Accept**: application/json


### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
|**200** | Metric Images for alert |  -  |
|**404** | Not found |  -  |

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

# **postApiV4ProjectsIdAlertManagementAlertsAlertIidMetricImages**
> APIEntitiesMetricImage postApiV4ProjectsIdAlertManagementAlertsAlertIidMetricImages()

Upload a metric image for an alert

### Example

```typescript
import {
    AlertManagementApi,
    Configuration,
    DeleteApiV4ProjectsIdRepositoryMergedBranchesIdParameter
} from 'berg';

const configuration = new Configuration();
const apiInstance = new AlertManagementApi(configuration);

let id: DeleteApiV4ProjectsIdRepositoryMergedBranchesIdParameter; //The ID or [URL-encoded path of the project](https://docs.gitlab.com/api/rest/#namespaced-paths). (default to undefined)
let alertIid: number; //The IID of the Alert (default to undefined)
let file: File; //The image file to be uploaded (default to undefined)
let url: string; //The url to view more metric info (optional) (default to undefined)
let urlText: string; //A description of the image or URL (optional) (default to undefined)

const { status, data } = await apiInstance.postApiV4ProjectsIdAlertManagementAlertsAlertIidMetricImages(
    id,
    alertIid,
    file,
    url,
    urlText
);
```

### Parameters

|Name | Type | Description  | Notes|
|------------- | ------------- | ------------- | -------------|
| **id** | **DeleteApiV4ProjectsIdRepositoryMergedBranchesIdParameter** | The ID or [URL-encoded path of the project](https://docs.gitlab.com/api/rest/#namespaced-paths). | defaults to undefined|
| **alertIid** | [**number**] | The IID of the Alert | defaults to undefined|
| **file** | [**File**] | The image file to be uploaded | defaults to undefined|
| **url** | [**string**] | The url to view more metric info | (optional) defaults to undefined|
| **urlText** | [**string**] | A description of the image or URL | (optional) defaults to undefined|


### Return type

**APIEntitiesMetricImage**

### Authorization

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

### HTTP request headers

 - **Content-Type**: multipart/form-data
 - **Accept**: application/json


### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
|**200** | Upload a metric image for an alert |  -  |
|**403** | Forbidden |  -  |

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

# **postApiV4ProjectsIdAlertManagementAlertsAlertIidMetricImagesAuthorize**
> postApiV4ProjectsIdAlertManagementAlertsAlertIidMetricImagesAuthorize()

Workhorse authorize metric image file upload

### Example

```typescript
import {
    AlertManagementApi,
    Configuration,
    DeleteApiV4ProjectsIdRepositoryMergedBranchesIdParameter
} from 'berg';

const configuration = new Configuration();
const apiInstance = new AlertManagementApi(configuration);

let id: DeleteApiV4ProjectsIdRepositoryMergedBranchesIdParameter; //The ID or [URL-encoded path of the project](https://docs.gitlab.com/api/rest/#namespaced-paths). (default to undefined)
let alertIid: number; //The IID of the Alert (default to undefined)

const { status, data } = await apiInstance.postApiV4ProjectsIdAlertManagementAlertsAlertIidMetricImagesAuthorize(
    id,
    alertIid
);
```

### Parameters

|Name | Type | Description  | Notes|
|------------- | ------------- | ------------- | -------------|
| **id** | **DeleteApiV4ProjectsIdRepositoryMergedBranchesIdParameter** | The ID or [URL-encoded path of the project](https://docs.gitlab.com/api/rest/#namespaced-paths). | defaults to undefined|
| **alertIid** | [**number**] | The IID of the Alert | defaults to undefined|


### Return type

void (empty response body)

### Authorization

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

### HTTP request headers

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


### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
|**200** | Workhorse authorize metric image file upload |  -  |
|**403** | Forbidden |  -  |

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

# **putApiV4ProjectsIdAlertManagementAlertsAlertIidMetricImagesMetricImageId**
> APIEntitiesMetricImage putApiV4ProjectsIdAlertManagementAlertsAlertIidMetricImagesMetricImageId()

Update a metric image for an alert

### Example

```typescript
import {
    AlertManagementApi,
    Configuration,
    DeleteApiV4ProjectsIdRepositoryMergedBranchesIdParameter
} from 'berg';

const configuration = new Configuration();
const apiInstance = new AlertManagementApi(configuration);

let id: DeleteApiV4ProjectsIdRepositoryMergedBranchesIdParameter; //The ID or [URL-encoded path of the project](https://docs.gitlab.com/api/rest/#namespaced-paths). (default to undefined)
let alertIid: number; //The IID of the Alert (default to undefined)
let metricImageId: number; //The ID of metric image (default to undefined)
let url: string; //The url to view more metric info (optional) (default to undefined)
let urlText: string; //A description of the image or URL (optional) (default to undefined)

const { status, data } = await apiInstance.putApiV4ProjectsIdAlertManagementAlertsAlertIidMetricImagesMetricImageId(
    id,
    alertIid,
    metricImageId,
    url,
    urlText
);
```

### Parameters

|Name | Type | Description  | Notes|
|------------- | ------------- | ------------- | -------------|
| **id** | **DeleteApiV4ProjectsIdRepositoryMergedBranchesIdParameter** | The ID or [URL-encoded path of the project](https://docs.gitlab.com/api/rest/#namespaced-paths). | defaults to undefined|
| **alertIid** | [**number**] | The IID of the Alert | defaults to undefined|
| **metricImageId** | [**number**] | The ID of metric image | defaults to undefined|
| **url** | [**string**] | The url to view more metric info | (optional) defaults to undefined|
| **urlText** | [**string**] | A description of the image or URL | (optional) defaults to undefined|


### Return type

**APIEntitiesMetricImage**

### Authorization

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

### HTTP request headers

 - **Content-Type**: multipart/form-data
 - **Accept**: application/json


### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
|**200** | Update a metric image for an alert |  -  |
|**403** | Forbidden |  -  |
|**422** | Unprocessable entity |  -  |

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

