Skip to content

NOTE

OData query options are not implemented in iLO 4. Refer to the Adapting from iLO 4 section for OData query options examples related to iLO 5.

Non implemented OData query options are silently discarded by Redfish services.

Redfish is an OData-derived protocol with resources linking to other resources using @odata.id:

{"@odata.id": "/redfish/v1/link_to_some_other_resource"}

The iLO Redfish implementation offers several OData services aiming at facilitating the consumption of data by Redfish clients.

As an example, the OData $expand query option causes the OData service to automatically replace a link with the results of an internal GET of the indicated URI. This is essential to allow the API to scale for clients. An example use case is to expand an event log to return the log entries inline with the collection and reduce the number of GETs required by the client.

Examples of client requests to expand (in the general OData case) looks like:

  • GET /redfish/v1/some_resource?$expand=*($levels=1) - Expand any references 1 level. Levels is assumed to be 1 by default so this is the same as GET /redfish/v1/some_resource?$expand=*
  • GET /redfish/v1/some_resource?$expand=*($levels=3) - Expand any references 3 levels deep. This case could require loop detection (For example, system expanding a link to chassis expanding a link back to system).
  • GET /redfish/v1/some_resource?$expand=. - Expand any references EXCEPT those found under the Links section.
  • GET /redfish/v1/some_resource?$expand=./Oem/Hpe - Expand any references found in the Oem/Hpe section of the resource.

OData query options supported by iLO are presented below along with use case examples.

iLO $expand

Using the rules above, iLO supports $expand in this way:

$expand is applicable to HTTP GET only.

$expand=., $expand=* and $expand=($levels=n) result in the same behavior:

  • Expands all links in both root and Oem/Hpe sections not inside the Links sections.
  • Levels is always interpreted as 1, regardless of n. This is to avoid the potential for expanding recursively for interlinked resources.
  • The Links section is never expanded. This is to avoid expanding the Chassis and Manager related links on GET operations to System.
NOTE

The root resource at /redfish/v1/ is available without authentication and has navigational links that can be expanded. An $expand request does not result in expansion unless valid authentication credentials are supplied.

Warning

There might be other links that do not support $expand.

iLO $expand examples

NOTE

iLO responds to all HTTP requests using Chunked Transfer Coding. This enables features like $expand that require very large responses.

The following example retrieves the ChassisCollection without the $expand query option:

GET /redfish/v1/Chassis/

The next example retrieves the same ChassisCollection with the $expand=. query option:

GET /redfish/v1/Chassis/?$expand=.

iLO "only" query option

iLO supports the only query parameter documented in the Redfish API specification. This query parameter is ignored except on collections with only one member. Examples include the ComputerSystemCollection, ChassisCollection and ManagerCollection.

iLO "only" example

The following example retrieves the chassis collection without the only query option.

GET /redfish/v1/Chassis/

The following example retrieves the a chassis collection of a system with only one chassis, using the only query option.

GET /redfish/v1/Chassis/?only

The following example uses the only query option to retrieve the chassis collection of a system containing a Pensando Data Processor Unit (DPU).

GET /redfish/v1/Chassis/?only

iLO $filter query option

The odata.org official site defines the $filter query as the following:

"The $filter system query option allows clients to filter a collection of resources that are addressed by a request URL. The expression specified with $filter is evaluated for each resource in the collection, and only items where the expression evaluates to true are included in the response.".

Six logical operators (Equals, Not Equals, Greater Than...) can be applied to the $filter query. They are defined in the OData specifications.

iLO $filter examples

The following example retrieves the "iLO Dedicated Network Interface" properties (output abbreviated).

GET /redfish/v1/Managers/1/EthernetInterfaces/?$filter=Name eq
'Manager Dedicated Network Interface'

The next example retrieves only Integrated Management Log (IML) entries with severity Repaired.

GET /redfish/v1/Systems/1/LogServices/IML/Entries/?$filter=Oem.Hpe.Severity
eq 'Repaired'

The following example retrieves IML entries created after a specific date.

GET /redfish/v1/Systems/1/LogServices/IML/Entries/?$filter=Created
gt '2022-10-04T06:19:22Z'` 

iLO $count query option

The $count system query option allows Redfish clients to request a count of the matching resources included with the resources in the response.

iLO $count example

/redfish/v1/systems/1/logservices/SL/Entries/?$count=true

iLO $top and $skip query options

The $top system query option requests the number of items in the queried collection to be included in the result. The $skip query option requests the number of items in the queried collection that are to be skipped and not included in the result.

iLO $top and $skip examples

Retrieve the top (first) ten IML log entries:

GET /redfish/v1/Systems/1/LogServices/IML/Entries/?$top=10

The request below returns IML entries starting at the 22th record (the Members@odata.count is 31).

 GET /redfish/v1/Systems/1/LogServices/IML/Entries/?$skip=21

iLO $select query option

The $select query option allows Redfish clients to requests a limited set of properties.

iLO $select examples

The following example retrieves the RedfishVersion property of an iLO based server.

GET /redfish/v1/?$select=RedfishVersion

The following example returns the ChassisType and ServiceLabel properties of a Data Processor Unit card.

GET /redfish/v1/Chassis/2/?$select=ChassisType,Location/PartLocation/ServiceLabel