diff options
Diffstat (limited to 'doc/api/deployments.md')
-rw-r--r-- | doc/api/deployments.md | 77 |
1 files changed, 75 insertions, 2 deletions
diff --git a/doc/api/deployments.md b/doc/api/deployments.md index 70b3e76c3dd..29f9bd3e2ee 100644 --- a/doc/api/deployments.md +++ b/doc/api/deployments.md @@ -23,7 +23,7 @@ GET /projects/:id/deployments | `updated_after` | datetime | no | Return deployments updated after the specified date. Expected in ISO 8601 format (`2019-03-15T08:00:00Z`). | | `updated_before` | datetime | no | Return deployments updated before the specified date. Expected in ISO 8601 format (`2019-03-15T08:00:00Z`). | | `environment` | string | no | The [name of the environment](../ci/environments/index.md) to filter deployments by. | -| `status` | string | no | The status to filter deployments by. One of `created`, `running`, `success`, `failed`, `canceled`. +| `status` | string | no | The status to filter deployments by. One of `created`, `running`, `success`, `failed`, `canceled`, `blocked`. ```shell curl --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/projects/1/deployments" @@ -201,6 +201,7 @@ Example response: "sha": "a91957a858320c0e17f3a0eca7cfacbff50ea29a", "created_at": "2016-08-11T11:32:35.444Z", "updated_at": "2016-08-11T11:34:01.123Z", + "status": "success", "user": { "name": "Administrator", "username": "root", @@ -264,6 +265,29 @@ Example response: } ``` +Deployments created by users on GitLab Premium or higher include the `approvals` and `pending_approval_count` properties: + +```json +{ + "status": "created", + "pending_approval_count": 0, + "approvals": [ + { + "user": { + "id": 49, + "username": "project_6_bot", + "name": "****", + "state": "active", + "avatar_url": "https://www.gravatar.com/avatar/e83ac685f68ea07553ad3054c738c709?s=80&d=identicon", + "web_url": "http://localhost:3000/project_6_bot" + }, + "status": "approved" + } + ], + ... +} +``` + ## Create a deployment ```plaintext @@ -311,6 +335,29 @@ Example response: } ``` +Deployments created by users on GitLab Premium or higher include the `approvals` and `pending_approval_count` properties: + +```json +{ + "status": "created", + "pending_approval_count": 0, + "approvals": [ + { + "user": { + "id": 49, + "username": "project_6_bot", + "name": "****", + "state": "active", + "avatar_url": "https://www.gravatar.com/avatar/e83ac685f68ea07553ad3054c738c709?s=80&d=identicon", + "web_url": "http://localhost:3000/project_6_bot" + }, + "status": "approved" + } + ], + ... +} +``` + ## Update a deployment ```plaintext @@ -354,6 +401,29 @@ Example response: } ``` +Deployments created by users on GitLab Premium or higher include the `approvals` and `pending_approval_count` properties: + +```json +{ + "status": "created", + "pending_approval_count": 0, + "approvals": [ + { + "user": { + "id": 49, + "username": "project_6_bot", + "name": "****", + "state": "active", + "avatar_url": "https://www.gravatar.com/avatar/e83ac685f68ea07553ad3054c738c709?s=80&d=identicon", + "web_url": "http://localhost:3000/project_6_bot" + }, + "status": "approved" + } + ], + ... +} +``` + ## List of merge requests associated with a deployment > [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/35739) in GitLab 12.7. @@ -378,7 +448,10 @@ curl --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/a ## Approve or reject a blocked deployment **(PREMIUM)** -> [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. +> - [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. +> - [Feature flag removed](https://gitlab.com/gitlab-org/gitlab/-/issues/347342) in GitLab 14.8. + +See [Deployment Approvals](../ci/environments/deployment_approvals.md) for more information about this feature. ```plaintext POST /projects/:id/deployments/:deployment_id/approval |