summaryrefslogtreecommitdiff
path: root/doc/api/environments.md
diff options
context:
space:
mode:
Diffstat (limited to 'doc/api/environments.md')
-rw-r--r--doc/api/environments.md78
1 files changed, 39 insertions, 39 deletions
diff --git a/doc/api/environments.md b/doc/api/environments.md
index 2b67c59ae35..bbf6c5fee99 100644
--- a/doc/api/environments.md
+++ b/doc/api/environments.md
@@ -15,12 +15,12 @@ Get all environments for a given project.
GET /projects/:id/environments
```
-| 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 |
-| `name` | string | no | Return the environment with this name. Mutually exclusive with `search` |
-| `search` | string | no | Return list of environments matching the search criteria. Mutually exclusive with `name`. Must be at least 3 characters long. |
-| `states` | string | no | List all environments that match a specific state. Accepted values: `available`, `stopping`, or `stopped`. If no state value given, returns all environments. |
+| Attribute | Type | Required | Description |
+|-----------|----------------|----------|---------------------------------------------------------------------------------------------------------------------------------------------------------------|
+| `id` | integer/string | yes | The ID or [URL-encoded](rest/index.md#namespaced-path-encoding) path of the project. |
+| `name` | string | no | Return the environment with this name. Mutually exclusive with `search`. |
+| `search` | string | no | Return list of environments matching the search criteria. Mutually exclusive with `name`. Must be at least 3 characters long. |
+| `states` | string | no | List all environments that match a specific state. Accepted values: `available`, `stopping`, or `stopped`. If no state value given, returns all environments. |
```shell
curl --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/projects/1/environments?name=review%2Ffix-foo"
@@ -133,10 +133,10 @@ Example response:
GET /projects/:id/environments/:environment_id
```
-| 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 |
-| `environment_id` | integer | yes | The ID of the environment |
+| Attribute | Type | Required | Description |
+|------------------|----------------|----------|--------------------------------------------------------------------------------------|
+| `id` | integer/string | yes | The ID or [URL-encoded path](rest/index.md#namespaced-path-encoding) of the project. |
+| `environment_id` | integer | yes | The ID of the environment. |
```shell
curl --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/projects/1/environments/1"
@@ -252,12 +252,12 @@ It returns `201` if the environment was successfully created, `400` for wrong pa
POST /projects/:id/environments
```
-| 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 |
-| `name` | string | yes | The name of the environment |
-| `external_url` | string | no | Place to link to for this environment |
-| `tier` | string | no | The tier of the new environment. Allowed values are `production`, `staging`, `testing`, `development`, and `other` |
+| Attribute | Type | Required | Description |
+|----------------|----------------|----------|---------------------------------------------------------------------------------------------------------------------|
+| `id` | integer/string | yes | The ID or [URL-encoded path](rest/index.md#namespaced-path-encoding) of the project. |
+| `name` | string | yes | The name of the environment. |
+| `external_url` | string | no | Place to link to for this environment. |
+| `tier` | string | no | The tier of the new environment. Allowed values are `production`, `staging`, `testing`, `development`, and `other`. |
```shell
curl --data "name=deploy&external_url=https://deploy.gitlab.example.com" \
@@ -289,13 +289,13 @@ It returns `200` if the environment was successfully updated. In case of an erro
PUT /projects/:id/environments/:environments_id
```
-| 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 |
-| `environment_id` | integer | yes | The ID of the environment |
-| `name` | string | no | [Deprecated and will be removed in GitLab 15.0](https://gitlab.com/gitlab-org/gitlab/-/issues/338897) |
-| `external_url` | string | no | The new `external_url` |
-| `tier` | string | no | The tier of the new environment. Allowed values are `production`, `staging`, `testing`, `development`, and `other` |
+| Attribute | Type | Required | Description |
+|------------------|----------------|----------|---------------------------------------------------------------------------------------------------------------------|
+| `id` | integer/string | yes | The ID or [URL-encoded path of the project](rest/index.md#namespaced-path-encoding). |
+| `environment_id` | integer | yes | The ID of the environment. |
+| `name` | string | no | [Deprecated and will be removed in GitLab 16.0](https://gitlab.com/gitlab-org/gitlab/-/issues/338897). |
+| `external_url` | string | no | The new `external_url`. |
+| `tier` | string | no | The tier of the new environment. Allowed values are `production`, `staging`, `testing`, `development`, and `other`. |
```shell
curl --request PUT --data "name=staging&external_url=https://staging.gitlab.example.com" \
@@ -325,10 +325,10 @@ It returns `204` if the environment was successfully deleted, and `404` if the e
DELETE /projects/:id/environments/:environment_id
```
-| 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 |
-| `environment_id` | integer | yes | The ID of the environment |
+| Attribute | Type | Required | Description |
+|------------------|----------------|----------|--------------------------------------------------------------------------------------|
+| `id` | integer/string | yes | The ID or [URL-encoded path](rest/index.md#namespaced-path-encoding) of the project. |
+| `environment_id` | integer | yes | The ID of the environment. |
```shell
curl --request DELETE --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/projects/1/environments/1"
@@ -348,12 +348,12 @@ By default, it only deletes environments 30 days or older. You can change this d
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. |
+| Attribute | Type | Required | Description |
+|-----------|----------------|----------|--------------------------------------------------------------------------------------------------------------------------------------------------------|
+| `id` | integer/string | yes | The ID or [URL-encoded path](rest/index.md#namespaced-path-encoding) of the project. |
+| `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 is 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"
@@ -389,11 +389,11 @@ It returns `200` if the environment was successfully stopped, and `404` if the e
POST /projects/:id/environments/:environment_id/stop
```
-| 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 |
-| `environment_id` | integer | yes | The ID of the environment |
-| `force` | boolean | no | Force environment to stop without executing `on_stop` actions |
+| Attribute | Type | Required | Description |
+|------------------|----------------|----------|--------------------------------------------------------------------------------------|
+| `id` | integer/string | yes | The ID or [URL-encoded path](rest/index.md#namespaced-path-encoding) of the project. |
+| `environment_id` | integer | yes | The ID of the environment. |
+| `force` | boolean | no | Force environment to stop without executing `on_stop` actions. |
```shell
curl --request POST --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/projects/1/environments/1/stop"
@@ -423,7 +423,7 @@ POST /projects/:id/environments/stop_stale
| 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 |
+| `id` | integer/string | yes | The ID or [URL-encoded path](rest/index.md#namespaced-path-encoding) of the project. |
| `before` | date | yes | Stop environments that have been modified or deployed to before the specified date. Expected in ISO 8601 format (`2019-03-15T08:00:00Z`). Valid inputs are between 10 years ago and 1 week ago |
```shell