curl --request PATCH \
--url https://paradigm.lighton.ai/api/v3/company/workspaces/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"description": "<string>",
"datasource": {}
}
'import requests
url = "https://paradigm.lighton.ai/api/v3/company/workspaces/{id}"
payload = {
"name": "<string>",
"description": "<string>",
"datasource": {}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({name: '<string>', description: '<string>', datasource: {}})
};
fetch('https://paradigm.lighton.ai/api/v3/company/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",
"files_count": 123,
"user_role": "owner",
"used_storage": 123,
"sync": {
"datasource_type": "<string>",
"source_name": "<string>",
"last_status": "<string>",
"updated_at": "2023-11-07T05:31:56Z",
"failed_files_count": 123,
"next_import_date": "2023-11-07T05:31:56Z",
"editable": true,
"name": "<string>",
"instance_url": "<string>",
"tenant_id": "<string>",
"site_name": "<string>",
"client_id": "<string>",
"filter_criteria": "<unknown>"
},
"scoped_api_keys": [
{
"id": "<string>",
"name": "<string>",
"prefix": "<string>",
"role": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"created_by": "<string>",
"scope_type": "workspace"
}
]
}{
"id": null,
"code": 422,
"error": "validation_error",
"detail": "One or more fields failed validation.",
"doc_url": "https://developers.lighton.ai/errors#validation_error",
"fields": {
"<field_name>": [
{
"error": "required",
"detail": "This field is required."
}
]
}
}{
"detail": "System is under maintenance.",
"error": "service_maintenance",
"mode": "full_shutdown",
"reason": "<string>",
"started_at": "2023-11-07T05:31:56Z",
"endpoint_category_names": [
"<string>"
]
}Update a company workspace
⚠️ ALPHA ENDPOINT - This endpoint is in alpha and subject to breaking changes. Use with caution in production environments.
Partially update a given workspace. The authenticated user must be a company or instance-level administrator.
Standard update:
- name (string, optional): Desired workspace name
- description (string, optional): Desired workspace description. Send empty string or null to clear.
Convert to synced workspace:
Provide a datasource object to convert a manual workspace into a read-only synced workspace. This creates a datasource and schedules a first import immediately.
{
"datasource": {
"type": "googledrive|sharepoint|servicenow|webscrapper",
"name": "My datasource",
"credentials": { ... },
"filter_criteria": { ... }
}
}
Credentials per type:
- googledrive:
service_account_file(JSON string) - sharepoint:
client_id,client_secret,tenant_id,site_id(optional),site_name(optional) - servicenow:
instance_url,username,password - webscrapper: no credentials required
Filter criteria per type:
- googledrive:
folder_id(required),recursive(optional) - sharepoint:
folder_path(required),recursive(optional) - servicenow:
doc_type(required, e.g.knowledge) - webscrapper:
start_url(required)
Edit an existing synced workspace’s datasource:
Sending a datasource payload on an already-synced workspace edits the datasource in place — but only while no successful sync has happened yet. After the first success the datasource config is locked, and it is also locked while a sync is in flight (waiting/processing). Type cannot change on edit. The current editability is exposed in the response under sync.editable.
Permissions:
- Company Admins can update workspaces within their company
- Instance-level administrators can update any workspace
- Conversion is one-way (cannot revert to manual)
curl --request PATCH \
--url https://paradigm.lighton.ai/api/v3/company/workspaces/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"description": "<string>",
"datasource": {}
}
'import requests
url = "https://paradigm.lighton.ai/api/v3/company/workspaces/{id}"
payload = {
"name": "<string>",
"description": "<string>",
"datasource": {}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({name: '<string>', description: '<string>', datasource: {}})
};
fetch('https://paradigm.lighton.ai/api/v3/company/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",
"files_count": 123,
"user_role": "owner",
"used_storage": 123,
"sync": {
"datasource_type": "<string>",
"source_name": "<string>",
"last_status": "<string>",
"updated_at": "2023-11-07T05:31:56Z",
"failed_files_count": 123,
"next_import_date": "2023-11-07T05:31:56Z",
"editable": true,
"name": "<string>",
"instance_url": "<string>",
"tenant_id": "<string>",
"site_name": "<string>",
"client_id": "<string>",
"filter_criteria": "<unknown>"
},
"scoped_api_keys": [
{
"id": "<string>",
"name": "<string>",
"prefix": "<string>",
"role": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"created_by": "<string>",
"scope_type": "workspace"
}
]
}{
"id": null,
"code": 422,
"error": "validation_error",
"detail": "One or more fields failed validation.",
"doc_url": "https://developers.lighton.ai/errors#validation_error",
"fields": {
"<field_name>": [
{
"error": "required",
"detail": "This field is required."
}
]
}
}{
"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 workspace.
Body
V3 Request serializer for updating a workspace in the user's company.
100Datasource configuration to convert this workspace into a read-only synced workspace. Company admin only. Cannot be undone. Fields: type (googledrive|sharepoint|servicenow|webscrapper), name, credentials, filter_criteria.
Show child attributes
Show child attributes
Response
Workspace updated successfully
V3 Response serializer for company workspace creation and retrieval.
owner- ownereditor- editorviewer- viewer- `` -
owner, editor, viewer Show child attributes
Show child attributes
Show child attributes
Show child attributes