Setting custom attributes using REST and getting both a 200 OK and a <failure/> message
search cancel

Setting custom attributes using REST and getting both a 200 OK and a <failure/> message

book

Article ID: 412599

calendar_today

Updated On:

Products

Network Observability CA Performance Management

Issue/Introduction

We have some custom attributes in our environment and we are using a REST call to set the values:

E.G.

curl -kv -u admin -X PUT -H 'Content-type: application/xml' -d "<DeviceCustomAttributes version='1.0.0'><MyCustomAttribute>NewValue</MyCustomAttribute></DeviceCustomAttributes>" http://DA:8581/rest/devices/customattributes/12228135



Enter host password for user 'admin':

> Accept: */*

> Content-type: application/xml

> Content-Length: 93

>

* upload completely sent off: 93 out of 93 bytes

< HTTP/1.1 200 OK

 

* Connection #0 to host DA left intact

<failure />[root@HOST]#

Environment

 DX NetOps :: All Supported Versions

Cause

The REST call and connection was successful, so we get the 200 OK

But

The PUT/UPDATE failed, in this case due to a bad itemid, so we get the <failure/>

Resolution

Verify the correct itemid for the device