List available documents
curl --request GET \
--url https://api.lighton.ai/api/v2/files \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.lighton.ai/api/v2/files"
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/files', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"object": "list",
"count": 123,
"next": "https://api.lighton.ai/api/v2/files/?page=4",
"previous": "https://api.lighton.ai/api/v2/files/?page=2",
"data": [
{
"count": 123,
"data": [
{
"id": 123,
"object": "<string>",
"created_at": 123,
"filename": "<string>",
"purpose": "<string>",
"status": "<string>",
"signature": "<string>"
}
],
"object": "list",
"next": "<string>",
"previous": "<string>"
}
]
}Files
List available documents
deprecated
Deprecated — this endpoint will be removed in a future release. Use GET /api/v3/files instead.
This endpoint can be used to get the list of available documents for your user account, with optional filtering by workspace, private, or company scope.
GET
/
api
/
v2
/
files
List available documents
curl --request GET \
--url https://api.lighton.ai/api/v2/files \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.lighton.ai/api/v2/files"
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/files', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"object": "list",
"count": 123,
"next": "https://api.lighton.ai/api/v2/files/?page=4",
"previous": "https://api.lighton.ai/api/v2/files/?page=2",
"data": [
{
"count": 123,
"data": [
{
"id": 123,
"object": "<string>",
"created_at": 123,
"filename": "<string>",
"purpose": "<string>",
"status": "<string>",
"signature": "<string>"
}
],
"object": "list",
"next": "<string>",
"previous": "<string>"
}
]
}