Archive multiple documents
import requests
url = "https://eu.app.clarifeye.ai/api/v1/projects/{project_id}/documents/bulk-archive/"
payload = {
"document_ids": ["3c90c3cc-0d44-4b50-8888-8dd25736052a"],
"filter": {
"status": "active",
"collection": "<string>",
"search": "<string>",
"path_prefix": "<string>",
"content_type": "<string>",
"min_size_mb": 123,
"max_size_mb": 123,
"min_pages": 123,
"max_pages": 123,
"modified_before": "2023-12-25",
"modified_after": "2023-12-25",
"failure_reason": "<string>"
}
}
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({
document_ids: ['3c90c3cc-0d44-4b50-8888-8dd25736052a'],
filter: {
status: 'active',
collection: '<string>',
search: '<string>',
path_prefix: '<string>',
content_type: '<string>',
min_size_mb: 123,
max_size_mb: 123,
min_pages: 123,
max_pages: 123,
modified_before: '2023-12-25',
modified_after: '2023-12-25',
failure_reason: '<string>'
}
})
};
fetch('https://eu.app.clarifeye.ai/api/v1/projects/{project_id}/documents/bulk-archive/', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request POST \
--url https://eu.app.clarifeye.ai/api/v1/projects/{project_id}/documents/bulk-archive/ \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"document_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"filter": {
"status": "active",
"collection": "<string>",
"search": "<string>",
"path_prefix": "<string>",
"content_type": "<string>",
"min_size_mb": 123,
"max_size_mb": 123,
"min_pages": 123,
"max_pages": 123,
"modified_before": "2023-12-25",
"modified_after": "2023-12-25",
"failure_reason": "<string>"
}
}
'{
"archived": 123,
"skipped": 123
}{
"error": "User not found"
}{
"error": "Authentication credentials were not provided."
}{
"error": "You do not have permission to perform this action."
}Documents
Archive multiple documents
Archive (soft delete) active documents: either up to 200 named by document_ids,
or up to 1000 selected by a filter (send exactly one of the two). Archived
documents leave the library and their indexed data is torn down; there is no
restore. Requires permission to manage sources.
POST
/
projects
/
{project_id}
/
documents
/
bulk-archive
/
Archive multiple documents
import requests
url = "https://eu.app.clarifeye.ai/api/v1/projects/{project_id}/documents/bulk-archive/"
payload = {
"document_ids": ["3c90c3cc-0d44-4b50-8888-8dd25736052a"],
"filter": {
"status": "active",
"collection": "<string>",
"search": "<string>",
"path_prefix": "<string>",
"content_type": "<string>",
"min_size_mb": 123,
"max_size_mb": 123,
"min_pages": 123,
"max_pages": 123,
"modified_before": "2023-12-25",
"modified_after": "2023-12-25",
"failure_reason": "<string>"
}
}
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({
document_ids: ['3c90c3cc-0d44-4b50-8888-8dd25736052a'],
filter: {
status: 'active',
collection: '<string>',
search: '<string>',
path_prefix: '<string>',
content_type: '<string>',
min_size_mb: 123,
max_size_mb: 123,
min_pages: 123,
max_pages: 123,
modified_before: '2023-12-25',
modified_after: '2023-12-25',
failure_reason: '<string>'
}
})
};
fetch('https://eu.app.clarifeye.ai/api/v1/projects/{project_id}/documents/bulk-archive/', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request POST \
--url https://eu.app.clarifeye.ai/api/v1/projects/{project_id}/documents/bulk-archive/ \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"document_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"filter": {
"status": "active",
"collection": "<string>",
"search": "<string>",
"path_prefix": "<string>",
"content_type": "<string>",
"min_size_mb": 123,
"max_size_mb": 123,
"min_pages": 123,
"max_pages": 123,
"modified_before": "2023-12-25",
"modified_after": "2023-12-25",
"failure_reason": "<string>"
}
}
'{
"archived": 123,
"skipped": 123
}{
"error": "User not found"
}{
"error": "Authentication credentials were not provided."
}{
"error": "You do not have permission to perform this action."
}Authorizations
BearerAuthTokenAuth
Use Authorization: Bearer <token>. The token is either a user token / OAuth access
token, or a service-account API key (cfk_...). A key is valid on every endpoint and
acts as its service account, an organization member with per-store permissions.
Refused keys answer 403 with Invalid API key., API key revoked.,
API key expired. or API key disabled..
Body
application/json