REST API - Create Event with varbind values as integer
search cancel

REST API - Create Event with varbind values as integer

book

Article ID: 130230

calendar_today

Updated On:

Products

CA Spectrum DX NetOps

Issue/Introduction

We are trying to generate an event via REST and passing varbind values.
However, integer values are not being passed unless specified as a string data type.
This does not allow the value to be used in calculations such as event conditions.

Environment

Release: 10.4, 21.2, 22.2 

Resolution

This has been resolved and delivered in the Spectrum 10.4.1 release. You have to explicitly specify the data type: type="Integer" in the RESTful API.

Additional Information

Please make the following changes (in green) in the RESTful payload:

<rs:event-request throttlesize="10"
  xmlns:rs="http://www.ca.com/spectrum/restful/schema/request"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://www.ca.com/spectrum/restful/schema/request ../../..
  /xsd/Request.xsd">
<rs:event>  
<rs:target-models>
<rs:model mh="0x100987"/> 
</rs:target-models>  
<rs:event-type id="0x01169095"/>
<rs:varbind id="0" type="Integer" >0</rs:varbind>
<rs:varbind id="1" type="Integer" >1</rs:varbind>
<rs:varbind id="2" type="Integer" >2</rs:varbind>
<rs:varbind id="3" type="Integer" >3</rs:varbind>
<rs:varbind id="4">Fuenf</rs:varbind>
<rs:varbind id="5">Sechs</rs:varbind>
</rs:event>
</rs:event-request> 

Attachments