Create Tag
Creates a tag. To invoke this operation, you need the create tag privilege on the input category.
Request
URLURL
https://{api_host}/rest/com/vmware/cis/tagging/tag
Header Parameters
Header Parameters
string
vmware-api-session-id
Required
Required session ID, acquired from Create Session API under CIS product
vmware-api-session-id Example
b00db39f948d13ea1e59b4d6fce56389
Request Body
Request Body
TaggingTagCreateRequestBody of type application/json (required){
"create_spec": {
"category_id": "string",
"description": "string",
"name": "string"
}
}
Response
Response
Response BodyResponse Body
200 OK returns
TaggingTagCreateResponseBody
of type application/json
The identifier of the created tag. The result will be an identifier for the resource type: com.vmware.cis.tagging.Tag.
{
"value": "string"
}
string
value
Optional
The identifier of the created tag. The result will be an identifier for the resource type: com.vmware.cis.tagging.Tag.
cURL Command
curl -X POST -H "vmware-api-session-id: b00db39f948d13ea1e59b4d6fce56389" -H "Content-Type: application/json" -d '{"create_spec":{"category_id":"string","description":"string","name":"string","tag_id":"string"}}' https://{api_host}/rest/com/vmware/cis/tagging/tag
Errors
400
com.vmware.vapi.std.errors.already_exists : if the Tag.CreateSpec.name provided in the createSpec is the name of an already existing tag in the input category. | com.vmware.vapi.std.errors.invalid_argument : if any of the input information in the createSpec is invalid.
403
com.vmware.vapi.std.errors.unauthorized : if you do not have the privilege to create tag.
404
com.vmware.vapi.std.errors.not_found : if the category for in the given createSpec does not exist in the system.
default
'Default' means this response is used for all HTTP codes that are not covered individually for this operation.
On This Page
Tag Operations
get
post
get
patch
delete
post
post