Skip to main content
GET
/
devices
/
{device_id}
Get Device
curl --request GET \
  --url https://api.example.com/devices/{device_id}
{
  "success": true,
  "data": {
    "id": "<string>",
    "name": "<string>",
    "ip": "<string>",
    "port": 123,
    "password": 123,
    "timeout": 123,
    "created_at": "<string>",
    "updated_at": "<string>"
  }
}
Returns the complete configuration information for a registered device, including connection settings and metadata.

Path Parameters

device_id
string
required
The unique identifier of the deviceExample: "principal" or "bodega"

Response

success
boolean
required
Indicates whether the request was successful
data
object
required
Complete device configuration

Example Request

curl -X GET https://your-server.com/devices/principal

Example Response

Success (200)

{
  "success": true,
  "data": {
    "id": "principal",
    "ip": "192.168.1.205",
    "port": 4370,
    "password": 0,
    "timeout": 5,
    "name": "Entrada Principal",
    "created_at": "2026-03-05 10:30:00",
    "updated_at": "2026-03-06 09:15:00"
  }
}

Error: Device Not Found (404)

{
  "success": false,
  "error": "Dispositivo 'nonexistent' no encontrado.",
  "disponibles": ["principal", "bodega"]
}

Error Codes

Status CodeDescription
200Device configuration retrieved successfully
404Device with the specified ID does not exist

Use Cases

  • Verify device configuration before modifying settings
  • Display device details in a management interface
  • Check connection parameters for troubleshooting
  • Retrieve device metadata for logging or auditing

Build docs developers (and LLMs) love