Skip to main content

Get Tags from a Task Definition

Endpoint: GET /api/metadata/task/{taskName}/tags

Retrieves the tags associated with a task definition.

Path Parameters

ParameterDescriptionTypeRequired/ Optional
taskNameThe name of the task definition from which the tags are to be retrieved.stringRequired.

Response

Returns a JSON array of tag objects associated with the task definition. Each object includes:

  • key (string): The tag key.
  • value (string): The tag value.

Returns an empty array [] if no tags are associated with the task definition.

Examples

Get tags from a task definition

Request

curl -X 'GET' \
'https://<YOUR-CLUSTER>/api/metadata/task/sample-api-test/tags' \
-H 'accept: application/json' \
-H 'X-Authorization: <TOKEN>'

Response

Returns a JSON array of tag objects associated with the task definition.

[
{
"key": "team",
"value": "apac"
},
{
"key": "team",
"value": "engineering"
}
]