Post by puwen on Oct 23, 2024 8:15:33 GMT
Hi,
Since the specification does not provide any examples of excerpt, here is the expected behavior I have in mind.
Please help review whether my usage is correct.
My resources:
URL: /redfish/v1/Chassis/Fan_Board/Sensors
{
"@odata.id": "/redfish/v1/Chassis/Fan_Board/Sensors",
"@odata.type": "#SensorCollection.SensorCollection",
"Description": "Collection of Sensors for this Chassis",
"Members": [
{
"@odata.id": "/redfish/v1/Chassis/Fan_Board/Sensors/Fan_1A"
}
],
"Members@odata.count": 1,
"Name": "Sensors"
}
URL: /redfish/v1/Chassis/Fan_Board/Sensors/Fan_1A
{
"@odata.id": "/redfish/v1/Chassis/Fan_Board/Sensors/Fan_1A",
"@odata.type": "#Sensor.v1_2_0.Sensor",
"Id": "Fan_1A",
"Name": "Fan 1A",
"Reading": 8402.0,
"ReadingRangeMax": 25000.0,
"ReadingRangeMin": 0.0,
"ReadingType": "Rotational",
"ReadingUnits": "RPM",
"Status": {
"Health": "OK",
"State": "Enabled"
},
"Thresholds": {
"LowerCaution": {
"Reading": 1000.0
},
"LowerCritical": {
"Reading": 600.0
},
"UpperCaution": {
"Reading": null
},
"UpperCritical": {
"Reading": null
}
}
}
Usage 1: /redfish/v1/Chassis/Fan_Board/Sensors/Fan_1A?excerpt
{
"Reading": 8402.0
}
Usage 2: /redfish/v1/Chassis/Fan_Board/Sensors/Fan_1A?excerpt=Sensor
{
"Reading": 8402.0
}
Usage 3: /redfish/v1/Chassis/Fan_Board/Sensors/Fan_1A?excerpt=SensorPower
{
}
Usage 4: /redfish/v1/Chassis/Fan_Board/Sensors?$expand=*&excerpt
{
"@odata.id": "/redfish/v1/Chassis/Fan_Board/Sensors",
"@odata.type": "#SensorCollection.SensorCollection",
"Description": "Collection of Sensors for this Chassis",
"Members": [
{
"@odata.id": "/redfish/v1/Chassis/Fan_Board/Sensors/Fan_1A",
"@odata.type": "#Sensor.v1_2_0.Sensor",
"Id": "Fan_1A",
"Name": "Fan 1A",
"Reading": 8402.0,
"ReadingRangeMax": 25000.0,
"ReadingRangeMin": 0.0,
"ReadingType": "Rotational",
"ReadingUnits": "RPM",
"Status": {
"Health": "OK",
"State": "Enabled"
},
"Thresholds": {
"LowerCaution": {
"Reading": 1000.0
},
"LowerCritical": {
"Reading": 600.0
},
"UpperCaution": {
"Reading": null
},
"UpperCritical": {
"Reading": null
}
}
}
],
"Members@odata.count": 1,
"Name": "Sensors"
}
Thanks.
BR,
Puwen