# AccessRequestsApi

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

|Method | HTTP request | Description|
|------------- | ------------- | -------------|
|[**deleteApiV4GroupsIdAccessRequestsUserId**](#deleteapiv4groupsidaccessrequestsuserid) | **DELETE** /groups/{id}/access_requests/{user_id} | Denies an access request for the given user.|
|[**deleteApiV4ProjectsIdAccessRequestsUserId**](#deleteapiv4projectsidaccessrequestsuserid) | **DELETE** /projects/{id}/access_requests/{user_id} | Denies an access request for the given user.|
|[**getApiV4GroupsIdAccessRequests**](#getapiv4groupsidaccessrequests) | **GET** /groups/{id}/access_requests | Gets a list of access requests for a group.|
|[**getApiV4ProjectsIdAccessRequests**](#getapiv4projectsidaccessrequests) | **GET** /projects/{id}/access_requests | Gets a list of access requests for a project.|
|[**postApiV4GroupsIdAccessRequests**](#postapiv4groupsidaccessrequests) | **POST** /groups/{id}/access_requests | Requests access for the authenticated user to a group.|
|[**postApiV4ProjectsIdAccessRequests**](#postapiv4projectsidaccessrequests) | **POST** /projects/{id}/access_requests | Requests access for the authenticated user to a project.|
|[**putApiV4GroupsIdAccessRequestsUserIdApprove**](#putapiv4groupsidaccessrequestsuseridapprove) | **PUT** /groups/{id}/access_requests/{user_id}/approve | Approves an access request for the given user.|
|[**putApiV4ProjectsIdAccessRequestsUserIdApprove**](#putapiv4projectsidaccessrequestsuseridapprove) | **PUT** /projects/{id}/access_requests/{user_id}/approve | Approves an access request for the given user.|

# **deleteApiV4GroupsIdAccessRequestsUserId**
> deleteApiV4GroupsIdAccessRequestsUserId()

This feature was introduced in GitLab 8.11.

### Example

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

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

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

const { status, data } = await apiInstance.deleteApiV4GroupsIdAccessRequestsUserId(
    id,
    userId
);
```

### Parameters

|Name | Type | Description  | Notes|
|------------- | ------------- | ------------- | -------------|
| **id** | [**string**] | The ID or URL-encoded path of the group owned by the authenticated user | defaults to undefined|
| **userId** | [**number**] | The user ID of the access requester | 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** | Denies an access request for the given 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)

# **deleteApiV4ProjectsIdAccessRequestsUserId**
> deleteApiV4ProjectsIdAccessRequestsUserId()

This feature was introduced in GitLab 8.11.

### Example

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

const configuration = new Configuration();
const apiInstance = new AccessRequestsApi(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 userId: number; //The user ID of the access requester (default to undefined)

const { status, data } = await apiInstance.deleteApiV4ProjectsIdAccessRequestsUserId(
    id,
    userId
);
```

### 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|
| **userId** | [**number**] | The user ID of the access requester | 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** | Denies an access request for the given 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)

# **getApiV4GroupsIdAccessRequests**
> APIEntitiesAccessRequester getApiV4GroupsIdAccessRequests()

This feature was introduced in GitLab 8.11.

### Example

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

const configuration = new Configuration();
const apiInstance = new AccessRequestsApi(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)

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

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


### Return type

**APIEntitiesAccessRequester**

### 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 access requests for 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)

# **getApiV4ProjectsIdAccessRequests**
> APIEntitiesAccessRequester getApiV4ProjectsIdAccessRequests()

This feature was introduced in GitLab 8.11.

### Example

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

const configuration = new Configuration();
const apiInstance = new AccessRequestsApi(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)

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

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


### Return type

**APIEntitiesAccessRequester**

### 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 access requests for 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)

# **postApiV4GroupsIdAccessRequests**
> APIEntitiesAccessRequester postApiV4GroupsIdAccessRequests()

This feature was introduced in GitLab 8.11.

### Example

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

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

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

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

### Parameters

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


### Return type

**APIEntitiesAccessRequester**

### Authorization

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

### HTTP request headers

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


### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
|**200** | successful operation |  -  |

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

# **postApiV4ProjectsIdAccessRequests**
> APIEntitiesAccessRequester postApiV4ProjectsIdAccessRequests()

This feature was introduced in GitLab 8.11.

### Example

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

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

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

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

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


### Return type

**APIEntitiesAccessRequester**

### Authorization

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

### HTTP request headers

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


### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
|**200** | successful operation |  -  |

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

# **putApiV4GroupsIdAccessRequestsUserIdApprove**
> APIEntitiesAccessRequester putApiV4GroupsIdAccessRequestsUserIdApprove()

This feature was introduced in GitLab 8.11.

### Example

```typescript
import {
    AccessRequestsApi,
    Configuration,
    PutApiV4GroupsIdAccessRequestsUserIdApproveRequest
} from 'berg';

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

let id: string; //The ID or URL-encoded path of the group owned by the authenticated user (default to undefined)
let userId: number; //The user ID of the access requester (default to undefined)
let putApiV4GroupsIdAccessRequestsUserIdApproveRequest: PutApiV4GroupsIdAccessRequestsUserIdApproveRequest; // (optional)

const { status, data } = await apiInstance.putApiV4GroupsIdAccessRequestsUserIdApprove(
    id,
    userId,
    putApiV4GroupsIdAccessRequestsUserIdApproveRequest
);
```

### Parameters

|Name | Type | Description  | Notes|
|------------- | ------------- | ------------- | -------------|
| **putApiV4GroupsIdAccessRequestsUserIdApproveRequest** | **PutApiV4GroupsIdAccessRequestsUserIdApproveRequest**|  | |
| **id** | [**string**] | The ID or URL-encoded path of the group owned by the authenticated user | defaults to undefined|
| **userId** | [**number**] | The user ID of the access requester | defaults to undefined|


### Return type

**APIEntitiesAccessRequester**

### Authorization

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

### HTTP request headers

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


### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
|**200** | successful operation |  -  |

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

# **putApiV4ProjectsIdAccessRequestsUserIdApprove**
> APIEntitiesAccessRequester putApiV4ProjectsIdAccessRequestsUserIdApprove()

This feature was introduced in GitLab 8.11.

### Example

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

const configuration = new Configuration();
const apiInstance = new AccessRequestsApi(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 userId: number; //The user ID of the access requester (default to undefined)
let putApiV4GroupsIdAccessRequestsUserIdApproveRequest: PutApiV4GroupsIdAccessRequestsUserIdApproveRequest; // (optional)

const { status, data } = await apiInstance.putApiV4ProjectsIdAccessRequestsUserIdApprove(
    id,
    userId,
    putApiV4GroupsIdAccessRequestsUserIdApproveRequest
);
```

### Parameters

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


### Return type

**APIEntitiesAccessRequester**

### Authorization

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

### HTTP request headers

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


### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
|**200** | successful operation |  -  |

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

