Start a Conversation

Unsolved

This post is more than 5 years old

1452

July 12th, 2016 07:00

Need help filtering a REST query

I'm trying to construct a REST query to get a list of devices that have a GlobalStatus of 'Warning' or 'Critical'

When I send the following query:

https://base_URI/Devices?GlobalStatus=16

It does work correctly, listing all of the devices in 'critical' status. When I try:

https://base_URI/Devices?GlobalStatus>4 

I get an error. (i've tryed several variations that I've seen in other REST APIs, such as 'GT4', GREATERTHAN4, even !=4)

I know I could just do two queries, for GlobalStatus=8 and GlobalStatus=16 but I would prefer to do a single query.

Also, is there a way to just return specific fields in the result set?

Thanks in advance.

July 13th, 2016 01:00

Sorry I overread that you were trying to do merge of the warnings and criticals in one query, I don't think that is actually possible. The API userguide also does not list this.

http://downloads.dell.com/manuals/all-products/esuprt_software/esuprt_ent_sys_mgmt/esuprt_ent_sys_mgmt_opnmng_essentials/dell-openmanage-essentials-v2.2_reference%20guide2_en-us.pdf

You are only able to get a specific field for one specific device like this https://ome.demo.lan:2607/api/OME.svc/Devices/76/NIC 

July 13th, 2016 01:00

It is working for me with the latest version of OME (v2.2) with this URl https://ome.demo.lan:2607/api/OME.svc/Devices?GlobalStatus=4

No Events found!

Top