summaryrefslogtreecommitdiff
path: root/doc/api/deployments.md
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2022-01-06 06:10:35 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2022-01-06 06:10:35 +0000
commit25ceb3dc1c387950d777b71aabde00849d4c7bf9 (patch)
tree755188dc8d772ad10fb52f6eaa75a499ee15325a /doc/api/deployments.md
parent0fbe2f816ecef98003377154b479d350f13597d7 (diff)
downloadgitlab-ce-25ceb3dc1c387950d777b71aabde00849d4c7bf9.tar.gz
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'doc/api/deployments.md')
-rw-r--r--doc/api/deployments.md35
1 files changed, 35 insertions, 0 deletions
diff --git a/doc/api/deployments.md b/doc/api/deployments.md
index 253bc76737b..19656098f4b 100644
--- a/doc/api/deployments.md
+++ b/doc/api/deployments.md
@@ -375,3 +375,38 @@ It supports the same parameters as the [Merge Requests API](merge_requests.md#li
```shell
curl --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/projects/1/deployments/42/merge_requests"
```
+
+## Approve or Reject a blocked Deployment
+
+> [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/343864) in GitLab 14.7 [with a flag](../administration/feature_flags.md) named `deployment_approvals`. Disabled by default. This feature is not ready for production use.
+
+```plaintext
+POST /projects/:id/deployments/:deployment_id/approval
+```
+
+| Attribute | Type | Required | Description |
+|-----------------|----------------|----------|-----------------------------------------------------------------------------------------------------------------|
+| `id` | integer/string | yes | The ID or [URL-encoded path of the project](index.md#namespaced-path-encoding) owned by the authenticated user. |
+| `deployment_id` | integer | yes | The ID of the deployment. |
+| `status` | string | yes | The status of the approval (either `approved` or `rejected`). |
+
+```shell
+curl --data "status=approved" \
+ --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/projects/1/deployments/1/approval"
+```
+
+Example response:
+
+```json
+{
+ "user": {
+ "name": "Administrator",
+ "username": "root",
+ "id": 1,
+ "state": "active",
+ "avatar_url": "http://www.gravatar.com/avatar/e64c7d89f26bd1972efa854d13d7dd61?s=80&d=identicon",
+ "web_url": "http://localhost:3000/root"
+ },
+ "status": "approved"
+}
+```