Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2021-08-04 18:08:46 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2021-08-04 18:08:46 +0300
commit23c4d0c3e1ea30be08b597a961fc91773f60309f (patch)
tree9053b82226f4b9894dad4c65b0fb5486d7eae83f /doc/api/environments.md
parent415f502f73b19e4e7e46d929ded9d64f7e7ee77a (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'doc/api/environments.md')
-rw-r--r--doc/api/environments.md46
1 files changed, 46 insertions, 0 deletions
diff --git a/doc/api/environments.md b/doc/api/environments.md
index 25690cc099a..319081a4cf3 100644
--- a/doc/api/environments.md
+++ b/doc/api/environments.md
@@ -231,6 +231,52 @@ DELETE /projects/:id/environments/:environment_id
curl --request DELETE --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/projects/1/environments/1"
```
+## Delete multiple stopped review apps
+
+> [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/296625) in GitLab 14.2.
+
+It schedules for deletion multiple environments that have already been
+[stopped](../ci/environments/index.md#stopping-an-environment) and
+are [in the review app folder](../ci/review_apps/index.md).
+The actual deletion is performed after 1 week from the time of execution.
+
+```plaintext
+DELETE /projects/:id/environments/review_apps
+```
+
+| 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. |
+| `before` | datetime | no | The date before which environments can be deleted. Defaults to 30 days ago. Expected in ISO 8601 format (`YYYY-MM-DDTHH:MM:SSZ`). |
+| `limit` | integer | no | Maximum number of environments to delete. Defaults to 100. |
+| `dry_run` | boolean | no | Defaults to `true` for safety reasons. It performs a dry run where no actual deletion will be performed. Set to `false` to actually delete the environment. |
+
+```shell
+curl --request DELETE --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/projects/1/environments/review_apps"
+```
+
+Example response:
+
+```json
+{
+ "scheduled_entries": [
+ {
+ "id": 387,
+ "name": "review/023f1bce01229c686a73",
+ "slug": "review-023f1bce01-3uxznk",
+ "external_url": null
+ },
+ {
+ "id": 388,
+ "name": "review/85d4c26a388348d3c4c0",
+ "slug": "review-85d4c26a38-5giw1c",
+ "external_url": null
+ }
+ ],
+ "unprocessable_entries": []
+}
+```
+
## Stop an environment
It returns `200` if the environment was successfully stopped, and `404` if the environment does not exist.