Skip to main content

Delete Tags from an Environment Variable

Endpoint: DELETE /api/environment/{name}/tags

Deletes tags from an environment variable.

Path parameters

ParameterDescriptionTypeRequired/ Optional
keyThe name of the environment variable from which the tags are to be deleted.stringRequired.

Request Body

The request body should be an array of tag objects.

ParameterDescriptionTypeRequired/ Optional
keyThe tag key.stringRequired.
valueThe tag value.stringRequired.

Response

Returns 200 OK, indicating that tags have been deleted from the environment variable.

Examples

Delete a single tag from an environment variable

Request

curl -X 'DELETE' \
'https://<YOUR-SERVER-URL>/api/environment/sampleKey/tags' \
-H 'accept: */*' \
-H 'X-Authorization: <TOKEN>' \
-H 'Content-Type: application/json' \
-d '[
{
"key": "dev",
"value": "automation"
}
]'

Response

Returns 200 OK, indicating that the tag has been deleted from the environment variable.

Delete multiple tags from an environment variable

Request

curl -X 'DELETE' \
'https://<YOUR-SERVER-URL>/api/environment/sampleKey/tags' \
-H 'accept: */*' \
-H 'X-Authorization: <TOKEN>' \
-H 'Content-Type: application/json' \
-d '[
{
"key": "backend",
"value": "PR"
},
{
"key": "env",
"value": "prod"
}
]'

Response

Returns 200 OK, indicating that the tags have been deleted from the environment variable.