Update roles of a company member
curl --request PUT \
--url https://paradigm.lighton.ai/api/v3/users/{id}/roles \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"roles": [
123
]
}
'import requests
url = "https://paradigm.lighton.ai/api/v3/users/{id}/roles"
payload = { "roles": [123] }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({roles: [123]})
};
fetch('https://paradigm.lighton.ai/api/v3/users/{id}/roles', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"id": 123,
"username": "<string>",
"first_name": "<string>",
"last_name": "<string>",
"email": "<string>",
"is_active": true,
"date_joined": "2023-11-07T05:31:56Z",
"account_expiration_date": "2023-11-07T05:31:56Z",
"last_login": "2023-11-07T05:31:56Z",
"invitation_status": "<string>",
"language": "<string>",
"company": {
"name": "<string>",
"id": 123
},
"roles": [
{
"name": "<string>",
"id": 123
}
],
"groups": [
{
"id": 123,
"name": "<string>",
"description": "<string>",
"role": "<string>",
"category": "<string>",
"created_at": "2023-11-07T05:31:56Z"
}
]
}{
"detail": "System is under maintenance.",
"error": "service_maintenance",
"mode": "full_shutdown",
"reason": "<string>",
"started_at": "2023-11-07T05:31:56Z",
"endpoint_category_names": [
"<string>"
]
}Users
Update roles of a company member
This endpoint allows you to update the roles of a company member.
Note that this will update all the roles of the member.
It is restricted to admin and company admin users.
PUT
/
api
/
v3
/
users
/
{id}
/
roles
Update roles of a company member
curl --request PUT \
--url https://paradigm.lighton.ai/api/v3/users/{id}/roles \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"roles": [
123
]
}
'import requests
url = "https://paradigm.lighton.ai/api/v3/users/{id}/roles"
payload = { "roles": [123] }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({roles: [123]})
};
fetch('https://paradigm.lighton.ai/api/v3/users/{id}/roles', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"id": 123,
"username": "<string>",
"first_name": "<string>",
"last_name": "<string>",
"email": "<string>",
"is_active": true,
"date_joined": "2023-11-07T05:31:56Z",
"account_expiration_date": "2023-11-07T05:31:56Z",
"last_login": "2023-11-07T05:31:56Z",
"invitation_status": "<string>",
"language": "<string>",
"company": {
"name": "<string>",
"id": 123
},
"roles": [
{
"name": "<string>",
"id": 123
}
],
"groups": [
{
"id": 123,
"name": "<string>",
"description": "<string>",
"role": "<string>",
"category": "<string>",
"created_at": "2023-11-07T05:31:56Z"
}
]
}{
"detail": "System is under maintenance.",
"error": "service_maintenance",
"mode": "full_shutdown",
"reason": "<string>",
"started_at": "2023-11-07T05:31:56Z",
"endpoint_category_names": [
"<string>"
]
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
The unique identifier of the user.
Body
application/jsonapplication/x-www-form-urlencodedmultipart/form-data
Response
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes