Adding tags for software components

9.2.14 Available from 9.2.14. You use the POST operation on the api/sam/v2/tags/software_components element to add tags for software components.

Permissions

User You must have the Manage Catalogs permission to use this API.

Resource URL

https://hostname:port/api/sam/v2/tags/software_components?token=token

Resource information

Table 1. Resource information
Operation details Description
HTTP method POST
Request headers
Header
Accept-Language (optional)
Values
en-US (only English is supported)

Negotiates the language of the response. If the header is not specified, the content is returned in the server language.

Request format application/x-www-form-urlencoded
Request payload ids=id_1, id_2, id_3&tags=tag_1, tag_2, tag_3
Response headers
Header
Content-Type
Values
application/json

Specifies the content type of the response.

Header
Content-Language
Values
en-US, …

Specifies the language of the response content. If the header is not specified, the content is returned in the server language.

Response format application/json
Response codes

200 – OK

400 – Bad request

Example conversation - adding tags for the selected software components

Note: The length of a single tag is limited to 254 characters.
Request
POST api/sam/v2/tags/software_components?token=7adc3efb175e2bc0f4484bdd2efca54a8fa04623&ids=1,2,3&tags=tag1,tag2
Host: localhost:9081 
Accept: application/json 
Accept-Language: en-US 
Response
{
  "updated_components": 3
}