Assign Tags to an Asset

Assigns one or more tags to an image or a container.

POST/csapi/v1.3/tag/assign

Input ParametersInput Parameters

Parameter Mandatory/Optional Data Type Description
entityUUID Mandatory string Specify the UUID of the asset.
tagsToAdd Mandatory string Specify details of the tags to be assigned to an asset.
tagUuid  Mandatory string Specify the UUID of the tag to be assigned.
isCascadeToContainer
 
Mandatory boolean

Specify whether to apply an image tag to the container spawned using that image.
Valid values: "true" or "false"

  • true = The image tag gets applied to the container spawned using that image.
  • false = The image tag doesn’t get applied to the container spawned using that image.
subscriptionId Optional string Specify the Subscription ID of the user.
entityType Mandatory string Specify the type of entity to which you want to assign a tag.
Valid values: 'IMAGE' or 'CONTAINER'
moduleCode   Optional string Specify Qualys module code.
Valid value: "CS"

Sample: Assign a tag to an image in your accountSample: Assign a tag to an image in your account

API Request

curl -X "POST"
"<qualys_base_url>/csapi/v1.3/tag/assign"
-H "accept: application/json"
-H "Authorization: Bearer <token>"
-H "Content-Type: application/json"
-d "{
"entityUUID": "string",
"tagsToAdd": [
{
"tagUuid": "string",
"isCascadeToContainer": true }
],
"subscriptionId": "string",
"entityType": "IMAGE / CONTAINER",
"moduleCode": "string"
}

Response

{
"entityUUID": "5344c653-2472-3727-8397-3163d97ce6cb",
"cascadingKafkaJobUuid": "dfb4c607-e549-4bc9-8652-a15299e27111"
}

Sample: Assign multiple tags to an image in your accountSample: Assign multiple tags to an image in your account

API Request

curl -X "POST" 
"<qualys_base_url>/csapi/v1.3/tag/assign" 
-H "accept: application/json" 
-H "Authorization: Bearer <token>" 
-H "Content-Type: application/json" 
-d "{
"entityUUID": "string",
"tagsToAdd": [
{
"tagUuid": "string",
"isCascadeToContainer": true }
{
"tagUuid": "string",
"isCascadeToContainer": true }
],
"subscriptionId": "string",
"entityType": "IMAGE / CONTAINER",
"moduleCode": "string"
}

Response

{
"entityUUID": "5344c653-2472-3727-8397-3163d97ce6cb",
"cascadingKafkaJobUuid": "dfb4c607-e549-4bc9-8652-a15299e27111"
}