Skip to main content

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

Body

    color common.Color

    Color is a hexadecimal representation of color code value

    description string

    Description is the tag description.

    name string

    Name is the tag name.

    vulns object[]

    Vulns are the tagged vulnerabilities.

  • Array [
  • checkBaseLayer boolean

    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 string

    Comment is the tag comment.

    id string

    ID is the vulnerability ID.

    packageName string

    PackageName is the package name.

    resourceType vuln.TagType

    Possible values: [image,host,function,codeRepo,]

    TagType represents the resource type of the tag

    resources string[]

    Resources is a list of resources the tag is attached on.

  • ]

Responses

OK

Loading...