xref: /openbmc/bmcweb/features/redfish/schema/dmtf/json-schema/BatteryMetrics.v1_1_0.json (revision 5ecf7b4e1bb6988dd3403fa80b723afbe2be30ae)
1*5ecf7b4eSGunnar Mills{
2*5ecf7b4eSGunnar Mills    "$id": "http://redfish.dmtf.org/schemas/v1/BatteryMetrics.v1_1_0.json",
3*5ecf7b4eSGunnar Mills    "$ref": "#/definitions/BatteryMetrics",
4*5ecf7b4eSGunnar Mills    "$schema": "http://redfish.dmtf.org/schemas/v1/redfish-schema-v1.json",
5*5ecf7b4eSGunnar Mills    "copyright": "Copyright 2014-2025 DMTF. For the full DMTF copyright policy, see http://www.dmtf.org/about/policies/copyright",
6*5ecf7b4eSGunnar Mills    "definitions": {
7*5ecf7b4eSGunnar Mills        "Actions": {
8*5ecf7b4eSGunnar Mills            "additionalProperties": false,
9*5ecf7b4eSGunnar Mills            "description": "The available actions for this resource.",
10*5ecf7b4eSGunnar Mills            "longDescription": "This type shall contain the available actions for this resource.",
11*5ecf7b4eSGunnar Mills            "patternProperties": {
12*5ecf7b4eSGunnar Mills                "^([a-zA-Z_][a-zA-Z0-9_]*)?@(odata|Redfish|Message)\\.[a-zA-Z_][a-zA-Z0-9_]*$": {
13*5ecf7b4eSGunnar Mills                    "description": "This property shall specify a valid odata or Redfish property.",
14*5ecf7b4eSGunnar Mills                    "type": [
15*5ecf7b4eSGunnar Mills                        "array",
16*5ecf7b4eSGunnar Mills                        "boolean",
17*5ecf7b4eSGunnar Mills                        "integer",
18*5ecf7b4eSGunnar Mills                        "number",
19*5ecf7b4eSGunnar Mills                        "null",
20*5ecf7b4eSGunnar Mills                        "object",
21*5ecf7b4eSGunnar Mills                        "string"
22*5ecf7b4eSGunnar Mills                    ]
23*5ecf7b4eSGunnar Mills                }
24*5ecf7b4eSGunnar Mills            },
25*5ecf7b4eSGunnar Mills            "properties": {
26*5ecf7b4eSGunnar Mills                "Oem": {
27*5ecf7b4eSGunnar Mills                    "$ref": "#/definitions/OemActions",
28*5ecf7b4eSGunnar Mills                    "description": "The available OEM-specific actions for this resource.",
29*5ecf7b4eSGunnar Mills                    "longDescription": "This property shall contain the available OEM-specific actions for this resource."
30*5ecf7b4eSGunnar Mills                }
31*5ecf7b4eSGunnar Mills            },
32*5ecf7b4eSGunnar Mills            "type": "object"
33*5ecf7b4eSGunnar Mills        },
34*5ecf7b4eSGunnar Mills        "BatteryMetrics": {
35*5ecf7b4eSGunnar Mills            "additionalProperties": false,
36*5ecf7b4eSGunnar Mills            "description": "The `BatteryMetrics` schema contains definitions for the metrics of a battery unit.",
37*5ecf7b4eSGunnar Mills            "longDescription": "This resource shall be used to represent the metrics of a battery unit for a Redfish implementation.",
38*5ecf7b4eSGunnar Mills            "patternProperties": {
39*5ecf7b4eSGunnar Mills                "^([a-zA-Z_][a-zA-Z0-9_]*)?@(odata|Redfish|Message)\\.[a-zA-Z_][a-zA-Z0-9_]*$": {
40*5ecf7b4eSGunnar Mills                    "description": "This property shall specify a valid odata or Redfish property.",
41*5ecf7b4eSGunnar Mills                    "type": [
42*5ecf7b4eSGunnar Mills                        "array",
43*5ecf7b4eSGunnar Mills                        "boolean",
44*5ecf7b4eSGunnar Mills                        "integer",
45*5ecf7b4eSGunnar Mills                        "number",
46*5ecf7b4eSGunnar Mills                        "null",
47*5ecf7b4eSGunnar Mills                        "object",
48*5ecf7b4eSGunnar Mills                        "string"
49*5ecf7b4eSGunnar Mills                    ]
50*5ecf7b4eSGunnar Mills                }
51*5ecf7b4eSGunnar Mills            },
52*5ecf7b4eSGunnar Mills            "properties": {
53*5ecf7b4eSGunnar Mills                "@odata.context": {
54*5ecf7b4eSGunnar Mills                    "$ref": "http://redfish.dmtf.org/schemas/v1/odata-v4.json#/definitions/context"
55*5ecf7b4eSGunnar Mills                },
56*5ecf7b4eSGunnar Mills                "@odata.etag": {
57*5ecf7b4eSGunnar Mills                    "$ref": "http://redfish.dmtf.org/schemas/v1/odata-v4.json#/definitions/etag"
58*5ecf7b4eSGunnar Mills                },
59*5ecf7b4eSGunnar Mills                "@odata.id": {
60*5ecf7b4eSGunnar Mills                    "$ref": "http://redfish.dmtf.org/schemas/v1/odata-v4.json#/definitions/id"
61*5ecf7b4eSGunnar Mills                },
62*5ecf7b4eSGunnar Mills                "@odata.type": {
63*5ecf7b4eSGunnar Mills                    "$ref": "http://redfish.dmtf.org/schemas/v1/odata-v4.json#/definitions/type"
64*5ecf7b4eSGunnar Mills                },
65*5ecf7b4eSGunnar Mills                "Actions": {
66*5ecf7b4eSGunnar Mills                    "$ref": "#/definitions/Actions",
67*5ecf7b4eSGunnar Mills                    "description": "The available actions for this resource.",
68*5ecf7b4eSGunnar Mills                    "longDescription": "This property shall contain the available actions for this resource."
69*5ecf7b4eSGunnar Mills                },
70*5ecf7b4eSGunnar Mills                "CRate": {
71*5ecf7b4eSGunnar Mills                    "description": "The rate at which the battery is charging or discharging, based on current in ampere units, relative to its rated maximum capacity in ampere-hour units.  For example, `0.5` indicates it takes two hours to charge or discharge the battery based upon the current charge rate and capacity.",
72*5ecf7b4eSGunnar Mills                    "longDescription": "This property shall contain the rate at which the battery is charging or discharging, based on current in ampere units, relative to its rated maximum capacity in ampere-hour units.  If the battery is discharging, services shall calculate the value as `SUM(OutputCurrentAmps) / CapacityRatedAmpHours`.  Otherwise, services shall calculate the value as `InputCurrentAmps / CapacityRatedAmpHours`.",
73*5ecf7b4eSGunnar Mills                    "minimum": 0,
74*5ecf7b4eSGunnar Mills                    "readonly": true,
75*5ecf7b4eSGunnar Mills                    "type": [
76*5ecf7b4eSGunnar Mills                        "number",
77*5ecf7b4eSGunnar Mills                        "null"
78*5ecf7b4eSGunnar Mills                    ],
79*5ecf7b4eSGunnar Mills                    "versionAdded": "v1_1_0"
80*5ecf7b4eSGunnar Mills                },
81*5ecf7b4eSGunnar Mills                "CellVoltages": {
82*5ecf7b4eSGunnar Mills                    "description": "The cell voltages (V) for this battery.",
83*5ecf7b4eSGunnar Mills                    "excerptCopy": "SensorVoltageExcerpt",
84*5ecf7b4eSGunnar Mills                    "items": {
85*5ecf7b4eSGunnar Mills                        "$ref": "http://redfish.dmtf.org/schemas/v1/Sensor.json#/definitions/SensorVoltageExcerpt"
86*5ecf7b4eSGunnar Mills                    },
87*5ecf7b4eSGunnar Mills                    "longDescription": "This property shall contain the cell voltages, in volt units, for this battery.  The value of the `DataSourceUri` property, if present, shall reference a resource of type `Sensor` with the `ReadingType` property containing the value `Voltage`.",
88*5ecf7b4eSGunnar Mills                    "type": "array"
89*5ecf7b4eSGunnar Mills                },
90*5ecf7b4eSGunnar Mills                "CellVoltages@odata.count": {
91*5ecf7b4eSGunnar Mills                    "$ref": "http://redfish.dmtf.org/schemas/v1/odata-v4.json#/definitions/count"
92*5ecf7b4eSGunnar Mills                },
93*5ecf7b4eSGunnar Mills                "ChargePercent": {
94*5ecf7b4eSGunnar Mills                    "$ref": "http://redfish.dmtf.org/schemas/v1/Sensor.json#/definitions/SensorExcerpt",
95*5ecf7b4eSGunnar Mills                    "description": "The amount of charge available (percent) in this battery.",
96*5ecf7b4eSGunnar Mills                    "excerptCopy": "SensorExcerpt",
97*5ecf7b4eSGunnar Mills                    "longDescription": "This property shall contain the amount of charge available, in percent units, typically `0` to `100`, in this battery.  The value of the `DataSourceUri` property, if present, shall reference a resource of type `Sensor` with the `ReadingType` property containing the value `Percent`."
98*5ecf7b4eSGunnar Mills                },
99*5ecf7b4eSGunnar Mills                "Description": {
100*5ecf7b4eSGunnar Mills                    "anyOf": [
101*5ecf7b4eSGunnar Mills                        {
102*5ecf7b4eSGunnar Mills                            "$ref": "http://redfish.dmtf.org/schemas/v1/Resource.json#/definitions/Description"
103*5ecf7b4eSGunnar Mills                        },
104*5ecf7b4eSGunnar Mills                        {
105*5ecf7b4eSGunnar Mills                            "type": "null"
106*5ecf7b4eSGunnar Mills                        }
107*5ecf7b4eSGunnar Mills                    ],
108*5ecf7b4eSGunnar Mills                    "readonly": true
109*5ecf7b4eSGunnar Mills                },
110*5ecf7b4eSGunnar Mills                "DischargeCycles": {
111*5ecf7b4eSGunnar Mills                    "description": "The number of discharges this battery has sustained.",
112*5ecf7b4eSGunnar Mills                    "longDescription": "This property shall contain the number of discharges this battery has sustained.",
113*5ecf7b4eSGunnar Mills                    "minimum": 0,
114*5ecf7b4eSGunnar Mills                    "readonly": true,
115*5ecf7b4eSGunnar Mills                    "type": [
116*5ecf7b4eSGunnar Mills                        "number",
117*5ecf7b4eSGunnar Mills                        "null"
118*5ecf7b4eSGunnar Mills                    ]
119*5ecf7b4eSGunnar Mills                },
120*5ecf7b4eSGunnar Mills                "ERate": {
121*5ecf7b4eSGunnar Mills                    "description": "The rate at which the battery is charging or discharging, based on power in watt units, relative to its rated maximum capacity in watt-hour units.  For example, `0.5` indicates it takes two hours to charge or discharge the battery based upon the current charge rate and capacity.",
122*5ecf7b4eSGunnar Mills                    "longDescription": "This property shall contain the rate at which the battery is charging or discharging, based on power in watt units, relative to its rated maximum capacity in watt-hour units.  If the battery is discharging, services shall calculate the value as `SUM(OutputCurrentAmps[x] * OutputVoltages[x]) / CapacityRatedWattHours`.  Otherwise, services shall calculate the value as `(InputCurrentAmps * InputVoltage) / CapacityRatedWattHours`.",
123*5ecf7b4eSGunnar Mills                    "minimum": 0,
124*5ecf7b4eSGunnar Mills                    "readonly": true,
125*5ecf7b4eSGunnar Mills                    "type": [
126*5ecf7b4eSGunnar Mills                        "number",
127*5ecf7b4eSGunnar Mills                        "null"
128*5ecf7b4eSGunnar Mills                    ],
129*5ecf7b4eSGunnar Mills                    "versionAdded": "v1_1_0"
130*5ecf7b4eSGunnar Mills                },
131*5ecf7b4eSGunnar Mills                "Id": {
132*5ecf7b4eSGunnar Mills                    "$ref": "http://redfish.dmtf.org/schemas/v1/Resource.json#/definitions/Id",
133*5ecf7b4eSGunnar Mills                    "readonly": true
134*5ecf7b4eSGunnar Mills                },
135*5ecf7b4eSGunnar Mills                "InputCurrentAmps": {
136*5ecf7b4eSGunnar Mills                    "$ref": "http://redfish.dmtf.org/schemas/v1/Sensor.json#/definitions/SensorCurrentExcerpt",
137*5ecf7b4eSGunnar Mills                    "description": "The input current (A) for this battery.",
138*5ecf7b4eSGunnar Mills                    "excerptCopy": "SensorCurrentExcerpt",
139*5ecf7b4eSGunnar Mills                    "longDescription": "This property shall contain the input current, in ampere units, for this battery.  The value of the `DataSourceUri` property, if present, shall reference a resource of type `Sensor` with the `ReadingType` property containing the value `Current`."
140*5ecf7b4eSGunnar Mills                },
141*5ecf7b4eSGunnar Mills                "InputVoltage": {
142*5ecf7b4eSGunnar Mills                    "$ref": "http://redfish.dmtf.org/schemas/v1/Sensor.json#/definitions/SensorVoltageExcerpt",
143*5ecf7b4eSGunnar Mills                    "description": "The input voltage (V) for this battery.",
144*5ecf7b4eSGunnar Mills                    "excerptCopy": "SensorVoltageExcerpt",
145*5ecf7b4eSGunnar Mills                    "longDescription": "This property shall contain the input voltage, in volt units, for this battery.  The value of the `DataSourceUri` property, if present, shall reference a resource of type `Sensor` with the `ReadingType` property containing the value `Voltage`."
146*5ecf7b4eSGunnar Mills                },
147*5ecf7b4eSGunnar Mills                "Name": {
148*5ecf7b4eSGunnar Mills                    "$ref": "http://redfish.dmtf.org/schemas/v1/Resource.json#/definitions/Name",
149*5ecf7b4eSGunnar Mills                    "readonly": true
150*5ecf7b4eSGunnar Mills                },
151*5ecf7b4eSGunnar Mills                "Oem": {
152*5ecf7b4eSGunnar Mills                    "$ref": "http://redfish.dmtf.org/schemas/v1/Resource.json#/definitions/Oem",
153*5ecf7b4eSGunnar Mills                    "description": "The OEM extension property.",
154*5ecf7b4eSGunnar Mills                    "longDescription": "This property shall contain the OEM extensions.  All values for properties that this object contains shall conform to the Redfish Specification-described requirements."
155*5ecf7b4eSGunnar Mills                },
156*5ecf7b4eSGunnar Mills                "OutputCurrentAmps": {
157*5ecf7b4eSGunnar Mills                    "description": "The output currents (A) for this battery.",
158*5ecf7b4eSGunnar Mills                    "excerptCopy": "SensorCurrentExcerpt",
159*5ecf7b4eSGunnar Mills                    "items": {
160*5ecf7b4eSGunnar Mills                        "$ref": "http://redfish.dmtf.org/schemas/v1/Sensor.json#/definitions/SensorCurrentExcerpt"
161*5ecf7b4eSGunnar Mills                    },
162*5ecf7b4eSGunnar Mills                    "longDescription": "This property shall contain the output currents, in ampere units, for this battery.  The value of the `DataSourceUri` property, if present, shall reference a resource of type `Sensor` with the `ReadingType` property containing the value `Current`.  The sensors shall appear in the same array order as the `OutputVoltages` property.",
163*5ecf7b4eSGunnar Mills                    "type": "array"
164*5ecf7b4eSGunnar Mills                },
165*5ecf7b4eSGunnar Mills                "OutputCurrentAmps@odata.count": {
166*5ecf7b4eSGunnar Mills                    "$ref": "http://redfish.dmtf.org/schemas/v1/odata-v4.json#/definitions/count"
167*5ecf7b4eSGunnar Mills                },
168*5ecf7b4eSGunnar Mills                "OutputVoltages": {
169*5ecf7b4eSGunnar Mills                    "description": "The output voltages (V) for this battery.",
170*5ecf7b4eSGunnar Mills                    "excerptCopy": "SensorVoltageExcerpt",
171*5ecf7b4eSGunnar Mills                    "items": {
172*5ecf7b4eSGunnar Mills                        "$ref": "http://redfish.dmtf.org/schemas/v1/Sensor.json#/definitions/SensorVoltageExcerpt"
173*5ecf7b4eSGunnar Mills                    },
174*5ecf7b4eSGunnar Mills                    "longDescription": "This property shall contain the output voltages, in volt units, for this battery.  The value of the `DataSourceUri` property, if present, shall reference a resource of type `Sensor` with the `ReadingType` property containing the value `Voltage`.  The sensors shall appear in the same array order as the `OutputCurrentAmps` property.",
175*5ecf7b4eSGunnar Mills                    "type": "array"
176*5ecf7b4eSGunnar Mills                },
177*5ecf7b4eSGunnar Mills                "OutputVoltages@odata.count": {
178*5ecf7b4eSGunnar Mills                    "$ref": "http://redfish.dmtf.org/schemas/v1/odata-v4.json#/definitions/count"
179*5ecf7b4eSGunnar Mills                },
180*5ecf7b4eSGunnar Mills                "Status": {
181*5ecf7b4eSGunnar Mills                    "$ref": "http://redfish.dmtf.org/schemas/v1/Resource.json#/definitions/Status",
182*5ecf7b4eSGunnar Mills                    "description": "The status and health of the resource and its subordinate or dependent resources.",
183*5ecf7b4eSGunnar Mills                    "longDescription": "This property shall contain any status or health properties of the resource."
184*5ecf7b4eSGunnar Mills                },
185*5ecf7b4eSGunnar Mills                "StoredChargeAmpHours": {
186*5ecf7b4eSGunnar Mills                    "$ref": "http://redfish.dmtf.org/schemas/v1/Sensor.json#/definitions/SensorExcerpt",
187*5ecf7b4eSGunnar Mills                    "description": "The charge (Ah) stored in this battery.",
188*5ecf7b4eSGunnar Mills                    "excerptCopy": "SensorExcerpt",
189*5ecf7b4eSGunnar Mills                    "longDescription": "This property shall contain the stored charge, in ampere-hour units, for this battery.  The value of the `DataSourceUri` property, if present, shall reference a resource of type `Sensor` with the `ReadingType` property containing the value `ChargeAh`."
190*5ecf7b4eSGunnar Mills                },
191*5ecf7b4eSGunnar Mills                "StoredEnergyWattHours": {
192*5ecf7b4eSGunnar Mills                    "$ref": "http://redfish.dmtf.org/schemas/v1/Sensor.json#/definitions/SensorExcerpt",
193*5ecf7b4eSGunnar Mills                    "description": "The energy (Wh) stored in this battery.",
194*5ecf7b4eSGunnar Mills                    "excerptCopy": "SensorExcerpt",
195*5ecf7b4eSGunnar Mills                    "longDescription": "This property shall contain the stored energy, in watt-hour units, for this battery.  The value of the `DataSourceUri` property, if present, shall reference a resource of type `Sensor` with the `ReadingType` property containing the value `EnergyWh`."
196*5ecf7b4eSGunnar Mills                },
197*5ecf7b4eSGunnar Mills                "TemperatureCelsius": {
198*5ecf7b4eSGunnar Mills                    "$ref": "http://redfish.dmtf.org/schemas/v1/Sensor.json#/definitions/SensorExcerpt",
199*5ecf7b4eSGunnar Mills                    "description": "The temperature (C) for this battery.",
200*5ecf7b4eSGunnar Mills                    "excerptCopy": "SensorExcerpt",
201*5ecf7b4eSGunnar Mills                    "longDescription": "This property shall contain the temperature, in degree Celsius units, for this battery.  The value of the `DataSourceUri` property, if present, shall reference a resource of type `Sensor` with the `ReadingType` property containing the value `Temperature`."
202*5ecf7b4eSGunnar Mills                }
203*5ecf7b4eSGunnar Mills            },
204*5ecf7b4eSGunnar Mills            "required": [
205*5ecf7b4eSGunnar Mills                "@odata.id",
206*5ecf7b4eSGunnar Mills                "@odata.type",
207*5ecf7b4eSGunnar Mills                "Id",
208*5ecf7b4eSGunnar Mills                "Name"
209*5ecf7b4eSGunnar Mills            ],
210*5ecf7b4eSGunnar Mills            "type": "object"
211*5ecf7b4eSGunnar Mills        },
212*5ecf7b4eSGunnar Mills        "OemActions": {
213*5ecf7b4eSGunnar Mills            "additionalProperties": true,
214*5ecf7b4eSGunnar Mills            "description": "The available OEM-specific actions for this resource.",
215*5ecf7b4eSGunnar Mills            "longDescription": "This type shall contain the available OEM-specific actions for this resource.",
216*5ecf7b4eSGunnar Mills            "patternProperties": {
217*5ecf7b4eSGunnar Mills                "^([a-zA-Z_][a-zA-Z0-9_]*)?@(odata|Redfish|Message)\\.[a-zA-Z_][a-zA-Z0-9_]*$": {
218*5ecf7b4eSGunnar Mills                    "description": "This property shall specify a valid odata or Redfish property.",
219*5ecf7b4eSGunnar Mills                    "type": [
220*5ecf7b4eSGunnar Mills                        "array",
221*5ecf7b4eSGunnar Mills                        "boolean",
222*5ecf7b4eSGunnar Mills                        "integer",
223*5ecf7b4eSGunnar Mills                        "number",
224*5ecf7b4eSGunnar Mills                        "null",
225*5ecf7b4eSGunnar Mills                        "object",
226*5ecf7b4eSGunnar Mills                        "string"
227*5ecf7b4eSGunnar Mills                    ]
228*5ecf7b4eSGunnar Mills                }
229*5ecf7b4eSGunnar Mills            },
230*5ecf7b4eSGunnar Mills            "properties": {},
231*5ecf7b4eSGunnar Mills            "type": "object"
232*5ecf7b4eSGunnar Mills        }
233*5ecf7b4eSGunnar Mills    },
234*5ecf7b4eSGunnar Mills    "language": "en",
235*5ecf7b4eSGunnar Mills    "owningEntity": "DMTF",
236*5ecf7b4eSGunnar Mills    "release": "2025.3",
237*5ecf7b4eSGunnar Mills    "title": "#BatteryMetrics.v1_1_0.BatteryMetrics"
238*5ecf7b4eSGunnar Mills}