search cancel

How to update a models V1 or V2 Community String to a V3 Community String in Spectrum using the API


Article ID: 255026


Updated On:


CA Spectrum DX NetOps


Customer is configuring devices with v3 community strings. These devices are already modeled in the Spectrum database using v2 community string.

How to update the community string from v2 to v3 using the API.


Release : Any


The following knowledge article and doc reference gives some good information on how v3 community strings are used in Spectrum:

Using this information, if you want to update the community string on a device and the community string configuration in Spectrum is "#v3/P:authpassword:privpassword/level3", then the following curl command would be used:

curl -X 'PUT' \
  'https://spectrum1:8443/spectrum/restful/model/0x10035fb?attr=0x10024&val=%23v3%2FP%3Aauthpassword%3Aprivpassword%2Flevel3' \
  -H 'accept: application/xml; charset=UTF-8'

In the above curl command, 0x10035fb is the model handle of the model and 0x10024 is the attribute id of  the Community_Name attribute of the model.

There are some special characters in the community name format for Spectrum. For example, #, /, and :. These have to be converted to the HTML URL-encoding. Reference