Skip to main content
GET
/
battery
/
{deviceId}
/
actions
curl
curl --request GET \
  --url 'https://api.amps.ai/battery/dev_abc123/actions' \
  --header 'x-api-key: amps_sk_test_xxxxxxxxxxxxxxxxxxxxxxxx'
{
  "items": [
    {
      "id": "act_2026050709a1b2c3",
      "deviceId": "device_abc123",
      "type": "battery:set_operation_mode",
      "state": "scheduled",
      "parameters": {
        "mode": "charge",
        "target": {
          "value": 100,
          "unit": "percent"
        }
      },
      "result": null,
      "errorCode": null,
      "errorMessage": null,
      "createdAt": "2026-05-07T08:00:00.000Z",
      "updatedAt": "2026-05-07T08:00:00.000Z",
      "acknowledgedAt": null,
      "completedAt": null,
      "start": "2026-06-01T02:00:00.000Z",
      "end": null
    },
    {
      "id": "act_2026050615e6f7d8",
      "deviceId": "device_abc123",
      "type": "battery:set_operation_mode",
      "state": "completed",
      "parameters": {
        "mode": "auto.balanced"
      },
      "result": {
        "success": true,
        "message": "Mode applied"
      },
      "errorCode": null,
      "errorMessage": null,
      "createdAt": "2026-05-06T15:30:00.000Z",
      "updatedAt": "2026-05-06T15:30:04.000Z",
      "acknowledgedAt": "2026-05-06T15:30:01.000Z",
      "completedAt": "2026-05-06T15:30:04.000Z",
      "start": null,
      "end": null
    },
    {
      "id": "act_20260505199aabbb",
      "deviceId": "device_abc123",
      "type": "battery:set_operation_mode",
      "state": "failed",
      "parameters": {
        "mode": "charge",
        "target": {
          "value": 95,
          "unit": "percent"
        }
      },
      "result": null,
      "errorCode": "DEVICE_OFFLINE",
      "errorMessage": "Inverter did not respond within 30s.",
      "createdAt": "2026-05-05T19:10:00.000Z",
      "updatedAt": "2026-05-05T19:10:32.000Z",
      "acknowledgedAt": "2026-05-05T19:10:01.000Z",
      "completedAt": "2026-05-05T19:10:32.000Z",
      "start": null,
      "end": null
    }
  ],
  "pagination": {
    "limit": 10,
    "offset": 0,
    "total": 3,
    "hasMore": false
  }
}

Documentation Index

Fetch the complete documentation index at: https://docs.amps.ai/llms.txt

Use this file to discover all available pages before exploring further.

Authorizations

x-api-key
string
header
required

Path Parameters

deviceId
string
required

The unique identifier for the battery device.

Example:

"device_abc123"

Query Parameters

offset
number

Number of actions to skip (default: 0).

Example:

0

limit
number

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

Example:

10

state
enum<string>

Filter by action lifecycle state.

Available options:
acknowledged,
completed,
failed,
scheduled,
cancelled

Response

Actions retrieved successfully.

Paginated list of actions for a device, ordered most recent first.

items
object[]
required
pagination
object
required