search cancel

Automate export Locater search

book

Article ID: 200363

calendar_today

Updated On:

Products

CA Spectrum DX NetOps

Issue/Introduction

We want to automate the export to csv the Locator search "All Devices". 
We would like, per example, once a month this search is launched by the scheduler and it creates a csv file, and we´ll haven´t to do manually from OneClick. Is it possible? 

Environment

Release : 10.4.x, 21.2.x

Component : Spectrum 

Resolution

The only suggestion is using the RESTful Web Services to get the list of "All Devices" and then a developer can automate it.



Query all Devices in the distributed environment retrieving the attributes 0x1006e and 0x10001

HTTP GET

http://{host}:{port}/spectrum/restful/devices?attr=0x1006e&attr=0x10001

Where:
0x1006e is the Model_Name
0x10001 is the ModelType_Handle
host is the OneClick web server name
port is the OneClick web server port

http://{host}:{port}/spectrum/restful/devices?attr=0x1006e&attr=0x10001&attr=0x23000e&attr=0x12d80

You can add any model attribute in the above RESTful query:
Example:
0x23000e is the DeviceType
0x12d80 is the PrimaryAddress



Read all Devices in the distributed environment retrieving the attributes 0x1006e and 0x10001 and returning only 4 devices at a time

http://{host}:{port}/spectrum/restful/devices?attr=0x1006e&attr=0x10001&throttlesize=4