We can use the following API call to add/update custom field to VLAN:
To add a new custom field without value
curl -X PUT -u 'u:p' -d "id=1290" -d "custom_field=name&type=number" "https://D42-IP/api/1.0/custom_fields/switch_vlan/" --insecure
where we need to specify the:
VLAN ID as "id=VLAN_ID"
custom field key as "custom_field=key_name"
type as custom field "type" (this is optional, if we ignore the default type will be text)
To add custom field with value
curl -X PUT -u 'u:p' -d "id=1290" -d "custom_field=name" -d "value=value" "https://D42-IP/api/1.0/custom_fields/switch_vlan/" --insecure
Comments
0 comments
Article is closed for comments.