uploads

11 endpoints
GET/rest/uploads

Retrieve all user upload sessions

Returns all active (not yet completed) upload sessions associated with the authenticated user. Each record includes the session ID, file name, total and uploaded sizes, chunk counts, and upload URI.

Parameters
Query Parameters
offset
Optional
integer

Offset

limit
Optional
integer

Limit

locate_id
Optional
integer

If specified, "offset" parameter will be ignored
and the page containing entity with this Id will be returned.

with
Optional
string

With parameters

mode
Optional
string

Determines the detail level of the response body.


Responses

Upload sessions retrieved successfully.

id
integer

Unique identifier for the upload.

userId
string

Unique identifier of the user who initiated the upload.

timestamp
string

Timestamp when the upload was initiated.

totalSize
integer

Total size of the uploaded file in bytes.

totalChunks
integer

Total number of chunks the file was split into.

clientName
string

Name of the client uploading the file.

svrUploadTime
integer

Time taken by the server to process the upload (in milliseconds).

uploadedSize
integer

Total size of the uploaded chunks in bytes.

lastTimestamp
string

Timestamp of the last uploaded chunk.

error
string

Error message in case of upload failure.

uri
any

The URI for the upload link.

completeOk
integer

Flag indicating if the upload was completed successfully (1 for success, 0 otherwise).

fileUrl
string

URL where the uploaded file can be accessed.

replaceId
string

ID of the file being replaced, if applicable.

backend
string

Backend storage system used for the upload.

finished
boolean

Indicates whether the upload process has finished.

clientCreated
string

Timestamp when the file was created on the client side.

clientModified
string

Timestamp when the file was last modified on the client side.

requestFileId
integer

ID of the file request associated with the upload.

emailId
integer

ID of the email associated with the uploaded file, if applicable.

uploadedChunks
integer

Number of chunks successfully uploaded.

location
string

The logical storage location of the uploaded file.

uploadUrl
any

The complete URL for the upload link.

total
integer

Total number of items available.

limit
integer

Maximum number of items returned per page.

offset
integer

Number of items skipped before the current page.

Request blocked by WAF

Empty response body.
Shell
curl -X GET \
  "https://{instance}.kiteworks.com/rest/uploads" \
  -H "Authorization: Bearer YOUR_TOKEN"
Python
import requests

url = "https://{instance}.kiteworks.com/rest/uploads"
headers = {
    "Authorization": "Bearer YOUR_TOKEN",
}
response = requests.get(url, headers=headers)
print(response.json())
Responses
{ "data": [ { "id": 101, "userId": 42, "timestamp": "2024-03-01T10:00:00+00:00", "uploadedSize": 1048576, "uploadedChunks": 1, "error": null, "finished": false, "fileUrl": null } ], "metadata": { "total": 1, "limit": 50, "offset": 0 } }
// Error - No Body
GET/rest/uploads/config

Get upload server configuration

Returns the configuration of the upload server, including its active status and the maximum allowed chunk size.

This endpoint requires no parameters.

Responses

Upload server configuration retrieved successfully.

acfsDbname
string

ACFS database name

active
integer

Indicates whether the upload server is active

message
string

ACFS status message

minReplication
string

Minimum replication factor required for data stored on this ACFS node

uploadChunkMax
integer

Maximum size of a single upload chunk in bytes

uploadTimeout
integer

Upload timeout in seconds

uploadWipe
integer

Indicates whether uploaded data is wiped from temporary storage after processing

Request blocked by WAF

Empty response body.
Shell
curl -X GET \
  "https://{instance}.kiteworks.com/rest/uploads/config" \
  -H "Authorization: Bearer YOUR_TOKEN"
Python
import requests

url = "https://{instance}.kiteworks.com/rest/uploads/config"
headers = {
    "Authorization": "Bearer YOUR_TOKEN",
}
response = requests.get(url, headers=headers)
print(response.json())
Responses
{ "active": 1, "uploadChunkMax": 10485760 }
// Error - No Body
GET/rest/uploads/{id}

Get upload session

Returns the details of the specified upload session, including its progress, file size, chunk counts, and upload URI.

Parameters
Path Parameters
id
Required
integer

The unique identifier of the upload session

Query Parameters
with
Optional
string

With parameters

mode
Optional
string

Determines the detail level of the response body.


Responses

Upload session details retrieved successfully.

id
integer

Unique identifier for the upload.

userId
string

Unique identifier of the user who initiated the upload.

timestamp
string

Timestamp when the upload was initiated.

totalSize
integer

Total size of the uploaded file in bytes.

totalChunks
integer

Total number of chunks the file was split into.

clientName
string

Name of the client uploading the file.

svrUploadTime
integer

Time taken by the server to process the upload (in milliseconds).

uploadedSize
integer

Total size of the uploaded chunks in bytes.

lastTimestamp
string

Timestamp of the last uploaded chunk.

error
string

Error message in case of upload failure.

uri
any

The URI for the upload link.

completeOk
integer

Flag indicating if the upload was completed successfully (1 for success, 0 otherwise).

fileUrl
string

URL where the uploaded file can be accessed.

replaceId
string

ID of the file being replaced, if applicable.

backend
string

Backend storage system used for the upload.

finished
boolean

Indicates whether the upload process has finished.

clientCreated
string

Timestamp when the file was created on the client side.

clientModified
string

Timestamp when the file was last modified on the client side.

requestFileId
integer

ID of the file request associated with the upload.

emailId
integer

ID of the email associated with the uploaded file, if applicable.

uploadedChunks
integer

Number of chunks successfully uploaded.

location
string

The logical storage location of the uploaded file.

uploadUrl
any

The complete URL for the upload link.

Request blocked by WAF

Empty response body.
Shell
curl -X GET \
  "https://{instance}.kiteworks.com/rest/uploads/:id" \
  -H "Authorization: Bearer YOUR_TOKEN"
Python
import requests

id = "VALUE"  # The unique identifier of the upload session

url = f"https://{{instance}}.kiteworks.com/rest/uploads/{id}"
headers = {
    "Authorization": "Bearer YOUR_TOKEN",
}
response = requests.get(url, headers=headers)
print(response.json())
Responses
{ "id": 101, "userId": 42, "timestamp": "2024-03-01T10:00:00+00:00", "uploadedSize": 1048576, "uploadedChunks": 1, "error": null, "finished": false, "fileUrl": null }
// Error - No Body
DELETE/rest/uploads/{id}

Terminate upload session

Terminates the specified upload session and discards any uploaded chunks. If the session resides on a different upload node, the termination request is forwarded to that node.

Parameters
Path Parameters
id
Required
integer

The unique identifier of the upload session.


Responses

Upload session terminated successfully.

Empty response body.

Request blocked by WAF

Empty response body.
Shell
curl -X DELETE \
  "https://{instance}.kiteworks.com/rest/uploads/:id" \
  -H "Authorization: Bearer YOUR_TOKEN"
Python
import requests

id = "VALUE"  # The unique identifier of the upload session.

url = f"https://{{instance}}.kiteworks.com/rest/uploads/{id}"
headers = {
    "Authorization": "Bearer YOUR_TOKEN",
}
response = requests.delete(url, headers=headers)
print(response.json())
Responses
// Request successful - No Body
// Error - No Body
POST/rest/folders/{id}/actions/initiateUpload/zip

Initiate a ZIP archive upload session for a folder

Description:

Creates an upload session for a ZIP archive to be uploaded to the specified folder. The archive will be automatically extracted after all chunks are received. Once the session is created, an upload link is returned which can be used to upload the archive in chunks.

Precondition:

The user must have `file_add` permission for the folder.

Response:

The upload session is created and an upload link is returned for subsequent chunk uploads.
Parameters
Path Parameters
id
Required
string

The unique identifier (UUID) of the entity.


Request Body
filename
Required
string

Name of the file to be uploaded.

totalSize
integer

Total size of the file to be uploaded, in bytes.

totalChunks
integer

Total number of chunks the file will be split into. Must be at least 1.

clientCreated
string

File creation timestamp as reported by the client (e.g. from the OS or browser).

clientModified
string

File last-modified timestamp as reported by the client (e.g. from the OS or browser).

