Skip to main content
GET
/
battery
curl
curl --request GET \
  --url 'https://api.amps.ai/battery' \
  --header 'x-api-key: amps_sk_test_xxxxxxxxxxxxxxxxxxxxxxxx'
{
  "success": true,
  "data": {
    "items": [
      {
        "id": "device_abc123",
        "vendor": "example_vendor_a",
        "sync": {
          "available": true,
          "lastPulledAt": "2026-05-07T09:23:45.000Z"
        },
        "metadata": {
          "model": "Hybrid 5kWh",
          "source": "cache"
        },
        "state": {
          "status": "idle",
          "capacity": 10.4,
          "level": 67,
          "chargeRate": 0,
          "dischargeLimit": 10,
          "currentMode": "auto.balanced"
        },
        "commands": {
          "charge": {
            "parameters": {
              "target": {
                "unit": "percent",
                "min": 10,
                "max": 100
              },
              "power": {
                "unit": "kw",
                "min": 0,
                "max": 5
              }
            },
            "execution": [
              "immediate",
              "scheduled",
              "windowed"
            ]
          },
          "discharge": {
            "parameters": {
              "target": {
                "unit": "percent",
                "min": 10,
                "max": 100
              }
            },
            "execution": [
              "immediate",
              "scheduled",
              "windowed"
            ]
          },
          "auto.balanced": {
            "parameters": {},
            "execution": [
              "immediate",
              "scheduled"
            ]
          }
        },
        "conflictStrategies": [
          "cancel_and_replace",
          "queue_after"
        ],
        "lastAction": {
          "id": "action_def456",
          "command": "charge",
          "state": "completed",
          "createdAt": "2026-05-07T08:15:00.000Z",
          "updatedAt": "2026-05-07T08:18:00.000Z",
          "links": {
            "self": "/actions/action_def456"
          }
        },
        "currentSchedule": null
      },
      {
        "id": "device_xyz789",
        "vendor": "example_vendor_b",
        "sync": {
          "available": true,
          "lastPulledAt": "2026-05-07T09:24:10.000Z"
        },
        "metadata": {
          "model": "Hybrid Gen 2",
          "source": "live"
        },
        "state": {
          "status": "discharging",
          "capacity": 9.5,
          "level": 42,
          "chargeRate": -1.8,
          "dischargeLimit": 10,
          "currentMode": "discharge"
        },
        "commands": {
          "charge": {
            "parameters": {
              "target": {
                "unit": "percent",
                "min": 10,
                "max": 100
              }
            },
            "execution": [
              "immediate",
              "scheduled"
            ]
          },
          "discharge": {
            "parameters": {
              "target": {
                "unit": "percent",
                "min": 10,
                "max": 100
              }
            },
            "execution": [
              "immediate",
              "scheduled"
            ]
          },
          "idle": {
            "parameters": {},
            "execution": [
              "immediate",
              "scheduled"
            ]
          }
        },
        "conflictStrategies": [
          "cancel_and_replace",
          "queue_after"
        ],
        "lastAction": {
          "id": "action_jkl012",
          "command": "discharge",
          "state": "acknowledged",
          "createdAt": "2026-05-07T09:20:00.000Z",
          "updatedAt": "2026-05-07T09:20:15.000Z",
          "links": {
            "self": "/actions/action_jkl012"
          }
        },
        "currentSchedule": null
      }
    ],
    "pagination": {
      "limit": 10,
      "offset": 0,
      "total": 2,
      "hasMore": false
    }
  },
  "meta": {
    "requestId": "req_8a2Bf3kP",
    "environment": "sandbox",
    "timestamp": "2026-06-02T12:00:00.000Z",
    "latencyMs": 12
  }
}

Authorizations

x-api-key
string
header
required

Query Parameters

userId
string

Filter devices by userId.

Example:

"user_abc123"

offset
number

Number of devices to skip (default: 0).

Example:

0

limit
number

Maximum number of devices to return (1-50, default: 10).

Example:

10

Response

Battery devices retrieved successfully.

success
boolean
required

Always true for success responses.

data
Paginated Battery · object
required
meta
Response Meta · object
required

Metadata attached to every response: the request identifier, the serving environment, the build timestamp, and the server-side latency.