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"
}
]
}
]
}List of page-level access permissions assigned to the 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"
}
]
}
]
}Bearer authentication header of the form Bearer <token>, where <token> is your auth token.