Navigation
Access history
Retrieve a list of accesses for a user and device.
Parameters
You must include at least one of the following attributes:
per
number
A number between 1 and 50 indicating how many results you'd like per page.
page
number
The page number you're querying for. Each response will include the current page and the total number of pages, so you can use that to guide your next requests.
Returns
Returns a paginated response.
GET /v2/proj/access-history
import Rupt from 'rupt';
import axios from 'axios';
const { data } = await axios.get(
'https://api.rupt.dev/v2/proj/access-history?user=USER_ID',
{ headers: { Authorization: `Bearer ${API_SECRET}` } }
);
Response
{
"docs": [
{
"_id": "633443fa96c1b648bfc29625", // the access id
"signed": false,
"device": {
"_id": "633443f596c1b648bfc2916a",
"user": "633443f5fd85e259023d7827",
"project": "632c919b3c0a10dc53dcaa75",
"info": {
"ua": "Mozilla/5.0 (X11; Linux i686; rv:12.0) Gecko/20120502 Firefox/12.0 SeaMonkey/2.9.1",
"browser": {
"name": "SeaMonkey",
"version": "2.9.1",
"major": "2"
},
"engine": { "name": "Gecko", "version": "12.0" },
"os": { "name": "Linux", "version": "i686" },
"device": { "vendor": null, "model": null, "type": null },
"cpu": { "architecture": "ia32" }
},
"status": "attached",
"metadata": {},
"createdAt": "2022-09-28T12:54:13.510Z",
"updatedAt": "2022-10-12T13:53:23.287Z",
"__v": 0
},
"project": "632c919b3c0a10dc53dcaa75",
"user": "633443f5fd85e259023d7827",
"api_key": "632f6444952b1dbf850fd6f9",
"confidence": 0.9714285714285714,
"version": "2",
"createdAt": "2022-09-28T12:54:18.757Z",
"updatedAt": "2022-09-28T12:54:18.757Z",
"__v": 0
}
],
"totalDocs": 11,
"limit": 10,
"totalPages": 2,
"page": 1,
"pagingCounter": 1,
"hasPrevPage": false,
"hasNextPage": true,
"prevPage": null,
"nextPage": 2
}