Commit 203b92a2 authored by Alexis Sánchez's avatar Alexis Sánchez Committed by Evan Read

Documentation - Update Api access request

parent cd72ad39
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
The access levels are defined in the `Gitlab::Access` module. Currently, these levels are recognized: The access levels are defined in the `Gitlab::Access` module. Currently, these levels are recognized:
``` ```plaintext
10 => Guest access 10 => Guest access
20 => Reporter access 20 => Reporter access
30 => Developer access 30 => Developer access
...@@ -18,14 +18,16 @@ ...@@ -18,14 +18,16 @@
Gets a list of access requests viewable by the authenticated user. Gets a list of access requests viewable by the authenticated user.
``` ```plaintext
GET /groups/:id/access_requests GET /groups/:id/access_requests
GET /projects/:id/access_requests GET /projects/:id/access_requests
``` ```
| Attribute | Type | Required | Description | | Attribute | Type | Required | Description |
| --------- | ---- | -------- | ----------- | | --------- | -------------- | -------- | ----------- |
| `id` | integer/string | yes | The ID or [URL-encoded path of the project](README.md#namespaced-path-encoding) owned by the authenticated user | | `id` | integer/string | yes | The ID or [URL-encoded path of the project](README.md#namespaced-path-encoding) owned by the authenticated user |
Example request:
```bash ```bash
curl --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example.com/api/v4/groups/:id/access_requests curl --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example.com/api/v4/groups/:id/access_requests
...@@ -59,14 +61,16 @@ Example response: ...@@ -59,14 +61,16 @@ Example response:
Requests access for the authenticated user to a group or project. Requests access for the authenticated user to a group or project.
``` ```plaintext
POST /groups/:id/access_requests POST /groups/:id/access_requests
POST /projects/:id/access_requests POST /projects/:id/access_requests
``` ```
| Attribute | Type | Required | Description | | Attribute | Type | Required | Description |
| --------- | ---- | -------- | ----------- | | --------- | -------------- | -------- | ----------- |
| `id` | integer/string | yes | The ID or [URL-encoded path of the project](README.md#namespaced-path-encoding) owned by the authenticated user | | `id` | integer/string | yes | The ID or [URL-encoded path of the project](README.md#namespaced-path-encoding) owned by the authenticated user |
Example request:
```bash ```bash
curl --request POST --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example.com/api/v4/groups/:id/access_requests curl --request POST --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example.com/api/v4/groups/:id/access_requests
...@@ -90,16 +94,18 @@ Example response: ...@@ -90,16 +94,18 @@ Example response:
Approves an access request for the given user. Approves an access request for the given user.
``` ```plaintext
PUT /groups/:id/access_requests/:user_id/approve PUT /groups/:id/access_requests/:user_id/approve
PUT /projects/:id/access_requests/:user_id/approve PUT /projects/:id/access_requests/:user_id/approve
``` ```
| Attribute | Type | Required | Description | | Attribute | Type | Required | Description |
| --------- | ---- | -------- | ----------- | | -------------- | -------------- | -------- | ----------- |
| `id` | integer/string | yes | The ID or [URL-encoded path of the project](README.md#namespaced-path-encoding) owned by the authenticated user | | `id` | integer/string | yes | The ID or [URL-encoded path of the project](README.md#namespaced-path-encoding) owned by the authenticated user |
| `user_id` | integer | yes | The user ID of the access requester | | `user_id` | integer | yes | The user ID of the access requester |
| `access_level` | integer | no | A valid access level (defaults: `30`, developer access level) | | `access_level` | integer | no | A valid access level (defaults: `30`, developer access level) |
Example request:
```bash ```bash
curl --request PUT --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example.com/api/v4/groups/:id/access_requests/:user_id/approve?access_level=20 curl --request PUT --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example.com/api/v4/groups/:id/access_requests/:user_id/approve?access_level=20
...@@ -123,15 +129,17 @@ Example response: ...@@ -123,15 +129,17 @@ Example response:
Denies an access request for the given user. Denies an access request for the given user.
``` ```plaintext
DELETE /groups/:id/access_requests/:user_id DELETE /groups/:id/access_requests/:user_id
DELETE /projects/:id/access_requests/:user_id DELETE /projects/:id/access_requests/:user_id
``` ```
| Attribute | Type | Required | Description | | Attribute | Type | Required | Description |
| --------- | ---- | -------- | ----------- | | --------- | -------------- | -------- | ----------- |
| `id` | integer/string | yes | The ID or [URL-encoded path of the project](README.md#namespaced-path-encoding) owned by the authenticated user | | `id` | integer/string | yes | The ID or [URL-encoded path of the project](README.md#namespaced-path-encoding) owned by the authenticated user |
| `user_id` | integer | yes | The user ID of the access requester | | `user_id` | integer | yes | The user ID of the access requester |
Example request:
```bash ```bash
curl --request DELETE --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example.com/api/v4/groups/:id/access_requests/:user_id curl --request DELETE --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example.com/api/v4/groups/:id/access_requests/:user_id
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment