Manage Tags (RESERVED)
RESERVED: The keyword RESERVED annotation means that the API is available for use but is not yet part of the officially supported specification. Its behavior, interface, or output may change in future releases without backward compatibility guarantees.
Overview
Add or remove tags from objects within an application. You can specify different sets of objects for adding and removing tags in a single request.
URI
POST /rest/applications/{name}/tags
Path parameters
name (string)
This parameter identifies the analyzed application. The application name must be properly encoded if it is required. Character back-quote is not allowed.
Request Body
{
"addTags": ["tag1", "tag2"],
"deleteTags": ["oldTag"],
"nodes": ["1803", "1804"],
"nodesForAdd": ["1803"],
"nodesForDelete": ["1804"]
}
A JSON object describing the tags to add or remove:
| Property | Type | Required | Description |
|---|---|---|---|
| addTags | []string | No* | List of tag names to add to the specified nodes. |
| deleteTags | []string | No* | List of tag names to remove from the specified nodes. |
| nodes | []string | No | List of AipIds. Used as fallback for both add and delete operations if specific node arrays are not provided. |
| nodesForAdd | []string | No | List of AipIds to add tags to. Takes priority over nodes for add operations. |
| nodesForDelete | []string | No | List of AipIds to remove tags from. Takes priority over nodes for delete operations. |
* At least one of addTags or deleteTags must be provided along with corresponding nodes.
Usage Examples
Add tags to objects
{
"addTags": ["critical", "reviewed"],
"nodes": ["1803", "1804"]
}
Remove tags from objects
{
"deleteTags": ["deprecated"],
"nodes": ["1803", "1804"]
}
Add and remove tags in a single request (same objects)
{
"addTags": ["newTag"],
"deleteTags": ["oldTag"],
"nodes": ["1803", "1804"]
}
Add and remove tags from different objects
{
"addTags": ["tag1", "tag2"],
"nodesForAdd": ["1803", "1804"],
"deleteTags": ["tag3"],
"nodesForDelete": ["1805", "1806"]
}
Responses
application/json
Success Response
When tags are added only:
{
"success": true,
"added": {
"count": 2,
"nodes": ["1803", "1804"]
}
}
When tags are removed only:
{
"success": true,
"deleted": {
"count": 2,
"nodes": ["1803", "1804"]
}
}
When both adding and removing tags:
{
"success": true,
"added": {
"count": 2,
"nodes": ["1803", "1804"]
},
"deleted": {
"count": 1,
"nodes": ["1805"]
}
}
Error Response
{
"code": 2,
"message": "no matching nodes found for tagging",
"status": 400
}
JSON representation
Response
| Property | Type | Description |
|---|---|---|
| success | boolean | Indicates whether the operation was successful. |
| added | structure | Details about the add operation (if tags were added). |
| added.count | integer | Number of nodes that tags were added to. |
| added.nodes | []string | List of AipIds that tags were added to. |
| deleted | structure | Details about the delete operation (if tags were removed). |
| deleted.count | integer | Number of nodes that tags were removed from. |
| deleted.nodes | []string | List of AipIds that tags were removed from. |