Navigation
List devices of a user
Note: This endpoint is deprecated. Please refer to the new endpoint.
Retrieve a list of all the devices for a user.
Parameters
whitelisted
boolean
A boolean indicating whether or not to include whitelisted devices in the response.
dev
boolean
A boolean indicating which mode to query for devices in development mode only.
Returns
Returns a list of device objects.
GET /v2/proj/user/:id/devices
import Rupt from 'rupt';
import axios from 'axios';
const { data } = await axios.get(
'https://api.rupt.dev/v2/proj/user/USER_ID/devices?whitelisted=true',
{ headers: { Authorization: `Bearer ${API_SECRET}` } }
);
Response
[
{
"_id": "632f652d952b1dbf850fd797",
"user": "632f652dfd85e259023bcb9c",
"project": "632c919b3c0a10dc53dcaa75",
"info": {
// device info here
},
"status": "detached",
"metadata": {
// metadata here
},
"createdAt": "2022-09-24T20:14:37.512Z",
"updatedAt": "2022-10-12T13:53:23.287Z",
"__v": 0,
"auto_detached": true,
"detached_at": "2022-09-27T22:18:36.871Z"
}
]