# BadgesApi

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

|Method | HTTP request | Description|
|------------- | ------------- | -------------|
|[**deleteApiV4GroupsIdBadgesBadgeId**](#deleteapiv4groupsidbadgesbadgeid) | **DELETE** /groups/{id}/badges/{badge_id} | Removes a badge from the group.|
|[**deleteApiV4ProjectsIdBadgesBadgeId**](#deleteapiv4projectsidbadgesbadgeid) | **DELETE** /projects/{id}/badges/{badge_id} | Removes a badge from the project.|
|[**getApiV4GroupsIdBadges**](#getapiv4groupsidbadges) | **GET** /groups/{id}/badges | Gets a list of group badges viewable by the authenticated user.|
|[**getApiV4GroupsIdBadgesBadgeId**](#getapiv4groupsidbadgesbadgeid) | **GET** /groups/{id}/badges/{badge_id} | Gets a badge of a group.|
|[**getApiV4GroupsIdBadgesRender**](#getapiv4groupsidbadgesrender) | **GET** /groups/{id}/badges/render | Preview a badge from a group.|
|[**getApiV4ProjectsIdBadges**](#getapiv4projectsidbadges) | **GET** /projects/{id}/badges | Gets a list of project badges viewable by the authenticated user.|
|[**getApiV4ProjectsIdBadgesBadgeId**](#getapiv4projectsidbadgesbadgeid) | **GET** /projects/{id}/badges/{badge_id} | Gets a badge of a project.|
|[**getApiV4ProjectsIdBadgesRender**](#getapiv4projectsidbadgesrender) | **GET** /projects/{id}/badges/render | Preview a badge from a project.|
|[**postApiV4GroupsIdBadges**](#postapiv4groupsidbadges) | **POST** /groups/{id}/badges | Adds a badge to a group.|
|[**postApiV4ProjectsIdBadges**](#postapiv4projectsidbadges) | **POST** /projects/{id}/badges | Adds a badge to a project.|
|[**putApiV4GroupsIdBadgesBadgeId**](#putapiv4groupsidbadgesbadgeid) | **PUT** /groups/{id}/badges/{badge_id} | Updates a badge of a group.|
|[**putApiV4ProjectsIdBadgesBadgeId**](#putapiv4projectsidbadgesbadgeid) | **PUT** /projects/{id}/badges/{badge_id} | Updates a badge of a project.|

# **deleteApiV4GroupsIdBadgesBadgeId**
> deleteApiV4GroupsIdBadgesBadgeId()

This feature was introduced in GitLab 10.6.

### Example

```typescript
import {
    BadgesApi,
    Configuration
} from 'berg';

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

let id: string; //The ID or URL-encoded path of the group owned by the authenticated user. (default to undefined)
let badgeId: number; //The badge ID (default to undefined)

const { status, data } = await apiInstance.deleteApiV4GroupsIdBadgesBadgeId(
    id,
    badgeId
);
```

### Parameters

|Name | Type | Description  | Notes|
|------------- | ------------- | ------------- | -------------|
| **id** | [**string**] | The ID or URL-encoded path of the group owned by the authenticated user. | defaults to undefined|
| **badgeId** | [**number**] | The badge ID | 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 |
|-------------|-------------|------------------|
|**204** | Removes a badge from the group. |  -  |

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

# **deleteApiV4ProjectsIdBadgesBadgeId**
> deleteApiV4ProjectsIdBadgesBadgeId()

This feature was introduced in GitLab 10.6.

### Example

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

const configuration = new Configuration();
const apiInstance = new BadgesApi(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 badgeId: number; //The badge ID (default to undefined)

const { status, data } = await apiInstance.deleteApiV4ProjectsIdBadgesBadgeId(
    id,
    badgeId
);
```

### 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|
| **badgeId** | [**number**] | The badge ID | 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 |
|-------------|-------------|------------------|
|**204** | Removes a badge from the project. |  -  |

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

# **getApiV4GroupsIdBadges**
> Array<APIEntitiesBadge> getApiV4GroupsIdBadges()

This feature was introduced in GitLab 10.6.

### Example

```typescript
import {
    BadgesApi,
    Configuration
} from 'berg';

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

let id: string; //The ID or URL-encoded path of the group owned by the authenticated user. (default to undefined)
let page: number; //Current page number (optional) (default to 1)
let perPage: number; //Number of items per page (optional) (default to 20)
let name: string; //Name for the badge (optional) (default to undefined)

const { status, data } = await apiInstance.getApiV4GroupsIdBadges(
    id,
    page,
    perPage,
    name
);
```

### Parameters

|Name | Type | Description  | Notes|
|------------- | ------------- | ------------- | -------------|
| **id** | [**string**] | The ID or URL-encoded path of the group owned by the authenticated user. | defaults to undefined|
| **page** | [**number**] | Current page number | (optional) defaults to 1|
| **perPage** | [**number**] | Number of items per page | (optional) defaults to 20|
| **name** | [**string**] | Name for the badge | (optional) defaults to undefined|


### Return type

**Array<APIEntitiesBadge>**

### Authorization

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

### HTTP request headers

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


### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
|**200** | Gets a list of group badges viewable by the authenticated user. |  -  |

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

# **getApiV4GroupsIdBadgesBadgeId**
> APIEntitiesBadge getApiV4GroupsIdBadgesBadgeId()

This feature was introduced in GitLab 10.6.

### Example

```typescript
import {
    BadgesApi,
    Configuration
} from 'berg';

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

let id: string; //The ID or URL-encoded path of the group owned by the authenticated user. (default to undefined)
let badgeId: number; //The badge ID (default to undefined)

const { status, data } = await apiInstance.getApiV4GroupsIdBadgesBadgeId(
    id,
    badgeId
);
```

### Parameters

|Name | Type | Description  | Notes|
|------------- | ------------- | ------------- | -------------|
| **id** | [**string**] | The ID or URL-encoded path of the group owned by the authenticated user. | defaults to undefined|
| **badgeId** | [**number**] | The badge ID | defaults to undefined|


### Return type

**APIEntitiesBadge**

### Authorization

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

### HTTP request headers

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


### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
|**200** | Gets a badge of a group. |  -  |

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

# **getApiV4GroupsIdBadgesRender**
> APIEntitiesBasicBadgeDetails getApiV4GroupsIdBadgesRender()

This feature was introduced in GitLab 10.6.

### Example

```typescript
import {
    BadgesApi,
    Configuration
} from 'berg';

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

let id: string; //The ID or URL-encoded path of the group owned by the authenticated user. (default to undefined)
let linkUrl: string; //URL of the badge link (default to undefined)
let imageUrl: string; //URL of the badge image (default to undefined)

const { status, data } = await apiInstance.getApiV4GroupsIdBadgesRender(
    id,
    linkUrl,
    imageUrl
);
```

### Parameters

|Name | Type | Description  | Notes|
|------------- | ------------- | ------------- | -------------|
| **id** | [**string**] | The ID or URL-encoded path of the group owned by the authenticated user. | defaults to undefined|
| **linkUrl** | [**string**] | URL of the badge link | defaults to undefined|
| **imageUrl** | [**string**] | URL of the badge image | defaults to undefined|


### Return type

**APIEntitiesBasicBadgeDetails**

### Authorization

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

### HTTP request headers

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


### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
|**200** | Preview a badge from a group. |  -  |

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

# **getApiV4ProjectsIdBadges**
> Array<APIEntitiesBadge> getApiV4ProjectsIdBadges()

This feature was introduced in GitLab 10.6.

### Example

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

const configuration = new Configuration();
const apiInstance = new BadgesApi(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 page: number; //Current page number (optional) (default to 1)
let perPage: number; //Number of items per page (optional) (default to 20)
let name: string; //Name for the badge (optional) (default to undefined)

const { status, data } = await apiInstance.getApiV4ProjectsIdBadges(
    id,
    page,
    perPage,
    name
);
```

### 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|
| **page** | [**number**] | Current page number | (optional) defaults to 1|
| **perPage** | [**number**] | Number of items per page | (optional) defaults to 20|
| **name** | [**string**] | Name for the badge | (optional) defaults to undefined|


### Return type

**Array<APIEntitiesBadge>**

### Authorization

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

### HTTP request headers

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


### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
|**200** | Gets a list of project badges viewable by the authenticated user. |  -  |

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

# **getApiV4ProjectsIdBadgesBadgeId**
> APIEntitiesBadge getApiV4ProjectsIdBadgesBadgeId()

This feature was introduced in GitLab 10.6.

### Example

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

const configuration = new Configuration();
const apiInstance = new BadgesApi(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 badgeId: number; //The badge ID (default to undefined)

const { status, data } = await apiInstance.getApiV4ProjectsIdBadgesBadgeId(
    id,
    badgeId
);
```

### 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|
| **badgeId** | [**number**] | The badge ID | defaults to undefined|


### Return type

**APIEntitiesBadge**

### Authorization

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

### HTTP request headers

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


### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
|**200** | Gets a badge of a project. |  -  |

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

# **getApiV4ProjectsIdBadgesRender**
> APIEntitiesBasicBadgeDetails getApiV4ProjectsIdBadgesRender()

This feature was introduced in GitLab 10.6.

### Example

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

const configuration = new Configuration();
const apiInstance = new BadgesApi(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 linkUrl: string; //URL of the badge link (default to undefined)
let imageUrl: string; //URL of the badge image (default to undefined)

const { status, data } = await apiInstance.getApiV4ProjectsIdBadgesRender(
    id,
    linkUrl,
    imageUrl
);
```

### 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|
| **linkUrl** | [**string**] | URL of the badge link | defaults to undefined|
| **imageUrl** | [**string**] | URL of the badge image | defaults to undefined|


### Return type

**APIEntitiesBasicBadgeDetails**

### Authorization

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

### HTTP request headers

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


### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
|**200** | Preview a badge from a project. |  -  |

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

# **postApiV4GroupsIdBadges**
> APIEntitiesBadge postApiV4GroupsIdBadges(postApiV4GroupsIdBadgesRequest)

This feature was introduced in GitLab 10.6.

### Example

```typescript
import {
    BadgesApi,
    Configuration,
    PostApiV4GroupsIdBadgesRequest
} from 'berg';

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

let id: string; //The ID or URL-encoded path of the group owned by the authenticated user. (default to undefined)
let postApiV4GroupsIdBadgesRequest: PostApiV4GroupsIdBadgesRequest; //

const { status, data } = await apiInstance.postApiV4GroupsIdBadges(
    id,
    postApiV4GroupsIdBadgesRequest
);
```

### Parameters

|Name | Type | Description  | Notes|
|------------- | ------------- | ------------- | -------------|
| **postApiV4GroupsIdBadgesRequest** | **PostApiV4GroupsIdBadgesRequest**|  | |
| **id** | [**string**] | The ID or URL-encoded path of the group owned by the authenticated user. | defaults to undefined|


### Return type

**APIEntitiesBadge**

### Authorization

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

### HTTP request headers

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


### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
|**201** | Adds a badge to a group. |  -  |

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

# **postApiV4ProjectsIdBadges**
> APIEntitiesBadge postApiV4ProjectsIdBadges(postApiV4GroupsIdBadgesRequest)

This feature was introduced in GitLab 10.6.

### Example

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

const configuration = new Configuration();
const apiInstance = new BadgesApi(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 postApiV4GroupsIdBadgesRequest: PostApiV4GroupsIdBadgesRequest; //

const { status, data } = await apiInstance.postApiV4ProjectsIdBadges(
    id,
    postApiV4GroupsIdBadgesRequest
);
```

### Parameters

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


### Return type

**APIEntitiesBadge**

### Authorization

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

### HTTP request headers

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


### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
|**201** | Adds a badge to a project. |  -  |

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

# **putApiV4GroupsIdBadgesBadgeId**
> APIEntitiesBadge putApiV4GroupsIdBadgesBadgeId()

This feature was introduced in GitLab 10.6.

### Example

```typescript
import {
    BadgesApi,
    Configuration,
    PutApiV4GroupsIdBadgesBadgeIdRequest
} from 'berg';

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

let id: string; //The ID or URL-encoded path of the group owned by the authenticated user. (default to undefined)
let badgeId: number; // (default to undefined)
let putApiV4GroupsIdBadgesBadgeIdRequest: PutApiV4GroupsIdBadgesBadgeIdRequest; // (optional)

const { status, data } = await apiInstance.putApiV4GroupsIdBadgesBadgeId(
    id,
    badgeId,
    putApiV4GroupsIdBadgesBadgeIdRequest
);
```

### Parameters

|Name | Type | Description  | Notes|
|------------- | ------------- | ------------- | -------------|
| **putApiV4GroupsIdBadgesBadgeIdRequest** | **PutApiV4GroupsIdBadgesBadgeIdRequest**|  | |
| **id** | [**string**] | The ID or URL-encoded path of the group owned by the authenticated user. | defaults to undefined|
| **badgeId** | [**number**] |  | defaults to undefined|


### Return type

**APIEntitiesBadge**

### Authorization

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

### HTTP request headers

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


### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
|**200** | Updates a badge of a group. |  -  |

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

# **putApiV4ProjectsIdBadgesBadgeId**
> APIEntitiesBadge putApiV4ProjectsIdBadgesBadgeId()

This feature was introduced in GitLab 10.6.

### Example

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

const configuration = new Configuration();
const apiInstance = new BadgesApi(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 badgeId: number; // (default to undefined)
let putApiV4GroupsIdBadgesBadgeIdRequest: PutApiV4GroupsIdBadgesBadgeIdRequest; // (optional)

const { status, data } = await apiInstance.putApiV4ProjectsIdBadgesBadgeId(
    id,
    badgeId,
    putApiV4GroupsIdBadgesBadgeIdRequest
);
```

### Parameters

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


### Return type

**APIEntitiesBadge**

### Authorization

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

### HTTP request headers

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


### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
|**200** | Updates a badge of a project. |  -  |

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

