Skip to main content
GET
/
v1
/
access-management
Fetch Access Role
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};

fetch('https://api.trackpilots.com/v1/access-management', options)
  .then(res => res.json())
  .then(res => console.log(res))
  .catch(err => console.error(err));
{
  "success": true,
  "statusCode": 200,
  "statusMessage": "Role management retrieved successfully",
  "error": null,
  "data": [
    {
      "roleId": "4cf4bf1c-e564-40ab-9402-26e9b99a46fb",
      "roleName": "Admin",
      "roleData": [
        {
          "path": "/",
          "access": "Full Access"
        },
        {
          "path": "/my-team",
          "access": "Full Access"
        },
        {
          "path": "/insights/productivity-analysis",
          "access": "Team Data"
        },
        {
          "path": "/proof-of-work/screenshot",
          "access": "Team Data"
        },
        {
          "path": "/proof-of-work/timesheet",
          "access": "Own Data"
        }
      ]
    }
  ]
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Response

Fetch Access Management

success
boolean
Example:

true

statusCode
integer
Example:

200

statusMessage
string
Example:

"Role management retrieved successfully"

error
object
Example:

null

data
object[]