Get Tags
x-prisma-cloud-target-env: {"permission":"collections","saas":true,"self-hosted":true}
x-public: true
Retrieves a list of tags.
cURL Request
Refer to the following example cURL command that retrieves a list of tags:
$ curl -k \
-u <USER> \
-H 'Content-Type: application/json' \
-X GET \
"https://<CONSOLE>/api/v<VERSION>/tags"
A successful response returns a list of defined tags.
- 200
- default
- application/json
- Schema
- Example (from schema)
Schema
- Array [
- 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(Applies only to the resource type 'image') Checks whether the base layer in an image is the resource image.
comment stringAdds a comment.
id stringSpecifies the Common Vulnerability and Exposures (CVE) ID.
packageName stringSpecifies the source or the binary package name where the vulnerability is found. Use the source package name for tagging if only source package exists. Use the wildcard
*
for tagging all the packages.resourceType vuln.TagTypePossible values: [
image,host,function,codeRepo,
]TagType specifies the resource type for tagging where the vulnerability is found. Use the wildcard
*
to apply the tag to all the resource types where the vulnerability is foundresources string[](Required when you define the resource type) Specifies the resources for tagging where the vulnerability is found. Either specify the resource names separated by a comma or use the wildcard
*
to apply the tag to all the resources where the vulnerability is found.]- ]
[
{
"color": "string",
"description": "string",
"name": "string",
"vulns": [
{
"checkBaseLayer": true,
"comment": "string",
"id": "string",
"packageName": "string",
"resourceType": [
"image",
"host",
"function",
"codeRepo",
""
],
"resources": [
"string"
]
}
]
}
]