# CiVariablesApi

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

|Method | HTTP request | Description|
|------------- | ------------- | -------------|
|[**deleteApiV4AdminCiVariablesKey**](#deleteapiv4admincivariableskey) | **DELETE** /admin/ci/variables/{key} | |
|[**getApiV4AdminCiVariables**](#getapiv4admincivariables) | **GET** /admin/ci/variables | |
|[**getApiV4AdminCiVariablesKey**](#getapiv4admincivariableskey) | **GET** /admin/ci/variables/{key} | |
|[**postApiV4AdminCiVariables**](#postapiv4admincivariables) | **POST** /admin/ci/variables | |
|[**putApiV4AdminCiVariablesKey**](#putapiv4admincivariableskey) | **PUT** /admin/ci/variables/{key} | |

# **deleteApiV4AdminCiVariablesKey**
> APIEntitiesCiVariable deleteApiV4AdminCiVariablesKey()

Delete an existing instance-level variable

### Example

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

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

let key: string; //The key of a variable (default to undefined)

const { status, data } = await apiInstance.deleteApiV4AdminCiVariablesKey(
    key
);
```

### Parameters

|Name | Type | Description  | Notes|
|------------- | ------------- | ------------- | -------------|
| **key** | [**string**] | The key of a variable | defaults to undefined|


### Return type

**APIEntitiesCiVariable**

### Authorization

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

### HTTP request headers

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


### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
|**204** | Delete an existing instance-level variable |  -  |
|**404** | Instance Variable 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)

# **getApiV4AdminCiVariables**
> APIEntitiesCiVariable getApiV4AdminCiVariables()

List all instance-level variables

### Example

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

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

let page: number; //Current page number (optional) (default to 1)
let perPage: number; //Number of items per page (optional) (default to 20)

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

### Parameters

|Name | Type | Description  | Notes|
|------------- | ------------- | ------------- | -------------|
| **page** | [**number**] | Current page number | (optional) defaults to 1|
| **perPage** | [**number**] | Number of items per page | (optional) defaults to 20|


### Return type

**APIEntitiesCiVariable**

### Authorization

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

### HTTP request headers

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


### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
|**200** | List all instance-level variables |  -  |

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

# **getApiV4AdminCiVariablesKey**
> APIEntitiesCiVariable getApiV4AdminCiVariablesKey()

Get the details of a specific instance-level variable

### Example

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

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

let key: string; //The key of a variable (default to undefined)

const { status, data } = await apiInstance.getApiV4AdminCiVariablesKey(
    key
);
```

### Parameters

|Name | Type | Description  | Notes|
|------------- | ------------- | ------------- | -------------|
| **key** | [**string**] | The key of a variable | defaults to undefined|


### Return type

**APIEntitiesCiVariable**

### Authorization

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

### HTTP request headers

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


### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
|**200** | Get the details of a specific instance-level variable |  -  |
|**404** | Instance Variable 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)

# **postApiV4AdminCiVariables**
> APIEntitiesCiVariable postApiV4AdminCiVariables(postApiV4AdminCiVariablesRequest)

Create a new instance-level variable

### Example

```typescript
import {
    CiVariablesApi,
    Configuration,
    PostApiV4AdminCiVariablesRequest
} from 'berg';

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

let postApiV4AdminCiVariablesRequest: PostApiV4AdminCiVariablesRequest; //

const { status, data } = await apiInstance.postApiV4AdminCiVariables(
    postApiV4AdminCiVariablesRequest
);
```

### Parameters

|Name | Type | Description  | Notes|
|------------- | ------------- | ------------- | -------------|
| **postApiV4AdminCiVariablesRequest** | **PostApiV4AdminCiVariablesRequest**|  | |


### Return type

**APIEntitiesCiVariable**

### Authorization

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

### HTTP request headers

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


### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
|**201** | Create a new instance-level variable |  -  |
|**400** | 400 Bad Request |  -  |

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

# **putApiV4AdminCiVariablesKey**
> APIEntitiesCiVariable putApiV4AdminCiVariablesKey()

Update an instance-level variable

### Example

```typescript
import {
    CiVariablesApi,
    Configuration,
    PutApiV4AdminCiVariablesKeyRequest
} from 'berg';

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

let key: string; //The key of a variable (default to undefined)
let putApiV4AdminCiVariablesKeyRequest: PutApiV4AdminCiVariablesKeyRequest; // (optional)

const { status, data } = await apiInstance.putApiV4AdminCiVariablesKey(
    key,
    putApiV4AdminCiVariablesKeyRequest
);
```

### Parameters

|Name | Type | Description  | Notes|
|------------- | ------------- | ------------- | -------------|
| **putApiV4AdminCiVariablesKeyRequest** | **PutApiV4AdminCiVariablesKeyRequest**|  | |
| **key** | [**string**] | The key of a variable | defaults to undefined|


### Return type

**APIEntitiesCiVariable**

### Authorization

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

### HTTP request headers

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


### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
|**200** | Update an instance-level variable |  -  |
|**404** | Instance Variable 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)

