Use this API to interact with access requests for groups and projects.
List all access requests for a group
GET /api/v4/groups/{id}/access_requests
Lists all access requests for a specified group that are viewable by the authenticated user.
Parameters
| Name | Type | Description |
|---|---|---|
idPath, | String | The ID or URL- |
pageQuery | Integer | Current page number Default: 1Example: 1 |
per_Query | Integer | Number of items per page Default: 20Example: 20 |
Responses
| Code | Description | Schema |
|---|---|---|
200 | OK | APIEntities |
400 | Bad Request | — |
404 | Not Found | — |
Request access to a group
POST /api/v4/groups/{id}/access_requests
Requests access to a specified group for the authenticated user.
Parameters
| Name | Type | Description |
|---|---|---|
idPath, | String | The ID or URL- |
Responses
| Code | Description | Schema |
|---|---|---|
200 | OK | APIEntities |
400 | Bad Request | — |
404 | Not Found | — |
Deny an access request
DELETE /api/v4/groups/{id}/access_requests/{user_id}
Denies an access request for a specified user in a group.
Parameters
| Name | Type | Description |
|---|---|---|
idPath, | String | The ID or URL- |
user_Path, | Integer | The user ID of the access requester |
Responses
| Code | Description | Schema |
|---|---|---|
204 | Resource deleted | — |
400 | Bad Request | — |
404 | Not Found | — |
Approves an access request for the given user
PUT /api/v4/groups/{id}/access_requests/{user_id}/approve
This feature was introduced in GitLab 8.11.
Parameters
| Name | Type | Description |
|---|---|---|
idPath, | String | The ID or URL- |
user_Path, | Integer | The user ID of the access requester |
Request body (application/json)
| Property | Type | Description |
|---|---|---|
access_ | Integer | A valid access level (defaults:30,Default: 30 |
Responses
| Code | Description | Schema |
|---|---|---|
200 | successful operation | APIEntities |
400 | Bad Request | — |
404 | Not Found | — |
List all access requests for a project
GET /api/v4/projects/{id}/access_requests
Lists all access requests for a specified project that are viewable by the authenticated user.
Parameters
| Name | Type | Description |
|---|---|---|
idPath, | String | The ID or URL- |
pageQuery | Integer | Current page number Default: 1Example: 1 |
per_Query | Integer | Number of items per page Default: 20Example: 20 |
Responses
| Code | Description | Schema |
|---|---|---|
200 | OK | APIEntities |
400 | Bad Request | — |
404 | Not Found | — |
Request access to a project
POST /api/v4/projects/{id}/access_requests
Requests access to a specified project for the authenticated user.
Parameters
| Name | Type | Description |
|---|---|---|
idPath, | String | The ID or URL- |
Responses
| Code | Description | Schema |
|---|---|---|
200 | OK | APIEntities |
400 | Bad Request | — |
404 | Not Found | — |
Deny an access request
DELETE /api/v4/projects/{id}/access_requests/{user_id}
Denies an access request for a specified user in a project.
Parameters
| Name | Type | Description |
|---|---|---|
idPath, | String | The ID or URL- |
user_Path, | Integer | The user ID of the access requester |
Responses
| Code | Description | Schema |
|---|---|---|
204 | Resource deleted | — |
400 | Bad Request | — |
404 | Not Found | — |
Approves an access request for the given user
PUT /api/v4/projects/{id}/access_requests/{user_id}/approve
This feature was introduced in GitLab 8.11.
Parameters
| Name | Type | Description |
|---|---|---|
idPath, | String | The ID or URL- |
user_Path, | Integer | The user ID of the access requester |
Request body (application/json)
| Property | Type | Description |
|---|---|---|
access_ | Integer | A valid access level (defaults:30,Default: 30 |
Responses
| Code | Description | Schema |
|---|---|---|
200 | successful operation | APIEntities |
400 | Bad Request | — |
404 | Not Found | — |
Schemas
Objects returned by the operations above and objects nested in their request bodies.
APIEntitiesAccessRequester
| Property | Type | Description |
|---|---|---|
avatar_ | String | Example:/ |
avatar_ | String | Example:https: |
custom_ | Array of APIEntities | — |
id | Integer (int64) | Example:1 |
locked | Boolean | — |
name | String | Example:Administrator |
public_ | String | Example:john@example. |
requested_ | String | — |
state | String | Example:active |
username | String | Example:admin |
web_ | String | Example:https: |
APIEntitiesCustomAttribute
| Property | Type | Description |
|---|---|---|
key | String | Example:foo |
value | String | Example:bar |