Getting error when trying to set a value in Spectrum using curl

Document ID : KB000005716
Last Modified Date : 14/02/2018
Show Technical Document Details
Issue:

Getting the following error when trying to set a value in Spectrum using curl:

[spectrum@spectrum ~]$ /usr/bin/curl -X PUT -u spectrum:spectrum http://spectrum:8080/spectrum/restful/model/0x100060?attr=0x67600d9&val=2

[1] 64320

[spectrum@spectrum ~]$ attr and val parameters are not proportionate

Environment:
Linux
Resolution:

The resolution is to enclose the http in double quotes:

 

[spectrum@spectrum ~]$ /usr/bin/curl -X PUT -u spectrum:spectrum "http://spectrum:8080/spectrum/restful/model/0x100060?attr=0x67600d9&val=2"

<?xml version="1.0" encoding="UTF-8" standalone="yes"?><model-update-response-list xmlns="http://www.ca.com/spectrum/restful/schema/response"><model-responses><model error="Success" mh="0x100060"><attribute error="Success" id="0x67600d9"/></model></model-responses></model-update-response-list>[spectrum@aspectrum ~]