proximateHost
string

Proximate hostname used to direct client uploads to the nearest available storage endpoint.

tracking_id
string

Tracking ID for correlating the upload with an external transfer

resume
boolean

Indicates whether this is a resumption of a previously interrupted upload. Only applicable when a file with the same name already exists. Currently used internally for SFTP transfers only.

uncompressedSize
Required
integer

Total uncompressed size of the archive file, in bytes.


Responses

Upload session successfully created and an upload link returned.

id
integer

Unique identifier for the upload.

userId
string

Unique identifier of the user who initiated the upload.

timestamp
string

Timestamp when the upload was initiated.

totalSize
integer

Total size of the uploaded file in bytes.

totalChunks
integer

Total number of chunks the file was split into.

clientName
string

Name of the client uploading the file.

svrUploadTime
integer

Time taken by the server to process the upload (in milliseconds).

uploadedSize
integer

Total size of the uploaded chunks in bytes.

lastTimestamp
string

Timestamp of the last uploaded chunk.

error
string

Error message in case of upload failure.

uri
any

The URI for the upload link.

completeOk
integer

Flag indicating if the upload was completed successfully (1 for success, 0 otherwise).

fileUrl
string

URL where the uploaded file can be accessed.

replaceId
string

ID of the file being replaced, if applicable.

backend
string

Backend storage system used for the upload.

finished
boolean

Indicates whether the upload process has finished.

clientCreated
string

Timestamp when the file was created on the client side.

clientModified
string

Timestamp when the file was last modified on the client side.

requestFileId
integer

ID of the file request associated with the upload.

emailId
integer

ID of the email associated with the uploaded file, if applicable.

uploadedChunks
integer

Number of chunks successfully uploaded.

location
string

The logical storage location of the uploaded file.

uploadUrl
any

The complete URL for the upload link.

Bad Request

Possible error codes: ERR_REQUEST_INVALID_JSON

code
string

Error code

message
string

Error message

Unauthorized

Possible error codes: ERR_AUTH_INVALID_CSRF, ERR_AUTH_UNAUTHORIZED

code
string

Error code

message
string

Error message

Forbidden

Possible error codes: ERR_ACCESS_USER, ERR_ENTITY_DLP_LOCKED, ERR_ENTITY_IS_BASE_DIR, ERR_ENTITY_NOT_SCANNED, ERR_ENTITY_RESTRICTED_EXTENSION, ERR_ENTITY_VIRUS_FOUND

code
string

Error code

message
string

Error message

Content Too Large

Possible error codes: ERR_SYSTEM_NO_STORAGE_AVAILABLE

code
string

Error code

message
string

Error message

Unprocessable Content

Possible error codes: ERR_INPUT_INVALID_DATE, ERR_INPUT_INVALID_FORMAT, ERR_INPUT_MAX_VALUE, ERR_INPUT_MIN_VALUE, ERR_INVALID_PARAMETER, ERR_SYSTEM_NO_STORAGE_AVAILABLE, ERR_SYSTEM_NO_AVAILABLE_STORAGE_HOSTS

code
string

Error code

message
string

Error message

Request blocked by WAF

Empty response body.
Shell
curl -X POST \
  "https://{instance}.kiteworks.com/rest/folders/:id/actions/initiateUpload/zip" \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
         "filename": "string",
         "totalSize": 1,
         "totalChunks": 1,
         "clientCreated": "2024-01-15",
         "clientModified": "2024-01-15",
         "proximateHost": "string"
       }'
Python
import requests

id = "VALUE"  # The unique identifier (UUID) of the entity.

url = f"https://{{instance}}.kiteworks.com/rest/folders/{id}/actions/initiateUpload/zip"
headers = {
    "Authorization": "Bearer YOUR_TOKEN",
    "Content-Type": "application/json",
}
payload = {
  "filename": "string",
  "totalSize": 1,
  "totalChunks": 1,
  "clientCreated": "2024-01-15",
  "clientModified": "2024-01-15",
  "proximateHost": "string"
}
response = requests.post(url, headers=headers, json=payload)
print(response.json())
Responses
{ "id": 1, "userId": "string", "timestamp": "2024-01-15", "totalSize": 1, "totalChunks": 1, "clientName": "string" }
{ "errors": [ { "code": "ERR_REQUEST_INVALID_JSON", "message": "Invalid json provided" } ] }
{ "errors": [ { "code": "ERR_AUTH_INVALID_CSRF", "message": "Invalid CSRF Authentication" } ] }
{ "errors": [ { "code": "ERR_AUTH_UNAUTHORIZED", "message": "Unauthorized" } ] }
{ "errors": [ { "code": "ERR_ACCESS_USER", "message": "Insufficient access permissions" } ] }
{ "errors": [ { "code": "ERR_ENTITY_DLP_LOCKED", "message": "One or more files have been quarantined and are not available to download. Please contact your administrator for assistance." } ] }
{ "errors": [ { "code": "ERR_ENTITY_IS_BASE_DIR", "message": "Operation not permitted on Base Folder" } ] }
{ "errors": [ { "code": "ERR_ENTITY_NOT_SCANNED", "message": "One or more files are undergoing security and privacy scans. Please try again later." } ] }
{ "errors": [ { "code": "ERR_ENTITY_RESTRICTED_EXTENSION", "message": "File extension is in exclusion extensions list" } ] }
{ "errors": [ { "code": "ERR_ENTITY_VIRUS_FOUND", "message": "File is infected" } ] }
{ "errors": [ { "code": "ERR_SYSTEM_NO_STORAGE_AVAILABLE", "message": "Folder owner's remaining storage quota does not permit for a file upload of this size." } ] }
{ "errors": [ { "code": "ERR_INPUT_INVALID_DATE", "message": "The input is not a valid date." } ] }
{ "errors": [ { "code": "ERR_INPUT_INVALID_FORMAT", "message": "The input is invalid." } ] }
{ "errors": [ { "code": "ERR_INPUT_MAX_VALUE", "message": "The specified input exceed the maximum allowed value." } ] }
{ "errors": [ { "code": "ERR_INPUT_MIN_VALUE", "message": "The specified input below the minimum allowed value." } ] }
{ "errors": [ { "code": "ERR_INVALID_PARAMETER", "message": "Invalid Parameter Exception" } ] }
{ "errors": [ { "code": "ERR_SYSTEM_NO_STORAGE_AVAILABLE", "message": "Folder owner's remaining storage quota does not permit for a file upload of this size." } ] }
{ "errors": [ { "code": "ERR_SYSTEM_NO_AVAILABLE_STORAGE_HOSTS", "message": "No available storage hosts" } ] }
// Error - No Body
POST/rest/folders/{id}/actions/initiateUpload

Initiate a file upload session for a folder

Description:

Creates an upload session for a file to be added to the specified folder. Once the session is created, an upload link is returned which can be used to upload the file in chunks.

Precondition:

The user must have `file_add` permission for the folder.

Response:

The upload session is created and an upload link is returned for subsequent chunk uploads.
Parameters
Path Parameters
id
Required
string

The unique identifier (UUID) of the entity.


Request Body
filename
Required
string

Name of the file to be uploaded.

totalSize
integer

Total size of the file to be uploaded, in bytes.

totalChunks
integer

Total number of chunks the file will be split into. Must be at least 1.

clientCreated
string

File creation timestamp as reported by the client (e.g. from the OS or browser).

clientModified
string

File last-modified timestamp as reported by the client (e.g. from the OS or browser).

proximateHost
string

Proximate hostname used to direct client uploads to the nearest available storage endpoint.

tracking_id
string

Tracking ID for correlating the upload with an external transfer

resume
boolean

Indicates whether this is a resumption of a previously interrupted upload. Only applicable when a file with the same name already exists. Currently used internally for SFTP transfers only.


Responses

Upload session successfully created and an upload link returned.

id
integer

Unique identifier for the upload.

userId
string

Unique identifier of the user who initiated the upload.

timestamp
string

Timestamp when the upload was initiated.

totalSize
integer

Total size of the uploaded file in bytes.

totalChunks
integer

Total number of chunks the file was split into.

clientName
string

Name of the client uploading the file.

svrUploadTime
integer

