---
updatedAt: 2025-07-02T08:17:11.000Z
agentTools:
  projectIndex: https://docs.vitro.io/llms.txt
---

# Get Battery

Returns a single battery by its identifier

# OpenAPI definition

```json
{
  "openapi": "3.0.3",
  "info": {
    "title": "Astra HTTP API",
    "description": "API Specification for the ASTRA backend, which will expose datacenters and battery information for the UI application to construct dashboards. ",
    "contact": {
      "email": "rafal@kult.io"
    },
    "version": "1.0-BETA"
  },
  "servers": [
    {
      "url": "https://api.dev.vitro.link/api/",
      "description": "Development"
    }
  ],
  "paths": {
    "/battery/{batteryId}": {
      "get": {
        "summary": "Get Battery",
        "description": "Returns a single battery by its identifier",
        "operationId": "getBatteryById",
        "parameters": [
          {
            "name": "batteryId",
            "in": "path",
            "description": "ID of battery to return",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful operation",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Battery"
                }
              }
            }
          },
          "400": {
            "description": "Invalid ID supplied"
          },
          "404": {
            "description": "Battery not found"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "Battery": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "format": "int64",
            "example": 1
          },
          "cabinetId": {
            "type": "string",
            "example": "012340C7B4CDD8F4EE"
          },
          "shelfNo": {
            "type": "integer",
            "format": "int64",
            "example": 26
          },
          "positionInShelf": {
            "type": "integer",
            "format": "int64",
            "example": 1
          },
          "positionInString": {
            "type": "integer",
            "format": "int64",
            "example": 7
          },
          "name": {
            "type": "string",
            "example": "BatteryABC"
          },
          "lastStatus": {
            "$ref": "#/components/schemas/ArrayOfBatteryStatus"
          },
          "label": {
            "type": "string",
            "example": "This is the label of the battery"
          },
          "manufacturer": {
            "type": "string",
            "example": "ManufacturerABC"
          },
          "modelNumber": {
            "type": "string",
            "example": "BP-1256"
          },
          "serialNumber": {
            "type": "string",
            "example": "123456789"
          },
          "MFGDate": {
            "type": "string",
            "example": "2023-01-01",
            "format": "date"
          },
          "installDate": {
            "type": "string",
            "example": "2023-01-01",
            "format": "date"
          },
          "nominalAh": {
            "type": "integer",
            "format": "int64",
            "example": 100
          },
          "resistance": {
            "type": "integer",
            "format": "int64",
            "example": 100
          },
          "baselineResistance": {
            "type": "number",
            "format": "float",
            "example": 4.6,
            "description": "Latest manually measured resistance"
          },
          "baselineMuResistance": {
            "type": "number",
            "format": "float",
            "example": 4.8,
            "description": "Mean of all the baseline resistances in the cabinet"
          },
          "voltage": {
            "type": "number",
            "format": "float",
            "example": 13.4
          },
          "temperature": {
            "type": "number",
            "format": "float",
            "example": 104.2
          },
          "lastUpdateTimestamp": {
            "type": "number",
            "format": "int64",
            "example": 16938354540
          },
          "lastUpdateDatetime": {
            "type": "string",
            "example": "2013-03-01T13:05:16",
            "format": "datetime"
          },
          "latestReadingTimestamp": {
            "type": "number",
            "format": "int64",
            "example": 16938354540
          },
          "latestReadingDatetime": {
            "type": "string",
            "example": "2013-03-01T13:05:16",
            "format": "datetime"
          },
          "latestResistance": {
            "type": "number",
            "format": "float",
            "example": 2.6
          },
          "latestVoltage": {
            "type": "number",
            "format": "float",
            "example": 13.4
          },
          "latestTempCore": {
            "type": "number",
            "format": "float",
            "example": 76.1
          },
          "latestTempPoleDiff": {
            "type": "number",
            "format": "float",
            "example": 76.1
          },
          "latestCharge": {
            "type": "number",
            "format": "float",
            "example": 98.5
          },
          "isOnline": {
            "type": "boolean",
            "example": false
          }
        }
      },
      "ArrayOfBatteryStatus": {
        "type": "array",
        "items": {
          "$ref": "#/components/schemas/BatteryStatus"
        }
      },
      "BatteryStatus": {
        "type": "object",
        "properties": {
          "metric": {
            "enum": [
              "TEMP_CORE",
              "TEMP_POLE_DIFF",
              "VOLTAGE",
              "RESISTANCE",
              "CHARGE",
              "ONLINE"
            ]
          },
          "status": {
            "enum": [
              "OK",
              "WARNING",
              "ALERT",
              "UNKNOWN"
            ]
          },
          "value": {
            "type": "number",
            "format": "float"
          },
          "timestamp": {
            "type": "string",
            "example": "2023-01-01 00:00:00",
            "format": "date-time"
          },
          "datetime": {
            "type": "string",
            "example": "2013-03-01T13:05:16",
            "format": "date-time"
          }
        },
        "description": "Status of the battery",
        "example": {
          "metric": "TEMPERATURE",
          "status": "WARNING",
          "value": 60.5
        }
      }
    },
    "securitySchemes": {
      "bearerAuth": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "JWT"
      }
    }
  },
  "security": [
    {
      "bearerAuth": []
    }
  ]
}
```