Add Tags
POST/api/v30.00/tags
x-prisma-cloud-target-env: {"permission":"collections","saas":true,"self-hosted":true}
x-public: true
Creates a tag that helps you manage the vulnerabilities in your environment. You can use tags as policy exceptions or assign them to vulnerabilities for action.
Note: ""
(an empty string) is automatically assigned for any unspecified field.
cURL Request
Refer to the following example cURL command that creates a tag named "my-tag":
$ curl -k \
-u <USER> \
-H 'Content-Type: application/json' \
-X POST \
-d \
'{
"name": "my-tag",
"color": "#ff0000",
"description": "A test collection"
}' \
"https://<CONSOLE>/api/v<VERSION>/tags"
Request
- application/json
Body
- Array [
- ]
Color is a hexadecimal representation of color code value
Description is the tag description.
Name is the tag name.
vulns object[]
Vulns are the tagged vulnerabilities.
CheckBaseLayer Indicates whether to also apply the tag for images that has one of the resources as a base layer. Field applies only for images.
Comment is the tag comment.
ID is the vulnerability ID.
PackageName is the package name.
Possible values: [image,host,function,codeRepo,
]
TagType represents the resource type of the tag
Resources is a list of resources the tag is attached on.
Responses
- 200
- default
OK