Time taken by the server to process the upload (in milliseconds).

uploadedSize
integer

Total size of the uploaded chunks in bytes.

lastTimestamp
string

Timestamp of the last uploaded chunk.

error
string

Error message in case of upload failure.

uri
any

The URI for the upload link.

completeOk
integer

Flag indicating if the upload was completed successfully (1 for success, 0 otherwise).

fileUrl
string

URL where the uploaded file can be accessed.

replaceId
string

ID of the file being replaced, if applicable.

backend
string

Backend storage system used for the upload.

finished
boolean

Indicates whether the upload process has finished.

clientCreated
string

Timestamp when the file was created on the client side.

clientModified
string

Timestamp when the file was last modified on the client side.

requestFileId
integer

ID of the file request associated with the upload.

emailId
integer

ID of the email associated with the uploaded file, if applicable.

uploadedChunks
integer

Number of chunks successfully uploaded.

location
string

The logical storage location of the uploaded file.

uploadUrl
any

The complete URL for the upload link.

Bad Request

Possible error codes: ERR_REQUEST_INVALID_JSON

code
string

Error code

message
string

Error message

Unauthorized

Possible error codes: ERR_AUTH_INVALID_CSRF, ERR_AUTH_UNAUTHORIZED

code
string

Error code

message
string

Error message

Forbidden

Possible error codes: ERR_ACCESS_USER, ERR_ENTITY_DLP_LOCKED, ERR_ENTITY_IS_BASE_DIR, ERR_ENTITY_NOT_SCANNED, ERR_ENTITY_RESTRICTED_EXTENSION, ERR_ENTITY_VIRUS_FOUND

code
string

Error code

message
string

Error message

Content Too Large

Possible error codes: ERR_SYSTEM_NO_STORAGE_AVAILABLE

code
string

Error code

message
string

Error message

Unprocessable Content

Possible error codes: ERR_INPUT_INVALID_DATE, ERR_INPUT_INVALID_FORMAT, ERR_INPUT_MAX_VALUE, ERR_INPUT_MIN_VALUE, ERR_INVALID_PARAMETER, ERR_SYSTEM_NO_STORAGE_AVAILABLE, ERR_SYSTEM_NO_AVAILABLE_STORAGE_HOSTS

code
string

Error code

message
string

Error message

Request blocked by WAF

Empty response body.
Shell
curl -X POST \
  "https://{instance}.kiteworks.com/rest/folders/:id/actions/initiateUpload" \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
         "filename": "string",
         "totalSize": 1,
         "totalChunks": 1,
         "clientCreated": "2024-01-15",
         "clientModified": "2024-01-15",
         "proximateHost": "string"
       }'
Python
import requests

id = "VALUE"  # The unique identifier (UUID) of the entity.

url = f"https://{{instance}}.kiteworks.com/rest/folders/{id}/actions/initiateUpload"
headers = {
    "Authorization": "Bearer YOUR_TOKEN",
    "Content-Type": "application/json",
}
payload = {
  "filename": "string",
  "totalSize": 1,
  "totalChunks": 1,
  "clientCreated": "2024-01-15",
  "clientModified": "2024-01-15",
  "proximateHost": "string"
}
response = requests.post(url, headers=headers, json=payload)
print(response.json())
Responses
{ "id": 1, "userId": "string", "timestamp": "2024-01-15", "totalSize": 1, "totalChunks": 1, "clientName": "string" }
{ "errors": [ { "code": "ERR_REQUEST_INVALID_JSON", "message": "Invalid json provided" } ] }
{ "errors": [ { "code": "ERR_AUTH_INVALID_CSRF", "message": "Invalid CSRF Authentication" } ] }
{ "errors": [ { "code": "ERR_AUTH_UNAUTHORIZED", "message": "Unauthorized" } ] }
{ "errors": [ { "code": "ERR_ACCESS_USER", "message": "Insufficient access permissions" } ] }
{ "errors": [ { "code": "ERR_ENTITY_DLP_LOCKED", "message": "One or more files have been quarantined and are not available to download. Please contact your administrator for assistance." } ] }
{ "errors": [ { "code": "ERR_ENTITY_IS_BASE_DIR", "message": "Operation not permitted on Base Folder" } ] }
{ "errors": [ { "code": "ERR_ENTITY_NOT_SCANNED", "message": "One or more files are undergoing security and privacy scans. Please try again later." } ] }
{ "errors": [ { "code": "ERR_ENTITY_RESTRICTED_EXTENSION", "message": "File extension is in exclusion extensions list" } ] }
{ "errors": [ { "code": "ERR_ENTITY_VIRUS_FOUND", "message": "File is infected" } ] }
{ "errors": [ { "code": "ERR_SYSTEM_NO_STORAGE_AVAILABLE", "message": "Folder owner's remaining storage quota does not permit for a file upload of this size." } ] }
{ "errors": [ { "code": "ERR_INPUT_INVALID_DATE", "message": "The input is not a valid date." } ] }
{ "errors": [ { "code": "ERR_INPUT_INVALID_FORMAT", "message": "The input is invalid." } ] }
{ "errors": [ { "code": "ERR_INPUT_MAX_VALUE", "message": "The specified input exceed the maximum allowed value." } ] }
{ "errors": [ { "code": "ERR_INPUT_MIN_VALUE", "message": "The specified input below the minimum allowed value." } ] }
{ "errors": [ { "code": "ERR_INVALID_PARAMETER", "message": "Invalid Parameter Exception" } ] }
{ "errors": [ { "code": "ERR_SYSTEM_NO_STORAGE_AVAILABLE", "message": "Folder owner's remaining storage quota does not permit for a file upload of this size." } ] }
{ "errors": [ { "code": "ERR_SYSTEM_NO_AVAILABLE_STORAGE_HOSTS", "message": "No available storage hosts" } ] }
// Error - No Body
POST/rest/requestFile/{ref}/actions/initiateUpload

Initiate a file upload session for a request file

Description:

Creates an upload session for a file to be uploaded to a request file. Once the session is created, an upload link is returned which can be used to upload the file in chunks.

Precondition:

The caller must have access to the request file for uploading.

Response:

The upload session is created and an upload link is returned for subsequent chunk uploads.
Parameters
Path Parameters
ref
Required
string

The unique reference of the Request File upload link.


Request Body
filename
Required
string

Name of the file to be uploaded.

totalSize
integer

Total size of the file to be uploaded, in bytes.

totalChunks
integer

Total number of chunks the file will be split into. Must be at least 1.

clientCreated
string

File creation timestamp as reported by the client (e.g. from the OS or browser).

clientModified
string

File last-modified timestamp as reported by the client (e.g. from the OS or browser).

proximateHost
string

Proximate hostname used to direct client uploads to the nearest available storage endpoint.

tracking_id
string

Tracking ID for correlating the upload with an external transfer

resume
boolean

Indicates whether this is a resumption of a previously interrupted upload. Only applicable when a file with the same name already exists. Currently used internally for SFTP transfers only.


Responses

Upload session successfully created and an upload link returned.

id
integer

Unique identifier for the upload.

userId
string

Unique identifier of the user who initiated the upload.

timestamp
string

Timestamp when the upload was initiated.

totalSize
integer

Total size of the uploaded file in bytes.

totalChunks
integer

Total number of chunks the file was split into.

clientName
string

Name of the client uploading the file.

svrUploadTime
integer

Time taken by the server to process the upload (in milliseconds).

uploadedSize
integer

Total size of the uploaded chunks in bytes.

lastTimestamp
string

Timestamp of the last uploaded chunk.

error
string

Error message in case of upload failure.

uri
any

The URI for the upload link.

completeOk
integer

Flag indicating if the upload was completed successfully (1 for success, 0 otherwise).

fileUrl
string

URL where the uploaded file can be accessed.

replaceId
string

ID of the file being replaced, if applicable.

backend
string

Backend storage system used for the upload.

finished
boolean

Indicates whether the upload process has finished.

clientCreated
string

Timestamp when the file was created on the client side.

clientModified
string

Timestamp when the file was last modified on the client side.

requestFileId
integer

ID of the file request associated with the upload.

emailId
integer

ID of the email associated with the uploaded file, if applicable.

uploadedChunks
integer

Number of chunks successfully uploaded.

location
string

The logical storage location of the uploaded file.

uploadUrl
any

The complete URL for the upload link.

Bad Request

Possible error codes: ERR_REQUEST_INVALID_JSON

code
string

Error code

message
string

Error message

Unauthorized

Possible error codes: ERR_AUTH_INVALID_CSRF, ERR_AUTH_UNAUTHORIZED

code
string

Error code

message
string

Error message

Forbidden

Possible error codes: ERR_ACCESS_USER, ERR_ENTITY_IS_BASE_DIR, ERR_ENTITY_REQUEST_FILE_UPLOAD_LIMIT_REACHED, ERR_ENTITY_RESTRICTED_EXTENSION

code
string

Error code

message
string

Error message

Content Too Large

Possible error codes: ERR_SYSTEM_NO_STORAGE_AVAILABLE

code
string

Error code

message
string

Error message

Unprocessable Content

Possible error codes: ERR_INPUT_INVALID_DATE, ERR_INPUT_INVALID_FORMAT, ERR_INPUT_MAX_VALUE, ERR_INPUT_MIN_VALUE, ERR_INVALID_PARAMETER, ERR_SYSTEM_NO_AVAILABLE_STORAGE_HOSTS

code
string

Error code

message
string

Error message

Request blocked by WAF

Empty response body.
Shell
curl -X POST \
  "https://{instance}.kiteworks.com/rest/requestFile/:ref/actions/initiateUpload" \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
         "filename": "string",
         "totalSize": 1,
         "totalChunks": 1,
         "clientCreated": "2024-01-15",
         "clientModified": "2024-01-15",
         "proximateHost": "string"
       }'
Python
import requests

ref = "VALUE"  # The unique reference of the Request File upload link.

url = f"https://{{instance}}.kiteworks.com/rest/requestFile/{ref}/actions/initiateUpload"
headers = {
    "Authorization": "Bearer YOUR_TOKEN",
    "Content-Type": "application/json",
}
payload = {
  "filename": "string",
  "totalSize": 1,
  "totalChunks": 1,
  "clientCreated": "2024-01-15",
  "clientModified": "2024-01-15",
  "proximateHost": "string"
}
response = requests.post(url, headers=headers, json=payload)
print(response.json())
Responses
{ "id": 1, "userId": "string", "timestamp": "2024-01-15", "totalSize": 1, "totalChunks": 1, "clientName": "string" }
{ "errors": [ { "code": "ERR_REQUEST_INVALID_JSON", "message": "Invalid json provided" } ] }
{ "errors": [ { "code": "ERR_AUTH_INVALID_CSRF", "message": "Invalid CSRF Authentication" } ] }
{ "errors": [ { "code": "ERR_AUTH_UNAUTHORIZED", "message": "Unauthorized" } ] }
{ "errors": [ { "code": "ERR_ACCESS_USER", "message": "Insufficient access permissions" } ] }
{ "errors": [ { "code": "ERR_ENTITY_IS_BASE_DIR", "message": "Operation not permitted on Base Folder" } ] }
{ "errors": [ { "code": "ERR_ENTITY_REQUEST_FILE_UPLOAD_LIMIT_REACHED", "message": "Upload limit has reached." } ] }
{ "errors": [ { "code": "ERR_ENTITY_RESTRICTED_EXTENSION", "message": "File extension is in exclusion extensions list" } ] }
{ "errors": [ { "code": "ERR_SYSTEM_NO_STORAGE_AVAILABLE", "message": "Folder owner's remaining storage quota does not permit for a file upload of this size." } ] }
{ "errors": [ { "code": "ERR_INPUT_INVALID_DATE", "message": "The input is not a valid date." } ] }
{ "errors": [ { "code": "ERR_INPUT_INVALID_FORMAT", "message": "The input is invalid." } ] }
{ "errors": [ { "code": "ERR_INPUT_MAX_VALUE", "message": "The specified input exceed the maximum allowed value." } ] }
{ "errors": [ { "code": "ERR_INPUT_MIN_VALUE", "message": "The specified input below the minimum allowed value." } ] }
{ "errors": [ { "code": "ERR_INVALID_PARAMETER", "message": "Invalid Parameter Exception" } ] }
{ "errors": [ { "code": "ERR_SYSTEM_NO_AVAILABLE_STORAGE_HOSTS", "message": "No available storage hosts" } ] }
// Error - No Body
POST/rest/mail/{id}/actions/initiateUpload

Initiate a file upload session for an email attachment

Description:

Creates an upload session for a file to be attached to an email. Once the session is created, an upload link is returned which can be used to upload the attachment in chunks.

Precondition:

The user must be the sender of the email.

Response:

The upload session is created and an upload link is returned for subsequent chunk uploads.
Parameters
Path Parameters
id
Required
string

The unique identifier (UUID) of the email.


Request Body
filename
Required
string

Name of the file to be uploaded.

totalSize
integer

Total size of the file to be uploaded, in bytes.

totalChunks
integer

Total number of chunks the file will be split into. Must be at least 1.

clientCreated
string

File creation timestamp as reported by the client (e.g. from the OS or browser).

clientModified
string

File last-modified timestamp as reported by the client (e.g. from the OS or browser).

proximateHost
string

Proximate hostname used to direct client uploads to the nearest available storage endpoint.

tracking_id
string

Tracking ID for correlating the upload with an external transfer

resume
boolean

Indicates whether this is a resumption of a previously interrupted upload. Only applicable when a file with the same name already exists. Currently used internally for SFTP transfers only.


Responses

Upload session successfully created and an upload link returned.

id
integer

Unique identifier for the upload.

userId
string

Unique identifier of the user who initiated the upload.

timestamp
string

Timestamp when the upload was initiated.

totalSize
integer

Total size of the uploaded file in bytes.

totalChunks
integer

Total number of chunks the file was split into.

clientName
string

Name of the client uploading the file.

svrUploadTime
integer

Time taken by the server to process the upload (in milliseconds).

uploadedSize
integer

Total size of the uploaded chunks in bytes.

lastTimestamp
string

Timestamp of the last uploaded chunk.

error
string

Error message in case of upload failure.

uri
any

The URI for the upload link.

completeOk
integer

Flag indicating if the upload was completed successfully (1 for success, 0 otherwise).

fileUrl
string

URL where the uploaded file can be accessed.

replaceId
string

ID of the file being replaced, if applicable.

backend
string

Backend storage system used for the upload.

finished
boolean

Indicates whether the upload process has finished.

clientCreated
string

Timestamp when the file was created on the client side.

clientModified
string

Timestamp when the file was last modified on the client side.

requestFileId
integer

ID of the file request associated with the upload.

emailId
integer

ID of the email associated with the uploaded file, if applicable.

uploadedChunks
integer

Number of chunks successfully uploaded.

location
string

The logical storage location of the uploaded file.

uploadUrl
any

The complete URL for the upload link.

Bad Request

Possible error codes: ERR_REQUEST_INVALID_JSON

code
string

Error code

message
string

Error message

Unauthorized

Possible error codes: ERR_AUTH_INVALID_CSRF, ERR_AUTH_UNAUTHORIZED

code
string

Error code

message
string

Error message

Forbidden

Possible error codes: ERR_ACCESS_USER, ERR_ENTITY_IS_BASE_DIR, ERR_ENTITY_RESTRICTED_EXTENSION

code
string

Error code

message
string

Error message

Content Too Large

Possible error codes: ERR_SYSTEM_NO_STORAGE_AVAILABLE

code
string

Error code

message
string

Error message

Unprocessable Content

Possible error codes: ERR_INPUT_INVALID_DATE, ERR_INPUT_INVALID_FORMAT, ERR_INPUT_MAX_VALUE, ERR_INPUT_MIN_VALUE, ERR_INVALID_PARAMETER, ERR_SYSTEM_NO_AVAILABLE_STORAGE_HOSTS

code
string

Error code

message
string

Error message

Request blocked by WAF

Empty response body.
Shell
curl -X POST \
  "https://{instance}.kiteworks.com/rest/mail/:id/actions/initiateUpload" \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
         "filename": "string",
         "totalSize": 1,
         "totalChunks": 1,
         "clientCreated": "2024-01-15",
         "clientModified": "2024-01-15",
         "proximateHost": "string"
       }'
