Delete Tags from Secret
Endpoint: DELETE /api/secrets/{key}/tags
Deletes tags from a secret.
Path parameters
| Parameter | Description | Type | Required/ Optional |
|---|---|---|---|
| key | The secret key from which the tags are to be deleted. | string | Required. |
Request body
The request body should be an array of tag objects.
| Parameter | Description | Type | Required/ Optional |
|---|---|---|---|
| key | The tag key to be removed. | string | Required. |
| value | The tag value to be removed. | string | Required. |
Response
- Returns 200 OK, indicating that tags have been deleted from the secret.
- Returns 404 if an invalid secret key is provided.
Examples
Delete a single tag from a secret
Request
curl -X 'DELETE' \
'https://<YOUR-SERVER-URL>/api/secrets/my_token/tags' \
-H 'accept: */*' \
-H 'X-Authorization: <TOKEN>' \
-H 'Content-Type: application/json' \
-d '[
{
"key": "backend",
"value": "PR"
}
]'
Response
Returns 200 OK, indicating that the tag has been deleted from the secret.
Delete multiple tags from a secret
Request
curl -X 'DELETE' \
'https://<YOUR-SERVER-URL>/api/secrets/my_token/tags' \
-H 'accept: */*' \
-H 'X-Authorization: <TOKEN>' \
-H 'Content-Type: application/json' \
-d '[
{
"key": "dev",
"value": "automation"
},
{
"key": "purpose",
"value": "docs"
}
]'
Response
Returns 200 OK, indicating that the tags have been deleted from the secret.