Report import progress
const url = 'https://work.optidata.cloud/api/drives/1/imports/1';const options = { method: 'PATCH', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"sent_folders_count":30,"sent_files_count":41,"sent_byte_size":10240000,"status":"running"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request PATCH \ --url https://work.optidata.cloud/api/drives/1/imports/1 \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "sent_folders_count": 30, "sent_files_count": 41, "sent_byte_size": 10240000, "status": "running" }'Updates the counters of a running import. Send only what changed; every
field is optional. Set status to finished when the transfer is done.
Authorizations
Section titled “Authorizations”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters”Numeric id of the drive. Read it from GET /drives/config.json.
Numeric id of the import.
Request Bodyrequired
Section titled “Request Bodyrequired”object
Examples
{ "sent_folders_count": 30, "sent_files_count": 41, "sent_byte_size": 10240000, "status": "running"}Responses
Section titled “ Responses ”The updated import.
Progress bookkeeping for a bulk import of an external file tree.
object
Path of the imported tree on the source system.
Example
{ "origin_path": "D:\\Archive\\2025", "status": "waiting_start"}Missing, malformed or expired authentication key.
Authentication failures use an error key rather than message.
object
Examples
No bearer token sent
{ "error": "JWT passport exception: Missing bearer token in request"}The resource does not exist, or does not belong to the given drive.
Generic error envelope used by policy, binding and framework failures.
object
Human-readable description of the failure.
Examples
{ "message": "No query results for model [App\\Models\\Node] 99999999"}The request body or query string failed validation.
object
The first validation message.
Validation messages keyed by field name.
object
Examples
{ "message": "The name field is required.", "errors": { "name": [ "The name field is required." ] }}Rate limit exceeded. Retry after the window resets.
Generic error envelope used by policy, binding and framework failures.
object
Human-readable description of the failure.
Examples
{ "message": "Too Many Attempts."}