Skip to main content
GET
/
battery
/
{deviceId}
/
actions
List actions for a device
curl --request GET \
  --url https://api.example.com/battery/{deviceId}/actions \
  --header 'x-api-key: <api-key>'
{
  "data": [
    {
      "id": "act_abc123",
      "deviceId": "device_xyz789",
      "type": "battery:set_operation_mode",
      "state": "acknowledged",
      "result": {
        "success": true,
        "message": "Command executed successfully"
      },
      "createdAt": "<string>",
      "updatedAt": "<string>",
      "deferredUntil": "2025-06-01T18:00:00Z",
      "parameters": {
        "mode": "charge",
        "targetPercent": 80
      },
      "errorCode": "<string>",
      "errorMessage": "<string>",
      "acknowledgedAt": "<string>",
      "completedAt": "<string>"
    }
  ],
  "pagination": {
    "limit": 123,
    "offset": 123,
    "total": 123,
    "hasMore": true
  }
}

Authorizations

x-api-key
string
header
required

Path Parameters

deviceId
string
required

The unique identifier for the battery device

Example:

"device_abc123"

Query Parameters

state
enum<string>

Filter actions by state

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

"scheduled"

limit
integer
default:10

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

Required range: x <= 50
Example:

10

offset
integer
default:0

Number of actions to skip (default: 0)

Example:

0

Response

Actions retrieved successfully

data
object[]
required
pagination
object
required