Create an upload session
curl --request POST \
--url https://api.lighton.ai/api/v2/upload-session \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.lighton.ai/api/v2/upload-session"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.lighton.ai/api/v2/upload-session', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"is_valid": true,
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"documents": [
{
"id": 123,
"updated_at": "2023-11-07T05:31:56Z",
"workspace": "<string>",
"title": "<string>",
"collection": 123,
"status": "pending"
}
]
}Upload Sessions
Create an upload session
deprecated
Deprecated — this endpoint will be removed in a future release. Use POST /api/v3/files instead, which automatically creates an upload session.
Create a new upload session
POST
/
api
/
v2
/
upload-session
Create an upload session
curl --request POST \
--url https://api.lighton.ai/api/v2/upload-session \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.lighton.ai/api/v2/upload-session"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.lighton.ai/api/v2/upload-session', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"is_valid": true,
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"documents": [
{
"id": 123,
"updated_at": "2023-11-07T05:31:56Z",
"workspace": "<string>",
"title": "<string>",
"collection": 123,
"status": "pending"
}
]
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Response
201 - application/json
Response serializer for upload session details.
Unique identifier for the upload session
Whether the upload session is currently valid and active
Timestamp when the upload session was created
Timestamp when the upload session was last updated
List of documents associated with this upload session
Show child attributes
Show child attributes