Retrieve a workspace
curl --request GET \
--url https://api.lighton.ai/api/v2/workspaces/{id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.lighton.ai/api/v2/workspaces/{id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.lighton.ai/api/v2/workspaces/{id}', 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
Retrieve a workspace
This endpoint allows to retrieve a workspace with his relations (members and collections).
It is restricted to admin and company admin users.
GET
/
api
/
v2
/
workspaces
/
{id}
Retrieve a workspace
curl --request GET \
--url https://api.lighton.ai/api/v2/workspaces/{id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.lighton.ai/api/v2/workspaces/{id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.lighton.ai/api/v2/workspaces/{id}', 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.
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