How to use PATCH on the Feature or Epic tags fields with the Jira Align v2 REST API
Summary
This article outlines how to update the tags field values using the API PATCH command on the /features or /epics endpoint.
Environment
Jira Align
Solution
The tags field is a string, so you just need to add the tags with a comma-separated string:
Here is an example of a PATCH Request body:
[
{
"op": "add",
"path": "/tags",
"value": "tag1, tag2"
}
]
This will result in the following for an Epic:
and in the audit log:
As for all string fields, you need to include the existing string and then append to the string the tag(s) you want to add, otherwise, it will replace the existing tags with the new ones.
For example, to add tag3 to the list, you need to have the value: "tag1, tag2, tag3".