ALERT: Some images may not load properly within the Knowledge Base Article. If you see a broken image, please right-click and select 'Open image in a new tab'. We apologize for this inconvenience.

How can I use Java Webservices to pull Serial Numbers from Chassis Linecard devices?

book

Article ID: 111764

calendar_today

Updated On:

Products

CA Spectrum

Issue/Introduction

How can I use Java Webservices (REST API) to pull Serial Numbers from Chassis Linecard devices?

Environment

Any Spectrum version
 

Resolution

From a Java Webservices POST we can use the model class of 18 (component) to get the serial number attribute for each of the Linecards that show up in Chassis Manager.

The URL is

http://<OneClick_Server>:<port>/spectrum/restful/models

The XML body is

<?xml version="1.0" encoding="UTF-8"?>
<!--


CA Technologies, Inc.
One CA Plaza
Islandia, NY 11749 USA

Copyright (c) 2012 CA Technologies, Inc.
All rights reserved.

IN NO EVENT SHALL CA TECHNOLOGIES INCORPORATED BE LIABLE FOR
ANY INCIDENTAL, INDIRECT, SPECIAL, OR CONSEQUENTIAL DAMAGES
WHATSOEVER (INCLUDING BUT NOT LIMITED TO LOST PROFITS) ARISING OUT
OF OR RELATED TO THIS SOFTWARE, EVEN IF CA TECHNOLOGIES INCORPORATED
HAS BEEN ADVISED OF, KNOWN, OR SHOULD HAVE KNOWN, THE POSSIBILITY OF
SUCH DAMAGES.


-->

<rs:model-request throttlesize="5000"
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:target-models>
<rs:models-search>
<rs:search-criteria
xmlns="http://www.ca.com/spectrum/restful/schema/filter">
<filtered-models>
<equals>
<model-class>18</model-class>
</equals>
</filtered-models>
</rs:search-criteria>
</rs:models-search>
</rs:target-models>

<rs:requested-attribute id="0x10030" /> <!-- Serial Number -->


</rs:model-request>
 

Additional Information

Please reference the "POST models (GET Tunneling)" section of the documentation for more information.