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));