Python
import requests

id = "VALUE"  # The unique identifier (UUID) of the email.

url = f"https://{{instance}}.kiteworks.com/rest/mail/{id}/actions/initiateUpload"
headers = {
    "Authorization": "Bearer YOUR_TOKEN",
    "Content-Type": "application/json",
}
payload = {
  "filename": "string",
  "totalSize": 1,
  "totalChunks": 1,
  "clientCreated": "2024-01-15",
  "clientModified": "2024-01-15",
  "proximateHost": "string"
}
response = requests.post(url, headers=headers, json=payload)
print(response.json())
Responses
{ "id": 1, "userId": "string", "timestamp": "2024-01-15", "totalSize": 1, "totalChunks": 1, "clientName": "string" }
{ "errors": [ { "code": "ERR_REQUEST_INVALID_JSON", "message": "Invalid json provided" } ] }
{ "errors": [ { "code": "ERR_AUTH_INVALID_CSRF", "message": "Invalid CSRF Authentication" } ] }
{ "errors": [ { "code": "ERR_AUTH_UNAUTHORIZED", "message": "Unauthorized" } ] }
{ "errors": [ { "code": "ERR_ACCESS_USER", "message": "Insufficient access permissions" } ] }
{ "errors": [ { "code": "ERR_ENTITY_IS_BASE_DIR", "message": "Operation not permitted on Base Folder" } ] }
{ "errors": [ { "code": "ERR_ENTITY_RESTRICTED_EXTENSION", "message": "File extension is in exclusion extensions list" } ] }
{ "errors": [ { "code": "ERR_SYSTEM_NO_STORAGE_AVAILABLE", "message": "Folder owner's remaining storage quota does not permit for a file upload of this size." } ] }
{ "errors": [ { "code": "ERR_INPUT_INVALID_DATE", "message": "The input is not a valid date." } ] }
{ "errors": [ { "code": "ERR_INPUT_INVALID_FORMAT", "message": "The input is invalid." } ] }
{ "errors": [ { "code": "ERR_INPUT_MAX_VALUE", "message": "The specified input exceed the maximum allowed value." } ] }
{ "errors": [ { "code": "ERR_INPUT_MIN_VALUE", "message": "The specified input below the minimum allowed value." } ] }
{ "errors": [ { "code": "ERR_INVALID_PARAMETER", "message": "Invalid Parameter Exception" } ] }
{ "errors": [ { "code": "ERR_SYSTEM_NO_AVAILABLE_STORAGE_HOSTS", "message": "No available storage hosts" } ] }
// Error - No Body
POST/rest/public/mail/{id}/actions/initiateUpload

Initiate an unauthenticated file upload session for an email attachment

Description:

Creates an upload session for a file to be attached to an email, without requiring full authentication. Once the session is created, an upload link is returned which can be used to upload the attachment in chunks.

Precondition:

The caller must have a valid unauthenticated access context for the specified email.

Response:

The upload session is created and an upload link is returned for subsequent chunk uploads.
Parameters
Path Parameters
id
Required
string

The unique identifier (UUID) of the email.


Request Body
filename
Required
string

Name of the file to be uploaded.

totalSize
integer

Total size of the file to be uploaded, in bytes.

totalChunks
integer

Total number of chunks the file will be split into. Must be at least 1.

clientCreated
string

File creation timestamp as reported by the client (e.g. from the OS or browser).

clientModified
string

File last-modified timestamp as reported by the client (e.g. from the OS or browser).

proximateHost
string

Proximate hostname used to direct client uploads to the nearest available storage endpoint.

tracking_id
string

Tracking ID for correlating the upload with an external transfer

resume
boolean

Indicates whether this is a resumption of a previously interrupted upload. Only applicable when a file with the same name already exists. Currently used internally for SFTP transfers only.


Responses

Upload session successfully created and an upload link returned.

id
integer

Unique identifier for the upload.

userId
string

Unique identifier of the user who initiated the upload.

timestamp
string

Timestamp when the upload was initiated.

totalSize
integer

Total size of the uploaded file in bytes.

totalChunks
integer

Total number of chunks the file was split into.

clientName
string

Name of the client uploading the file.

svrUploadTime
integer

Time taken by the server to process the upload (in milliseconds).

uploadedSize
integer

Total size of the uploaded chunks in bytes.

lastTimestamp
string

Timestamp of the last uploaded chunk.

error
string

Error message in case of upload failure.

uri
any

The URI for the upload link.

completeOk
integer

Flag indicating if the upload was completed successfully (1 for success, 0 otherwise).

fileUrl
string

URL where the uploaded file can be accessed.

replaceId
string

ID of the file being replaced, if applicable.

backend
string

Backend storage system used for the upload.

finished
boolean

Indicates whether the upload process has finished.

clientCreated
string

Timestamp when the file was created on the client side.

clientModified
string

Timestamp when the file was last modified on the client side.

requestFileId
integer

ID of the file request associated with the upload.

emailId
integer

ID of the email associated with the uploaded file, if applicable.

uploadedChunks
integer

Number of chunks successfully uploaded.

location
string

The logical storage location of the uploaded file.

uploadUrl
any

The complete URL for the upload link.

Bad Request

Possible error codes: ERR_REQUEST_INVALID_JSON

code
string

Error code

message
string

Error message

Unauthorized

Possible error codes: ERR_AUTH_INVALID_CSRF, ERR_AUTH_UNAUTHORIZED

code
string

Error code

message
string

Error message

Forbidden

Possible error codes: ERR_ACCESS_USER, ERR_ENTITY_IS_BASE_DIR, ERR_ENTITY_RESTRICTED_EXTENSION

code
string

Error code

message
string

Error message

Content Too Large

Possible error codes: ERR_SYSTEM_NO_STORAGE_AVAILABLE

code
string

Error code

message
string

Error message

Unprocessable Content

Possible error codes: ERR_INPUT_INVALID_DATE, ERR_INPUT_INVALID_FORMAT, ERR_INPUT_MAX_VALUE, ERR_INPUT_MIN_VALUE, ERR_INVALID_PARAMETER, ERR_SYSTEM_NO_AVAILABLE_STORAGE_HOSTS

code
string

Error code

message
string

Error message

Request blocked by WAF

Empty response body.
Shell
curl -X POST \
  "https://{instance}.kiteworks.com/rest/public/mail/:id/actions/initiateUpload" \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
         "filename": "string",
         "totalSize": 1,
         "totalChunks": 1,
         "clientCreated": "2024-01-15",
         "clientModified": "2024-01-15",
         "proximateHost": "string"
       }'
Python
import requests

id = "VALUE"  # The unique identifier (UUID) of the email.

url = f"https://{{instance}}.kiteworks.com/rest/public/mail/{id}/actions/initiateUpload"
headers = {
    "Authorization": "Bearer YOUR_TOKEN",
    "Content-Type": "application/json",
}
payload = {
  "filename": "string",
  "totalSize": 1,
  "totalChunks": 1,
  "clientCreated": "2024-01-15",
  "clientModified": "2024-01-15",
  "proximateHost": "string"
}
response = requests.post(url, headers=headers, json=payload)
print(response.json())
Responses
{ "id": 1, "userId": "string", "timestamp": "2024-01-15", "totalSize": 1, "totalChunks": 1, "clientName": "string" }
{ "errors": [ { "code": "ERR_REQUEST_INVALID_JSON", "message": "Invalid json provided" } ] }
{ "errors": [ { "code": "ERR_AUTH_INVALID_CSRF", "message": "Invalid CSRF Authentication" } ] }
{ "errors": [ { "code": "ERR_AUTH_UNAUTHORIZED", "message": "Unauthorized" } ] }
{ "errors": [ { "code": "ERR_ACCESS_USER", "message": "Insufficient access permissions" } ] }
{ "errors": [ { "code": "ERR_ENTITY_IS_BASE_DIR", "message": "Operation not permitted on Base Folder" } ] }
{ "errors": [ { "code": "ERR_ENTITY_RESTRICTED_EXTENSION", "message": "File extension is in exclusion extensions list" } ] }
{ "errors": [ { "code": "ERR_SYSTEM_NO_STORAGE_AVAILABLE", "message": "Folder owner's remaining storage quota does not permit for a file upload of this size." } ] }
{ "errors": [ { "code": "ERR_INPUT_INVALID_DATE", "message": "The input is not a valid date." } ] }
{ "errors": [ { "code": "ERR_INPUT_INVALID_FORMAT", "message": "The input is invalid." } ] }
{ "errors": [ { "code": "ERR_INPUT_MAX_VALUE", "message": "The specified input exceed the maximum allowed value." } ] }
{ "errors": [ { "code": "ERR_INPUT_MIN_VALUE", "message": "The specified input below the minimum allowed value." } ] }
{ "errors": [ { "code": "ERR_INVALID_PARAMETER", "message": "Invalid Parameter Exception" } ] }
{ "errors": [ { "code": "ERR_SYSTEM_NO_AVAILABLE_STORAGE_HOSTS", "message": "No available storage hosts" } ] }
// Error - No Body
POST/rest/files/{id}/actions/initiateUpload

