Skip to main content

Resources and Properties

This section describes the resources and properties of REST interfaces based on the DMTF standard schema files and OEM schema files provided by Lenovo. In the subsection Resource Summary, it lists out the number of resources, resource path, and referred schema file. Another subsection Property Values provides the definition of each URI includes property values, actions and other REST operations.

If REST encounters an error and cannot complete the request, it will return “500 Internal Server Error”.

When the response is not ready after receiving request more than 120 seconds, REST returns “503 Service Temporarily Unavailable”.

If there are more than one requests to the same schema resources, they will be handled one by one, i.e., the second request will be handled after the first request is done. For example, if there are two requests to the MetricReport resources, the first request accesses the PowerMetrics and the second request accesses the CPUTemp, the request to the CPUTemp will wait the request to the PowerMetrics is done so the response time of CPUTemp in the case is longer than only one request to the CPUTemp.

PATCH

For REST update (PATCH), REST will firstly check if all the input properties/values match the schema definition. If there is any input property/value that is incorrect, REST will not do any update and will return error (400 Bad Request). If any of the input property is read-only or not implemented, the value of this property will not be changed. For one property value requires further validation, more details are described in the “Comment” column for the property, otherwise it will be directly passed to the data source. REST will directly return an error when there is any failure to update the data source. If there are any errors happen during the operations, REST will not revert updates that have been already made.

Below is the error mapping table for HTTP status code and Message ID:

PATCH Body ERROR

HTTP Status Code

Messageld (Base)

Comment

Empty

400 (Bad Request)

EmptyJSON

 

Wrong Json format

400 (Bad Request)

MalformedJSON

 

Only unknown properties

400 (Bad Request)

PropertyUnknown

 

Invalid value type

400 (Bad Request)

PropertyValueTypeError

 

Invalid value range/format

400 (Bad Request)

PropertyValueFormatError

 

Invalid Enum value

400 (Bad Request)

PropertyValueNotInList

 

Only read-only or not implemented properties

400 (Bad Request)

PropertyNotWritable

 

Valid writable properties together with read-only or not implemented properties

200 (OK)

PropertyNotWritable

ExtendedInfo will be added for read-only properties in the response.

Valid writable properties together with unknown properties

200 (OK)

PropertyUnknown

ExtendedInfo will be added for unknown properties in the response.

None content error

500 (Internal Server Error)

GeneralError

For example, API call failure.

Odata annotation

  

This is ignored. Any property matches the pattern “@odata.” Is also treated as an Odata annotation.

Only Odata annotation

400 (Bad Request)

 

ExtendedInfo will be added for NoOperation in the response.

When PATCH the other resources and the HTTP status code is 400 Bad Request, the response only includes the first incorrect property that is checked by Redfish service.

Collection

All implemented collection resources and their properties shall conform to the DSP 0266 and the collection schema, e.g., their URIs shall conform to the “Redfish.Uris” of CSDL schema. In this document, all implemented collection resources are not described unless the implemented collection resource needs some comments.

If user wants to access a collection member resource, user needs to access its collection resource first to check if the resource exists or not. Otherwise, the resource cannot be accessed or the data of the resource may be invalid.

Odata annotation properties

All implemented Odata annotation properties shall conform to the DSP 0266. In this document, all implemented Odata annotation properties are not described specifically unless the implemented property needs some additional comments.