Skip to main content

Replace Tags in a Workflow Definition

Endpoint: PUT /api/metadata/workflow/{name}/tags

Replaces all existing tags in a workflow definition with the new tag provided in the request. If the workflow definition has multiple tags, they will all be replaced with the tag specified in the request body.

Path Parameters

ParameterDescriptionTypeRequired/ Optional
nameThe name of the workflow definition in which the tags are to be replaced.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 the tag has been replaced in the workflow definition.
  • Returns 404 if the workflow definition does not exist.

Examples

Replace a tag from a workflow definition

Request

curl -X 'PUT' \
'https://<YOUR-CLUSTER>/api/metadata/workflow/SampleDemo/tags' \
-H 'accept: */*' \
-H 'X-Authorization: <TOKEN>' \
-H 'Content-Type: application/json' \
-d '[
{
"key": "env",
"value": "prod"
}
]'

Response

Returns 200 OK, indicating that the tag has been replaced in the workflow definition.