Initiate an upload session for a new file version

Description:

Creates an upload session to add a new version of an existing file. Once the session is created, an upload link is returned which can be used to upload the new version in chunks.

Precondition:

The user must have `version_created` permission for the specified file.

Response:

The upload session is created and an upload link is returned for subsequent chunk uploads.
Parameters
Path Parameters
id
Required
string

The unique identifier (UUID) of the entity.


Request Body
filename
Required
string

Name of the file to be uploaded.

totalSize
integer

Total size of the file to be uploaded, in bytes.

totalChunks
integer

Total number of chunks the file will be split into. Must be at least 1.

clientCreated
string

File creation timestamp as reported by the client (e.g. from the OS or browser).

clientModified
string

File last-modified timestamp as reported by the client (e.g. from the OS or browser).

proximateHost
string

Proximate hostname used to direct client uploads to the nearest available storage endpoint.

tracking_id
string

Tracking ID for correlating the upload with an external transfer

resume
boolean

Indicates whether this is a resumption of a previously interrupted upload. Only applicable when a file with the same name already exists. Currently used internally for SFTP transfers only.


Responses

Upload session successfully created and an upload link returned.

id
integer

Unique identifier for the upload.

userId
string

Unique identifier of the user who initiated the upload.

timestamp
string

Timestamp when the upload was initiated.

totalSize
integer

Total size of the uploaded file in bytes.

totalChunks
integer

Total number of chunks the file was split into.

clientName
string

Name of the client uploading the file.

svrUploadTime
integer

Time taken by the server to process the upload (in milliseconds).

uploadedSize
integer

Total size of the uploaded chunks in bytes.

lastTimestamp
string

Timestamp of the last uploaded chunk.

error
string

Error message in case of upload failure.

uri
any

The URI for the upload link.

completeOk
integer

Flag indicating if the upload was completed successfully (1 for success, 0 otherwise).

fileUrl
string

URL where the uploaded file can be accessed.

replaceId
string

ID of the file being replaced, if applicable.

backend
string

Backend storage system used for the upload.

finished
boolean

Indicates whether the upload process has finished.

clientCreated
string

Timestamp when the file was created on the client side.

clientModified
string

Timestamp when the file was last modified on the client side.

requestFileId
integer

ID of the file request associated with the upload.

emailId
integer

ID of the email associated with the uploaded file, if applicable.

uploadedChunks
integer

Number of chunks successfully uploaded.

location
string

The logical storage location of the uploaded file.

uploadUrl
any

The complete URL for the upload link.

Bad Request

Possible error codes: ERR_REQUEST_INVALID_JSON

code
string

Error code

message
string

Error message

Unauthorized

Possible error codes: ERR_AUTH_INVALID_CSRF, ERR_AUTH_UNAUTHORIZED

code
string

Error code

message
string

Error message

Forbidden

Possible error codes: ERR_ACCESS_USER, ERR_ENTITY_DLP_LOCKED, ERR_ENTITY_IS_BASE_DIR, ERR_ENTITY_NOT_SCANNED, ERR_ENTITY_RESTRICTED_EXTENSION, ERR_ENTITY_VIRUS_FOUND

code
string

Error code

message
string

Error message

Content Too Large

Possible error codes: ERR_SYSTEM_NO_STORAGE_AVAILABLE

code
string

Error code

message
string

Error message

Unprocessable Content

Possible error codes: ERR_INPUT_INVALID_DATE, ERR_INPUT_INVALID_FORMAT, ERR_INPUT_MAX_VALUE, ERR_INPUT_MIN_VALUE, ERR_INVALID_PARAMETER, ERR_SYSTEM_NO_AVAILABLE_STORAGE_HOSTS

code
string

Error code

message
string

Error message

Request blocked by WAF

Empty response body.
Shell
curl -X POST \
  "https://{instance}.kiteworks.com/rest/files/:id/actions/initiateUpload" \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
         "filename": "string",
         "totalSize": 1,
         "totalChunks": 1,
         "clientCreated": "2024-01-15",
         "clientModified": "2024-01-15",
         "proximateHost": "string"
       }'
Python
import requests

id = "VALUE"  # The unique identifier (UUID) of the entity.

url = f"https://{{instance}}.kiteworks.com/rest/files/{id}/actions/initiateUpload"
headers = {
    "Authorization": "Bearer YOUR_TOKEN",
    "Content-Type": "application/json",
}
payload = {
  "filename": "string",
  "totalSize": 1,
  "totalChunks": 1,
  "clientCreated": "2024-01-15",
  "clientModified": "2024-01-15",
  "proximateHost": "string"
}
response = requests.post(url, headers=headers, json=payload)
print(response.json())
Responses
{ "id": 1, "userId": "string", "timestamp": "2024-01-15", "totalSize": 1, "totalChunks": 1, "clientName": "string" }
{ "errors": [ { "code": "ERR_REQUEST_INVALID_JSON", "message": "Invalid json provided" } ] }
{ "errors": [ { "code": "ERR_AUTH_INVALID_CSRF", "message": "Invalid CSRF Authentication" } ] }
{ "errors": [ { "code": "ERR_AUTH_UNAUTHORIZED", "message": "Unauthorized" } ] }
{ "errors": [ { "code": "ERR_ACCESS_USER", "message": "Insufficient access permissions" } ] }
{ "errors": [ { "code": "ERR_ENTITY_DLP_LOCKED", "message": "One or more files have been quarantined and are not available to download. Please contact your administrator for assistance." } ] }
{ "errors": [ { "code": "ERR_ENTITY_IS_BASE_DIR", "message": "Operation not permitted on Base Folder" } ] }
{ "errors": [ { "code": "ERR_ENTITY_NOT_SCANNED", "message": "One or more files are undergoing security and privacy scans. Please try again later." } ] }
{ "errors": [ { "code": "ERR_ENTITY_RESTRICTED_EXTENSION", "message": "File extension is in exclusion extensions list" } ] }
{ "errors": [ { "code": "ERR_ENTITY_VIRUS_FOUND", "message": "File is infected" } ] }
{ "errors": [ { "code": "ERR_SYSTEM_NO_STORAGE_AVAILABLE", "message": "Folder owner's remaining storage quota does not permit for a file upload of this size." } ] }
{ "errors": [ { "code": "ERR_INPUT_INVALID_DATE", "message": "The input is not a valid date." } ] }
{ "errors": [ { "code": "ERR_INPUT_INVALID_FORMAT", "message": "The input is invalid." } ] }
{ "errors": [ { "code": "ERR_INPUT_MAX_VALUE", "message": "The specified input exceed the maximum allowed value." } ] }
{ "errors": [ { "code": "ERR_INPUT_MIN_VALUE", "message": "The specified input below the minimum allowed value." } ] }
{ "errors": [ { "code": "ERR_INVALID_PARAMETER", "message": "Invalid Parameter Exception" } ] }
{ "errors": [ { "code": "ERR_SYSTEM_NO_AVAILABLE_STORAGE_HOSTS", "message": "No available storage hosts" } ] }
// Error - No Body
POST/{host_name}/rest/uploads/{id}

