API HTTP - Assign Label on Host Problem

Hi,

I’ve recently installed CheckMK 1.6p14 with two node. One master and two slave “Wato_Distribuito”.

My host “Asset3” assigned to label “WEB_IIS:81”. I would like to assign another label “Site:80”.

Pre_Modify

Using the string below I add the new label.

`

curl “htps//checkmk/cmk/check_mk/webapi.py?action=edit_host&_username=automation&_secret=mypassword” -d ‘request={“hostname”:“ASSET3”, “attributes”:{“labels”: {“Site”:“80”}}}’

`

Post_Modify

There is a way to add labels without removing those already assigned?.

Thx
Dario.

Get all the labels on the host you want to modify, extend the “labels” dictionary and set all labels with one request.