Alter Report Tags¶
POST /1.3/reports/{id}/alter-tags
Description¶
Bulk add and remove tags to/from a report. Added tags that already exist on the report, and removed tags that do not exist on the report, will be ignored.
Note
The maximum length of a tag is 90 characters.
Note
Tags should only contain certain characters. See main Tag page for details.
Parameters¶
URL Path Parameters¶
| Parameter | Required | Default | Description |
|---|---|---|---|
| id | X | TruSTAR report id or external tracking id. |
Query String Parameters¶
| Parameter | Required | Default | Description |
|---|---|---|---|
| idType | internal |
internal or external (the ID type of the report ID) |
Request Body Parameters¶
The request JSON body must be a well-formed JSON list, where each entry is an object with the following values.
| Parameter | Required | Default | Description |
|---|---|---|---|
| addedTags | [] |
a list of objects of the form {"name": <tag_name>}, for each tag to add |
|
| removedTags | [] |
a list of objects of the form {"name": <tag_name>}, for each tag to remove |
Response (200)¶
A JSON containing the ID of the report.
Example Usage¶
Request¶
curl -k -H "Content-Type: application/json" -X POST -d \
'{"addedTags": [{"name": "tag_1"}, {"name": "tag_2"}], "removedTags": [{"name": "tag_3"}]}' \
-H "Authorization: Bearer {access_token}" \
"https://api.trustar.co/api/1.3/reports/9066ab40-2f3c-45ae-9566-7530403da691/alter-tags"
Response¶
{
"id": "9066ab40-2f3c-45ae-9566-7530403da691
}