A filter
parameter can be URL-encoded into an endpoint to match objects with member values that evaluate to true, given the specified comparison to a fixed value.
Example Requests
The following example requests show how the filter
parameter is used to filter which Events are to be returned from the Stream endpoint. Note that the filter
parameter can be applied similarly to all domain objects in Octave's REST API (e.g., Devices, Events, etc.).
Description | Endpoint |
---|---|
Find all Events in a given Stream where the element aNumber has a value less than or equal to 1: | curl 'https://octave-api.sierrawireless.io/v5.0/<company_name>/stream' -d 'filter=elems.aNumber<=1' |
Find all Events in a given Stream where the element shipped is false: | curl 'https://octave-api.sierrawireless.io/v5.0/<company_name>/stream' -d 'filter=elems.shipped!=true' |
Find all Streams where the description is equal to myFirstStream : | curl 'https://octave-api.sierrawireless.io/v5.0/<company_name>/stream' -d 'filter=description=="myFirstStream"' |