Upload a file chunk

Description:

Uploads a single chunk of a file to the server using the upload link obtained from an initiate-upload call. The file is reconstructed server-side once all chunks are received.

Precondition:

  • The caller must hold a valid upload link.
  • The client must split the file into chunks before uploading.
  • Chunks must be uploaded sequentially, starting from index 1.

Response:

Returns the updated upload session after each intermediate chunk, and the completed file record after the final chunk.
Parameters
Path Parameters
host_name
Required
string

The upload host name, which can be retrieved from GET /uploads/{id} or the initiateUpload response.

id
Required
integer

The unique identifier of the upload.

Query Parameters
returnEntity
Optional
boolean

If true, includes the entity in the response body.

with
Optional
string

Specifies additional fields to include in the response.

mode
Optional
string

Determines the detail level of the response body.


Request Body
compressionMode
Required
string

The compression algorithm applied to this chunk.
NORMAL – No compression; the chunk is sent as-is.
GZIP – Chunk is compressed using GZIP.
ZLIB – Chunk is compressed using ZLIB.

compressionSize
Required
integer

The size of the chunk after compression.

content
Required
string

The content of the chunk. If the request is in JSON format, this will be base64-encoded.

originalSize
Required
integer

The original upload content size before compression.

index
integer

The sequential index of the chunk (starts from 1).

lastChunk
integer

Indicates if this is the last chunk of the file (1 if last, 0 otherwise).


Responses

The current chunk upload is successfully received but not yet registered to the server.

id
integer

Unique identifier for the upload.

userId
string

Unique identifier of the user who initiated the upload.

timestamp
string

Timestamp when the upload was initiated.

totalSize
integer

Total size of the uploaded file in bytes.

totalChunks
integer

Total number of chunks the file was split into.

clientName
string

Name of the client uploading the file.

svrUploadTime
integer

Time taken by the server to process the upload (in milliseconds).

uploadedSize
integer

Total size of the uploaded chunks in bytes.

lastTimestamp
string

Timestamp of the last uploaded chunk.

error
string

Error message in case of upload failure.

uri
any

The URI for the upload link.

completeOk
integer

Flag indicating if the upload was completed successfully (1 for success, 0 otherwise).

fileUrl
string

URL where the uploaded file can be accessed.

replaceId
string

ID of the file being replaced, if applicable.

backend
string

Backend storage system used for the upload.

finished
boolean

Indicates whether the upload process has finished.

clientCreated
string

Timestamp when the file was created on the client side.

clientModified
string

Timestamp when the file was last modified on the client side.

requestFileId
integer

ID of the file request associated with the upload.

emailId
integer

ID of the email associated with the uploaded file, if applicable.

uploadedChunks
integer

Number of chunks successfully uploaded.

location
string

The logical storage location of the uploaded file.

uploadUrl
any

The complete URL for the upload link.

File uploaded successfully and is registered to the server after the last chunk is received.

id
string

Unique identifier (UUID) of the file.

parentId
string

Unique identifier (UUID) of the parent folder.

name
string

Name of the object.

type
string

Type of the object.
f – File.
d – Folder.

userId
string

Unique identifier (UUID) who created the file.

id
string

Unique identifier (UUID) for the user.

email
string

Email address associated with the user.

name
string

Full name of the user.

profileIcon
string

URL or identifier for the user's profile icon.

created
string

The date and time when the object was created.

modified
string

The date and time when the object was last modified.

expire
string

Expiration timestamp of the object, if applicable.

id
integer

Unique identifier for the permission.

name
string

Name of the permission.

allowed
boolean

Indicates whether the permission is granted (True) or denied (False).

deleted
boolean

Indicates whether the object has been deleted.

permDeleted
boolean

Indicates whether the object has been permanently deleted.

permalink
string

Permanent URL link to access the file.

path
string

Path to the object in the hierarchy.

objectId
string

Unique identifier (UUID) of the associated object (file or folder).

roleId
integer

Role assigned to the member.

userId
string

Unique identifier (UUID) of the user.

groupId
integer

Unique identifier of the LDAP group.

id
string

Unique identifier (UUID) for the user.

email
string

Email address associated with the user.

name
string

Full name of the user.

profileIcon
string

URL or identifier for the user's profile icon.

id
integer

Role ID

name
string

Role name

rank
integer

Role rank

type
string

Role type

id
integer

LDAP Group ID

name
string

LDAP Group name

dn
string

LDAP Group domain name

email
string

LDAP Group email

description
string

LDAP Group description

id
string

Unique identifier (UUID) for the user.

email
string

Email address associated with the user.

name
string

Full name of the user.

profileIcon
string

URL or identifier for the user's profile icon.

created
string

Date when the file or folder was shared.

inheritRoleId
integer

Inherited role ID from the parent folder, if applicable.

allowedFolderRoleId
integer[]

List of allowed folder role IDs.

email
string

Email associated with the member.

rank
integer

Rank of the member role.

originFolder
any
vendorDocId
string

Vendor document ID associated with the object.

vendorDocName
string

Name of the vendor document associated with the object.

secure
boolean

Indicates whether the folder or the parent folder containing the file is marked as secure.

source
integer

ID representing the source of the object (1 - Salesforce, 2 - Teams).

id
string

Unique identifier (UUID) for the user.

email
string

Email address associated with the user.

name
string

Full name of the user.

profileIcon
string

URL or identifier for the user's profile icon.

size
integer

The size of the file in bytes.

mime
string

The MIME type of the file.

fingerprint
string

A unique hash identifying the file.

algo
string

The algorithm used to generate the fingerprint (e.g., sha3-256, md5).

hash
string

The resulting hash value representing the fingerprint of the file or object.

clientCreated
string

The date and time when the file was created on the client side.

clientModified
string

The date and time when the file was last modified on the client side.

overriddenExpire
boolean

Indicates whether the expiration date for the file has been overridden.

id
string

Unique identifier (UUID) for the user.

email
string

Email address associated with the user.

name
string

Full name of the user.

profileIcon
string

URL or identifier for the user's profile icon.

sharedTime
string

The date and time when the file was shared.

id
string

Unique identifier (UUID) of the folder.

parentId
string

Unique identifier (UUID) of the parent object.

name
string

Name of the object.

type
string

Type of the object.
f – File.
d – Folder.

userId
string

Unique identifier (UUID) who created the folder.

id
string

Unique identifier (UUID) for the user.

email
string

Email address associated with the user.

name
string

Full name of the user.

profileIcon
string

URL or identifier for the user's profile icon.

created
string

The date and time when the object was created.

modified
string

The date and time when the object was last modified.

expire
string

Expiration timestamp of the object, if applicable.

id
integer

Unique identifier for the permission.

name
string

Name of the permission.

allowed
boolean

Indicates whether the permission is granted (True) or denied (False).

deleted
boolean

Indicates whether the object has been deleted.

permDeleted
boolean

Indicates whether the object has been permanently deleted.

permalink
string

Permanent URL link to access the object.

path
string

Path to the folder in the hierarchy.

objectId
string

Unique identifier (UUID) of the associated object (file or folder).

roleId
integer

Role assigned to the member.

userId
string

Unique identifier (UUID) of the user.

groupId
integer

Unique identifier of the LDAP group.

id
string

Unique identifier (UUID) for the user.

email
string

Email address associated with the user.

name
string

Full name of the user.

profileIcon
string

URL or identifier for the user's profile icon.

id
integer

Role ID

name
string

Role name

rank
integer

Role rank

type
string

Role type

id
integer

LDAP Group ID

name
string

LDAP Group name

dn
string

LDAP Group domain name

email
string

LDAP Group email

description
string

LDAP Group description

id
string

Unique identifier (UUID) for the user.

email
string

Email address associated with the user.

name
string

Full name of the user.

profileIcon
string

URL or identifier for the user's profile icon.

created
string

Date when the file or folder was shared.

inheritRoleId
integer

Inherited role ID from the parent folder, if applicable.

allowedFolderRoleId
integer[]

List of allowed folder role IDs.

email
string

Email associated with the member.

rank
integer

Rank of the member role.

originFolder
any
vendorDocId
string

Vendor document ID associated with the object.

vendorDocName
string

Name of the vendor document associated with the object.

secure
boolean

Indicates whether the folder or the parent folder containing the file is marked as secure.

source
integer

ID representing the source of the object (1 - Salesforce, 2 - Teams).

isShared
boolean

Indicates if the folder is shared with other users.

syncable
boolean

Indicates if the folder can be synced by Desktop Sync Client.

fileLifetime
integer

Time duration (in days) for which the files in this folder are kept after being added to the folder.

description
string

The description of the folder.

isFavorite
boolean

Indicates if the folder is marked as a favorite by the user.

pushedFilesCount
integer

The number of files that have been pushed to mobile apps in this folder.

id
integer

Role ID

name
string

Role name

rank
integer

Role rank

type
string

Role type

avStatus
string

The Antivirus (AV) status of the folder.

dlpStatus
string

The Data Loss Prevention (DLP) status of the folder.

totalMembersCount
integer

Total number of members who have access to this folder.

totalFoldersCount
integer

Total number of subfolders within this folder.

totalFilesCount
integer

Total number of files within this folder.

maxFolderExpiration
string

The maximum expiration date allowed for files in this folder.

maxFileLifetime
integer

The maximum duration (in days) that files in this folder can be kept after being added to the folder.

isLdapGroupMember
boolean

Indicates if the folder is part of an LDAP group.

isUnderMyFolder
boolean

Indicates if this folder is a subfolder of the user's "My Folder".

pathIds
string

A list of IDs representing the path of the folder within the folder hierarchy.

isRoot
boolean

Indicates if this folder is a root folder.

rootId
string

The ID of the root folder if this is a subfolder.

useFolderQuota
boolean

Indicates if a folder quota is applied to this folder.

quota
integer

The storage quota for the folder (in bytes).

size
integer

The total storage size used by the folder (in bytes).

freeSpace
integer

The amount of free space available in the folder (in bytes).

inheritanceEnabled
boolean

Indicates if a folder inherits permissions from the parent folder

originalFileId
string

The ID of the original file if this one is a copy.

avStatus
string

Indicates the file version's availability status based on Antivirus (AV) settings and whether it has been scanned or detected as infected.

dlpStatus
string

Indicates the file version's availability status based on Data Loss Prevention (DLP) settings and whether it has been scanned or detected as infected.

adminQuarantineStatus
string

Indicates the file version's availability status based on the administrator's quarantine status.

locked
boolean

Indicates if the file is locked.

id
string

Unique identifier (UUID) for the user.

email
string

Email address associated with the user.

name
string

Full name of the user.

profileIcon
string

URL or identifier for the user's profile icon.

isShared
boolean

Indicates if the file is shared with other users.

id
string

Unique identifier (UUID) for the user.

email
string

Email address associated with the user.

name
string

Full name of the user.

profileIcon
string

URL or identifier for the user's profile icon.

objectId
string

Unique identifier (UUID) for the pushed object.

userId
string

Unique identifier (UUID) for the user who pushed the object.

created
string

The date and time when the object was pushed.

id
string

Unique identifier (UUID) for the user.

email
string

Email address associated with the user.

name
string

Full name of the user.

profileIcon
string

URL or identifier for the user's profile icon.

pathIds
string

A list of IDs representing the path of the file within the folder hierarchy.

wopiSrc
string

The WOPI (Web Application Open Platform Interface) source URL for the mobile application.

userId
string

Unique identifier of the user.

service
string

The WOPI service ID.

scheme
string

URI scheme used by the mobile application to handle the file.

schemeSupport
string

Indicates the level of support the mobile app has for the URI scheme.

pushed
boolean

Indicates if the file has been pushed to a mobile app.

guid
string

Unique identifier (UUID) for the tag.

name
string

Display name of the tag.

type
string

Type category of the tag.

safeEditLocked
boolean

Indicates if the file is locked through a SafeEdit session.

id
string

Unique identifier (UUID) for the user.

email
string

Email address associated with the user.

name
string

Full name of the user.

profileIcon
string

URL or identifier for the user's profile icon.

versionsCount
integer

The total number of versions for the file.

tracking_id
string

Tracking identifier associated with the file upload.

Bad Request

Possible error codes: ERR_REQUEST_INVALID_JSON

code
string

Error code

message
string

Error message

Unauthorized

Possible error codes: ERR_AUTH_INVALID_CSRF, ERR_AUTH_UNAUTHORIZED

code
string

Error code

message
string

Error message

Forbidden

Possible error codes: ERR_ACCESS_USER, ERR_ENTITY_DLP_LOCKED, ERR_ENTITY_IS_BASE_DIR, ERR_ENTITY_NOT_SCANNED, ERR_ENTITY_REQUEST_FILE_UPLOAD_LIMIT_REACHED, ERR_ENTITY_RESTRICTED_TYPE, ERR_ENTITY_VIRUS_FOUND

code
string

Error code

message
string

Error message

Unprocessable Content

Possible error codes: ERR_INPUT_NOT_IN_LIST, ERR_INVALID_PARAMETER, ERR_LICENSE_MAX_UPLOAD_SIZE

code
string

Error code

message
string

Error message

Request blocked by WAF

Empty response body.
Shell
curl -X POST \
  "https://{instance}.kiteworks.com/:host_name/rest/uploads/:id" \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
         "compressionMode": "NORMAL",
         "compressionSize": 1,
         "content": "string",
         "originalSize": 1,
         "index": 1,
         "lastChunk": 1
       }'
Python
import requests

host_name = "VALUE"  # The upload host name, which can be retrieved from GET /uploads/{id} or the initiateUpload response.
id = "VALUE"  # The unique identifier of the upload.

url = f"https://{{instance}}.kiteworks.com/{host_name}/rest/uploads/{id}"
headers = {
    "Authorization": "Bearer YOUR_TOKEN",
    "Content-Type": "application/json",
}
payload = {
  "compressionMode": "NORMAL",
  "compressionSize": 1,
  "content": "string",
  "originalSize": 1,
  "index": 1,
  "lastChunk": 1
}
response = requests.post(url, headers=headers, json=payload)
print(response.json())
Responses
{ "id": 1, "userId": "string", "timestamp": "2024-01-15", "totalSize": 1, "totalChunks": 1, "clientName": "string" }
{ "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890", "parentId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890", "name": "string", "type": "string", "userId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890", "creator": {} }
{ "errors": [ { "code": "ERR_REQUEST_INVALID_JSON", "message": "Invalid json provided" } ] }
{ "errors": [ { "code": "ERR_AUTH_INVALID_CSRF", "message": "Invalid CSRF Authentication" } ] }
{ "errors": [ { "code": "ERR_AUTH_UNAUTHORIZED", "message": "Unauthorized" } ] }
{ "errors": [ { "code": "ERR_ACCESS_USER", "message": "Insufficient access permissions" } ] }
{ "errors": [ { "code": "ERR_ENTITY_DLP_LOCKED", "message": "One or more files have been quarantined and are not available to download. Please contact your administrator for assistance." } ] }
{ "errors": [ { "code": "ERR_ENTITY_IS_BASE_DIR", "message": "Operation not permitted on Base Folder" } ] }
{ "errors": [ { "code": "ERR_ENTITY_NOT_SCANNED", "message": "One or more files are undergoing security and privacy scans. Please try again later." } ] }
{ "errors": [ { "code": "ERR_ENTITY_REQUEST_FILE_UPLOAD_LIMIT_REACHED", "message": "Upload limit has reached." } ] }
{ "errors": [ { "code": "ERR_ENTITY_RESTRICTED_TYPE", "message": "The specified entity mime type is not allowed." } ] }
{ "errors": [ { "code": "ERR_ENTITY_VIRUS_FOUND", "message": "File is infected" } ] }
{ "errors": [ { "code": "ERR_INPUT_NOT_IN_LIST", "message": "The specified input is not allowed." } ] }
{ "errors": [ { "code": "ERR_INVALID_PARAMETER", "message": "Invalid Parameter Exception" } ] }
{ "errors": [ { "code": "ERR_LICENSE_MAX_UPLOAD_SIZE", "message": "Upload size exceed licensed maximum upload size" } ] }
// Error - No Body