Navigation

Access history

Summary

Use this API endpoint to get the access history. You must include at least one and up to three of the following filters: user, device, and identity

  • path: /access-history
  • method: GET
  • Base URL: https://api.rupt.dev/v2/proj
  • parameters:
    • project_id: The ID of your project
  • headers:
    • Authorization: Bearer <api_secret>: where secret is the raw API secret you get when generating an API key.

      Never reveal your secret on the client side. Only make this call from a secure server.

  • query (filters):
    • per: A number between 1 and 50 indicating how many results you'd like per page.
    • page: 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.
    • user *: The ID of the user you'd like to get the access for.
    • device *: The ID of the device to get history for.
    • identity *: The device identity to get the access history for.

      * At least one filter is required. You must pass at least one of the values with * next to them. You can pass up to all three.

  • response: The response from this endpoint will be:
    {
      "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,
            "identity": null
          },
          "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
    }