import requests
url = "https://eu.app.clarifeye.ai/api/v1/projects/{project_id}/connections/{connection_id}/import-preview/"
payload = {
"folders": [
{
"id": "<string>",
"name": "<string>",
"drive_id": "<string>"
}
],
"files": [
{
"id": "<string>",
"name": "<string>",
"drive_id": "<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({
folders: [{id: '<string>', name: '<string>', drive_id: '<string>'}],
files: [{id: '<string>', name: '<string>', drive_id: '<string>'}]
})
};
fetch('https://eu.app.clarifeye.ai/api/v1/projects/{project_id}/connections/{connection_id}/import-preview/', 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}/connections/{connection_id}/import-preview/ \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"folders": [
{
"id": "<string>",
"name": "<string>",
"drive_id": "<string>"
}
],
"files": [
{
"id": "<string>",
"name": "<string>",
"drive_id": "<string>"
}
]
}
'{
"task_id": "<string>"
}Start a dry-run count of what an import would do
Starts a background task that enumerates provider metadata (no downloads) for the
given folder/file selection and diffs it against already-imported documents. Poll
import-preview-status with the returned task_id for progress and the result.
An empty selection falls back to the connection’s stored selection. Enumeration is
budgeted (file, request, and wall-clock caps): when truncated is true,
to_create/to_update are partial lower bounds and to_delete is null (a partial
enumeration cannot prove a file was removed).
Counts respect the connection’s file-type rules and the platform supported-type
baseline (blocked files stay in total_remote but not to_create), and
archived documents are excluded from every count (the sync leaves them alone).
import requests
url = "https://eu.app.clarifeye.ai/api/v1/projects/{project_id}/connections/{connection_id}/import-preview/"
payload = {
"folders": [
{
"id": "<string>",
"name": "<string>",
"drive_id": "<string>"
}
],
"files": [
{
"id": "<string>",
"name": "<string>",
"drive_id": "<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({
folders: [{id: '<string>', name: '<string>', drive_id: '<string>'}],
files: [{id: '<string>', name: '<string>', drive_id: '<string>'}]
})
};
fetch('https://eu.app.clarifeye.ai/api/v1/projects/{project_id}/connections/{connection_id}/import-preview/', 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}/connections/{connection_id}/import-preview/ \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"folders": [
{
"id": "<string>",
"name": "<string>",
"drive_id": "<string>"
}
],
"files": [
{
"id": "<string>",
"name": "<string>",
"drive_id": "<string>"
}
]
}
'{
"task_id": "<string>"
}Authorizations
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..
Path Parameters
UUID of the project
UUID of the connection
Response
Count started
Pass to import-preview-status