04-06-2016 06:17 AM - edited 03-14-2019 03:56 PM
Hello
I have UCCE 11 and am using Firefox httprequester to test UCCE REST API to update an agent attribute (with the idea to write a Finesse gadget later on).
The GET works ok (basic auth, application/xml, 10.100.206.5 being my AW/HDS/DDS
http://10.100.206.5/unifiedconfig/config/agent/5001
giving all agent details (verified all values against actual the awdb)
When trying a PUT (to change the attribute value from 3 to 4) with
<agent>
<changeStamp>40</changeStamp>
<agentAttributes>
<agentAttribute>
<attribute>
<refURL>/unifiedconfig/config/attribute/5000</refURL>
<name>English</name>
<dataType>4</dataType>
</attribute>
<attributeValue>4</attributeValue>
</agentAttribute>
</agentAttributes>
</agent>
the following is returned
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<apiErrors>
<apiError>
<errorData>changeStamp</errorData>
<errorMessage>Another user has changed this object. Refresh, then try to save again.</errorMessage>
<errorType>invalidInput.changeStamp</errorType>
</apiError>
</apiErrors>
What am I doing wrong ?
Regards
Solved! Go to Solution.
04-07-2016 02:25 AM
I think you need to keep the change number the same as the put.
If the Put does not change anything then the number does not increment.
04-06-2016 06:52 AM
Did you check what is the current changestamp in the database for the record which you are trying to update.
You should pass +1 for that.
And at the same time do we need to put changestamp under attribute tab ?
04-06-2016 07:20 AM
thx for the quick reply
the GET gave 39 so I used 40 for changeStamp
putting changeStamp under attribute tab (or any other location) gives
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<apiErrors>
<apiError>
<errorData>changeStamp</errorData>
<errorMessage>This field is required and cannot be empty.</errorMessage>
<errorType>invalidInput.fieldRequired</errorType>
</apiError>
</apiErrors>
04-07-2016 02:25 AM
I think you need to keep the change number the same as the put.
If the Put does not change anything then the number does not increment.
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide