Deactivate upload sessions
curl --request POST \
--url https://api.lighton.ai/api/v2/upload-session/deactivate \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"delete_pending_documents": false
}
'import requests
url = "https://api.lighton.ai/api/v2/upload-session/deactivate"
payload = { "delete_pending_documents": False }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({delete_pending_documents: false})
};
fetch('https://api.lighton.ai/api/v2/upload-session/deactivate', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"message": "<string>"
}Upload Sessions
Deactivate upload sessions
deprecated
Deprecated — this endpoint will be removed in a future release. Use POST /api/v3/files instead, which automatically manages upload sessions.
Interrupt and deactivate ongoing upload sessions of the user sending the request.
The pending documents in the upload sessions are deleted.
POST
/
api
/
v2
/
upload-session
/
deactivate
Deactivate upload sessions
curl --request POST \
--url https://api.lighton.ai/api/v2/upload-session/deactivate \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"delete_pending_documents": false
}
'import requests
url = "https://api.lighton.ai/api/v2/upload-session/deactivate"
payload = { "delete_pending_documents": False }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({delete_pending_documents: false})
};
fetch('https://api.lighton.ai/api/v2/upload-session/deactivate', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"message": "<string>"
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
application/jsonapplication/x-www-form-urlencodedmultipart/form-data
Request serializer for deactivating upload sessions.
Whether to delete pending documents when deactivating sessions
Response
200 - application/json
Response serializer for upload session deactivation.
Confirmation message about the session deactivation