search

3 endpoints
GET/rest/sources/{id}/query

Search SharePoint sites

Description:

Searches for SharePoint sites accessible through the specified source connection.

Precondition:

User must have a valid SharePoint Online source connection configured.

Response:

Returns a list of matching SharePoint sites.
Parameters
Path Parameters
id
Required
integer

The unique identifier of the entity.

Query Parameters
include_kw
Optional
boolean

If true, includes Kiteworks native sources in the results.

include_container
Optional
boolean

If true, includes container-type sources (e.g. SharePoint document libraries) in the results.

limit
Optional
integer

Maximum number of results to return.

offset
Optional
integer

Number of results to skip before returning results, for pagination.

query
Optional
string

Search query string to filter sources or sites by name.

search_type
Optional
string

Type of search to perform against the source.


Responses

SharePoint sites have been successfully returned.

name
string

Display name of the SharePoint site.

isAdded
boolean

Indicates whether the site has already been added as an external content source.

url
string

URL of the SharePoint site.

ecmTypeId
string

External content management type identifier.

repository
string

Repository identifier within the SharePoint site.

id
string

Unique identifier of the SharePoint site.

Unauthorized

Possible error codes: ERR_AUTH_INVALID_CSRF, ERR_AUTH_UNAUTHORIZED

code
string

Error code

message
string

Error message

Forbidden

Possible error codes: ERR_AUTH_EC_UPDATE_TOKEN, ERR_SPO_SEARCH

code
string

Error code

message
string

Error message

Request blocked by WAF

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

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

url = f"https://{{instance}}.kiteworks.com/rest/sources/{id}/query"
headers = {
    "Authorization": "Bearer YOUR_TOKEN",
}
response = requests.get(url, headers=headers)
print(response.json())
Responses
{ "sites": [ { "name": "string", "isAdded": true, "url": "string", "ecmTypeId": "string", "repository": "string", "id": "string" } ] }
{ "errors": [ { "code": "ERR_AUTH_INVALID_CSRF", "message": "Invalid CSRF Authentication" } ] }
{ "errors": [ { "code": "ERR_AUTH_UNAUTHORIZED", "message": "Unauthorized" } ] }
{ "errors": [ { "code": "ERR_AUTH_EC_UPDATE_TOKEN", "message": "Token update/receive required" } ] }
{ "errors": [ { "code": "ERR_SPO_SEARCH", "message": "Unable to call SPO Search API" } ] }
// Error - No Body
GET/rest/query

Perform a search query

Description:

Searches for files, folders, or emails based on the provided query parameters.

Precondition:

The user must be authenticated.

Response:

Returns a list of matching files, folders, or emails.

Sorting:

Sorting can be applied using two query parameters: `orderBy` for the field name, and `orderType` for the sort order, which can be either `asc` or `desc`.

Sorting options:

FIELD_NAMEDescription
scoreThe search relevance score
nameThe name of the folder or file
createdThe creation datetime of the folder or file
modifiedThe last modified datetime of the folder or file
Parameters
Query Parameters
limit
Optional
integer

Range limit.

offset
Optional
integer

Range offset.

includeContent
Required
boolean

Indicates whether it is a full-text search or a database search.

searchType
Required
string[]

Comma-separated list of object types to search.
f – Files.
d – Folders.
e – Emails.

query
Optional
string

Search query string.

objectId
Optional
string

Search within a specific folder ID.

created
Optional
string

Exact creation date.

created:gt
Optional
string

Created after the specified date.

created:gte
Optional
string

Created on or after the specified date.

created:lt
Optional
string

Created before the specified date.

created:lte
Optional
string

Created on or before the specified date.

modified
Optional
string

Exact modified date.

modified:gt
Optional
string

Modified after the specified date.

modified:gte
Optional
string

Modified on or after the specified date.

modified:lt
Optional
string

Modified before the specified date.

modified:lte
Optional
string

Modified on or before the specified date.

fileSize
Optional
integer

Exact file size in bytes.

fileSize:gt
Optional
integer

File size greater than the specified value.

fileSize:gte
Optional
integer

File size greater than or equal to the specified value.

fileSize:lt
Optional
integer

File size less than the specified value.

fileSize:lte
Optional
integer

File size less than or equal to the specified value.

user
Optional
string

User email of the folder creator.

fileType
Optional
string[]

List of comma-separated file types to filter search results.

flsOnly
Optional
boolean

If true, only includes files shared with the user.

sharedMailboxId
Optional
string

Shared mailbox ID.

orderBy
Optional
string

Field to sort results by.
Allowed values: score, name, created, modified.

orderType
Optional
string

Sort direction for the results.
asc – Ascending order.
desc – Descending order.

nameOnly
Optional
boolean

If true, searches only for file/folder names.

subject
Optional
string

Email subject filter.

senderId
Optional
string

Sender ID.

recipientId
Optional
string

Recipient ID.

fileName
Optional
string

File name filter.

folderName
Optional
string

Folder name filter.

fileContent
Optional
string

Search within file content.

spellCheck
Optional
boolean

If true, provides spelling suggestions for the search query.

bucket
Optional
string

Filter email search results by mailbox folder.
inbox – Search in the inbox.
sent – Search in sent items.

path
Optional
string

Search within a specific folder path.

tracking_id
Optional
string

Filter files by their tracking ID (UUID).

extensions
Optional
string[]

Comma-separated file extensions to filter (e.g., "pdf,form" or ".pdf,.form").


Responses

Search completed successfully.

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.

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.

user
object

User details of the member.

role
object

Role details assigned to the member.

group
object

Group details if the member belongs to a group.

sharedBy
object

Details of the user who shared the file or folder.

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

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

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.

user
object

User details of the member.

role
object

Role details assigned to the member.

group
object

Group details if the member belongs to a group.

sharedBy
object

Details of the user who shared the file or folder.

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.

id
string

Unique identifier of the email.

senderId
string

Unique identifier of the sender.

templateId
integer

Unique identifier of the email template used.

status
string

Current status of the email (e.g., sent, draft, error, etc.).

type
string

Type of the email (e.g., original, reply, forward, etc.).

date
string

Date the email was last modified or sent.

deleted
boolean

Indicates if the email has been deleted.

withdrawnDate
string

Date when the email was withdrawn, if applicable.

emailPackageId
string

Unique identifier of the associated email package.

isPreview
boolean

Indicates whether the email is a view-only version, typically used for previewing attachments without enabling downloading.

isUserSent
boolean

Indicates whether the email was sent by the current user or another user.

watermark
string

Text watermark applied to the email attachments (applicable only for view-only version).

variable
string

The variable name

value
any

The variable value

userId
string

Unique identifier of the user associated with the recipient.

type
integer

Recipient type.
0 – To.
1 – CC.
2 – BCC.

email
string

Email address of the recipient.

isDistributionList
boolean

Indicates if the recipient is a distribution list rather than an individual user.

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.

secureBody
boolean

Indicates if the email body is secured.

modifiedDate
string

Date the email was last modified.

parentEmailId
string

Unique identifier of the parent email, if applicable.

userId
string

Unique identifier of the user who requested the return receipt.

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.

error
string

Error message associated with the email, if any.

subject
string

Subject line of the email.

attachmentCount
integer

Number of attachments in the email.

expirationDate
string

Expiration date of the email package, if applicable.

avStatus
string

Antivirus (AV) scan status of the email.

dlpStatus
string

Data Loss Prevention (DLP) scan status of the email.

hasTrackingAccess
boolean

Indicates if tracking access is enabled for the email.

userId
string

Unique identifier of the user associated with the recipient.

type
integer

Recipient type.
0 – To.
1 – CC.
2 – BCC.

email
string

Email address of the recipient.

isDistributionList
boolean

Indicates if the recipient is a distribution list rather than an individual user.

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.

revoked
boolean

Indicates whether the recipient's tracking access has been revoked.

policyDirective
integer

Indicates the restriction type applied to the email

isRead
boolean

Indicates if the email has been read.

bucket
string

The bucket where the email is stored. (e.g. inbox, sent, trash)

body
string

The body of the email.

id
string

Unique identifier of the email package.

selfCopy
boolean

Indicates whether the package includes a copy for the sender.

includeFingerprint
boolean

Indicates whether a fingerprint (hash) of the package should be included for verification.

expire
integer

Expiration time of the package in seconds from creation.

fileCount
any

Count of the files attached to the package.

deleted
boolean

Indicates whether the package has been marked as deleted.

acl
string

