Command line odata query to report against a group
search cancel

Command line odata query to report against a group


Article ID: 139966


Updated On:


CA Infrastructure Management CA Performance Management - Usage and Administration


How can I use curl to run an odata query that reports against a group?


CAPM 3.x


You can run the following query:

curl -v -u 'admin:admin' 'http://<DA>:8581/odata/api/devices?$expand=devicepollingstatisticsmfs&$select=ID,Name,devicepollingstatisticsmfs/ID,devicepollingstatisticsmfs/im_NumSuccessfulPolls,devicepollingstatisticsmfs/im_NumPollsSent&$filter=((groups/Name%20eq%20%27test%27))'

... where "test" is my group name.  The output will only report against the items in the test group and nothing else

Additional Information


  1. Use query builder, to help you construct correct queries.  Also, when you copy a query from QueryBuilder use copy button instead just copying the query from the screen to avoid garbage characters
  2. The expand operator will return  you data only for one hour, by default, or if you select more using starttime endtime, it will return you the first 100 for each device