Skip to main content

Add Tag to a Workflow Definition

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

Adds a tag to a workflow definition. To add multiple tags, make separate API calls for each tag. If a tag with the same key already exists, this operation will update its value.

Path Parameters

ParameterDescriptionTypeRequired/ Optional
nameThe name of the workflow definition to which the tags are to be added.stringRequired.

Request Body

The request body should be a JSON object with key and value fields.

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

Response

  • Returns 200 OK, indicating that the tag has been added to the workflow definition.
  • Returns 404 if the workflow definition does not exist.

Examples

Add a single tag to a workflow definition

Request

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

Response

Returns 200 OK, indicating that the tag has been added to the workflow definition.