Access control list (ACL) associated with the package, specifying who can access it.

emailPackageId
string

Unique identifier for the email package containing the attachment.

attachmentId
string

Unique identifier for the attachment.

withdrawn
boolean

Indicates whether the attachment has been withdrawn.

drmFile
object

Details of the DRM-protected file associated with the attachment.

accessType
integer

Access type for the attachment (e.g., read-only, editable).

tags
Tag[]

List of tags associated with the attachment.

permissions
Permission[]

List of permissions associated with the attachment.

objectId
string

Unique identifier for the file associated with the attachment.

name
string

Name of the attachment file.

size
integer

Size of the attachment file in bytes.

mime
string

The MIME type of the attachment file.

created
string

Date when the attachment file was created.

deleted
boolean

Indicates if the attachment has been deleted.

fingerprint
string

A unique hash identifying the file version.

fingerprintAlgo
string

The algorithm used for generating the file version fingerprint. (e.g., sha3-256, md5).

fingerprints
Fingerprint[]

List of alternative fingerprints for the attachment file.

adminQuarantineStatus
string

Status of the attachment in the admin quarantine system.

avStatus
string

Antivirus (AV) scan status of the attachment.

dlpStatus
string

Data Loss Prevention (DLP) status of the attachment.

downloadLink
string

Link for accessing the email.

rawBody
string

Raw email body content without HTML markup.

headline
string

Headline or main title of the email.

notice
string

Notice part of the email.

fullHtmlBody
string

Full HTML body of the email.

emailFrom
string

The email address from which the email was sent.

templateBody
string

Body content generated from the email template.

webFormId
string

Unique identifier of the web form associated with the email.

webFormFields
any

Fields included in the associated web form with the mail.

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.

sharedMailboxId
string

Unique identifier of the shared mailbox, if applicable.

htmlBody
string

HTML version of the email body.

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.

darkModeStyle
string

CSS styles applied for dark mode.

exists
boolean

Indicates whether the email already exists in the system.

totalFiles
integer

Total number of matching files.

totalFolders
integer

Total number of matching folders.

totalEmails
integer

Total number of matching emails.

emailSuggestions
string[]

List of email address suggestions related to the search query.

fileSuggestions
string[]

List of file name suggestions related to the search query.

fileHighlightings
object

Dictionary of file IDs to highlighted text snippets from full-text search.

Unauthorized

Possible error codes: ERR_AUTH_INVALID_CSRF, ERR_AUTH_UNAUTHORIZED

code
string

Error code

message
string

Error message

Forbidden

Possible error codes: ERR_PROFILE_COLLABORATION_DISABLED

code
string

Error code

message
string

Error message

Unprocessable Content

Possible error codes: ERR_INVALID_PARAMETER

code
string

Error code

message
string

Error message

Request blocked by WAF

Empty response body.
Shell
curl -X GET \
  "https://{instance}.kiteworks.com/rest/query?includeContent=VALUE&searchType=VALUE" \
  -H "Authorization: Bearer YOUR_TOKEN"
Python
import requests

url = "https://{instance}.kiteworks.com/rest/query"
headers = {
    "Authorization": "Bearer YOUR_TOKEN",
}
params = {
    "includeContent": "VALUE",
    "searchType": "VALUE",
}
response = requests.get(url, params=params, headers=headers)
print(response.json())
Responses
{ "folders": [ { "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890", "parentId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890", "name": "string", "type": "string", "userId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890", "creator": {} } ], "files": [ { "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890", "parentId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890", "name": "string", "type": "string", "userId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890", "creator": {} } ], "emails": [ { "id": "string", "senderId": "string", "templateId": 1, "status": "string", "type": "string", "date": "2024-01-15" } ], "totalFiles": 1, "totalFolders": 1, "totalEmails": 1 }
{ "errors": [ { "code": "ERR_AUTH_INVALID_CSRF", "message": "Invalid CSRF Authentication" } ] }
{ "errors": [ { "code": "ERR_AUTH_UNAUTHORIZED", "message": "Unauthorized" } ] }
{ "errors": [ { "code": "ERR_PROFILE_COLLABORATION_DISABLED", "message": "User's profile has no collaboration access" } ] }
{ "errors": [ { "code": "ERR_INVALID_PARAMETER", "message": "Invalid Parameter Exception" } ] }
// Error - No Body