Skip to main content

Devices

Manage user devices for mobile and desktop applications.

GET /api/devices

List all devices for the authenticated user.

Authentication: Required

Response:

{
"_links": {
"self": { "href": "/api/devices" }
},
"_embedded": {
"inf:device": [
{
"id": "device-uuid",
"userId": "john.doe",
"deviceId": "mobile-123",
"platform": "ios",
"model": "iPhone 15 Pro",
"appVersion": "5.9.0",
"lastSeen": "2024-02-09T10:00:00Z",
"createdAt": "2024-01-15T10:00:00Z"
}
]
},
"start": 0,
"count": 1,
"total": 1
}

GET /api/devices/{deviceId}

Get a specific device.

Path Parameters:

ParameterTypeDescription
deviceIdstringDevice ID

POST /api/devices/{deviceId}

Register or update a device.

Request Body:

{
"platform": "ios",
"model": "iPhone 15 Pro",
"appVersion": "5.9.0",
"pushToken": "apns-token-here"
}

PUT /api/devices/{deviceId}

Update device information.

Request Body:

{
"appVersion": "5.9.1",
"lastSeen": "2024-02-09T11:00:00Z"
}

DELETE /api/devices/{deviceId}

Unregister a device.

Response:

204 No Content on success.

Use Case:

Remove device registration when app is uninstalled or user logs out.