POST /admin/devices/reconnect

Attempt to reconnect all disconnected devices. Useful for batch recovery after server restart or network issues.

Responses

  • 200 application/json

    Reconnect operation completed

    Hide response attributes Show response attributes object
    • status boolean
    • code integer
    • message string
    • data object
      Hide data attributes Show data attributes object
      • results array[object]
        Hide results attributes Show results attributes object
        • device_id string
        • device_name string
        • status string

          Values are reconnected, failed, skipped, or already_connected.

        • error string
      • summary object
        Hide summary attributes Show summary attributes object
        • total integer
        • reconnected integer
        • failed integer
        • skipped integer
  • 401 application/json

    Unauthorized - Invalid admin secret

    Hide response attributes Show response attributes object
    • status boolean
    • code integer
    • message string
    • error string
  • 500 application/json

    Internal server error

    Hide response attributes Show response attributes object
    • status boolean
    • code integer
    • message string
    • error string
POST /admin/devices/reconnect
curl \
 --request POST 'http://localhost:7001/admin/devices/reconnect' \
 --header "X-Admin-Secret: $API_KEY"
Response examples (200)
{
  "status": true,
  "code": 200,
  "message": "Reconnect operation completed",
  "data": {
    "results": [
      {
        "device_id": "550e8400-e29b-41d4-a716-446655440000",
        "device_name": "Production Phone",
        "status": "reconnected",
        "error": "string"
      }
    ],
    "summary": {
      "total": 25,
      "reconnected": 5,
      "failed": 2,
      "skipped": 18
    }
  }
}
Response examples (401)
{
  "status": false,
  "code": 400,
  "message": "Bad request",
  "error": "Bad request"
}
Response examples (500)
{
  "status": false,
  "code": 400,
  "message": "Bad request",
  "error": "Bad request"
}