devices

Contents
casp102
Contents
Use the Devices resource to retrieve
CA Spectrum
devices and attribute information.
A
device
is defined as all models returned by the
SpectroSERVER
action FIND_ALL_DEVICE_MODELS (0x1023a).
  • Base URL
    http://<hostname><:portnumber>/spectrum/restful/devices
GET devices
GET devices returns all device model handles. You can retrieve specific model attributes by using the &attr=<
attr_id
> parameter.
  • URL
    http://<hostname><:portnumber>/spectrum/restful/devices[?attr=<attr_ID>][&landscape=<landscape_handle>][&throttlesize=<num>]
  • HTTP Method
    GET
  • Body
    None
  • Body Content
    Not Used
  • Header
    application/xml, application/json
  • Output
    XML or JSON listing all device model handles and requested attributes in the
    SpectroSERVER
    or distributed
    SpectroSERVER
URL Parameters
  • &attr=<
    attr_ID
    >
    (Optional) Specifies the requested attributes. Multiple attribute parameters can be specified.
    There are many attributes on a model; for best performance you should limit attribute selection to attributes of interest.
  • &landscape=<
    landscape_handle
    >
    (Optional) Filters which landscapes are queried. Multiple landscape parameters can be specified.
  • &throttlesize=<
    num
    >
    (Optional) Specifies a throttle size.
Example
The following URL requests the name and model type of all devices:
http://<hostname><:portnumber>/spectrum/restful/devices?attr=0x1006e&attr=0x10000
The following is returned for the request:
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?> - <model-response-list xmlns="http://www.ca.com/spectrum/restful/schema/response" error="EndOfResults" throttle="5" total-models="5"> - <model-responses> - <model mh="0x1800178"> <attribute id="0x1006e">ciscoRPM-9.18.ca.com</attribute> <attribute id="0x10000">Rtr_Cisco</attribute> </model> - <model mh="0x1800351"> <attribute id="0x1006e">Rtr7301IPT_248</attribute> <attribute id="0x10000">Rtr_Cisco</attribute> </model> - <model mh="0x1800082"> <attribute id="0x1006e">jun2300-96.17</attribute> <attribute id="0x10000">JuniperJUNOSRtr</attribute> </model> - <model mh="0x1800062"> <attribute id="0x1006e">junM7i-96.20</attribute> <attribute id="0x10000">JuniperJUNOSRtr</attribute> </model> - <model mh="0x18002fb"> <attribute id="0x1006e">AdminActive</attribute> <attribute id="0x10000">HPBladeOnboardAdmin</attribute> </model> </model-responses> </model-response-list>