Update workspace members
curl --request PUT \
--url https://api.lighton.ai/api/v2/workspaces/{id}/members/update/ \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"members": [
123
],
"groups": [
123
]
}
'import requests
url = "https://api.lighton.ai/api/v2/workspaces/{id}/members/update/"
payload = {
"members": [123],
"groups": [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({members: [123], groups: [123]})
};
fetch('https://api.lighton.ai/api/v2/workspaces/{id}/members/update/', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"id": 123,
"name": "<string>",
"workspace_type": "<string>",
"document_upload_method": "<string>",
"description": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"summaries": [
{
"language": "<string>",
"summary": "<string>"
}
],
"user_role": "<string>",
"collection": {
"id": 123,
"name": "<string>"
}
}Workspaces
Update workspace members
This endpoint allows you to update the members of a workspace.
Note that this will update all the members of the workspace.
It is restricted to admin and company admin users.
PUT
/
api
/
v2
/
workspaces
/
{id}
/
members
/
update
/
Update workspace members
curl --request PUT \
--url https://api.lighton.ai/api/v2/workspaces/{id}/members/update/ \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"members": [
123
],
"groups": [
123
]
}
'import requests
url = "https://api.lighton.ai/api/v2/workspaces/{id}/members/update/"
payload = {
"members": [123],
"groups": [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({members: [123], groups: [123]})
};
fetch('https://api.lighton.ai/api/v2/workspaces/{id}/members/update/', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"id": 123,
"name": "<string>",
"workspace_type": "<string>",
"document_upload_method": "<string>",
"description": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"summaries": [
{
"language": "<string>",
"summary": "<string>"
}
],
"user_role": "<string>",
"collection": {
"id": 123,
"name": "<string>"
}
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
The unique identifier of the workspace.
Body
application/jsonapplication/x-www-form-urlencodedmultipart/form-data
Response
200 - application/json
Mixin providing get_membership_role method for workspace serializers.
Show child attributes
Show child attributes
Return the user's highest role in the workspace (owner, editor, viewer) or None if not a member.
When a user is a member of the workspace through multiple groups (e.g., their private group and a company group), this returns the highest role among all their memberships. Role hierarchy: owner > editor > viewer
Show child attributes
Show child attributes