Update Access Role
const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
roleId: 'c44a66ea-d0ba-4423-9f85-25c68f7aa37b',
roleName: 'Admin',
roleData: [{path: '/my-team', access: 'Full Access'}]
})
};
fetch('https://api.trackpilots.com/v1/access-management', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request PATCH \
--url https://api.trackpilots.com/v1/access-management \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"roleId": "c44a66ea-d0ba-4423-9f85-25c68f7aa37b",
"roleName": "Admin",
"roleData": [
{
"path": "/my-team",
"access": "Full Access"
}
]
}
'import requests
url = "https://api.trackpilots.com/v1/access-management"
payload = {
"roleId": "c44a66ea-d0ba-4423-9f85-25c68f7aa37b",
"roleName": "Admin",
"roleData": [
{
"path": "/my-team",
"access": "Full Access"
}
]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text){
"success": true,
"statusCode": 200,
"statusMessage": "Role management updated successfully.",
"error": null,
"data": {
"roleId": "c44a66ea-d0ba-4423-9f85-25c68f7aa37b",
"roleName": "Admin",
"roleData": [
{
"path": "/my-team",
"access": "Full Access"
}
]
}
}Access Control
Update Access Role
PATCH
/
v1
/
access-management
Update Access Role
const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
roleId: 'c44a66ea-d0ba-4423-9f85-25c68f7aa37b',
roleName: 'Admin',
roleData: [{path: '/my-team', access: 'Full Access'}]
})
};
fetch('https://api.trackpilots.com/v1/access-management', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request PATCH \
--url https://api.trackpilots.com/v1/access-management \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"roleId": "c44a66ea-d0ba-4423-9f85-25c68f7aa37b",
"roleName": "Admin",
"roleData": [
{
"path": "/my-team",
"access": "Full Access"
}
]
}
'import requests
url = "https://api.trackpilots.com/v1/access-management"
payload = {
"roleId": "c44a66ea-d0ba-4423-9f85-25c68f7aa37b",
"roleName": "Admin",
"roleData": [
{
"path": "/my-team",
"access": "Full Access"
}
]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text){
"success": true,
"statusCode": 200,
"statusMessage": "Role management updated successfully.",
"error": null,
"data": {
"roleId": "c44a66ea-d0ba-4423-9f85-25c68f7aa37b",
"roleName": "Admin",
"roleData": [
{
"path": "/my-team",
"access": "Full Access"
}
]
}
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
application/json
