sources

20 endpoints
GET/rest/sources

Return user's sources

Description:

Returns a list of sources available to the current user, such as external cloud storage or SharePoint connections.

Precondition:

User must be authenticated and have access to at least one source.

Response:

A list of the user's sources is returned.
Parameters
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

The user's sources have been successfully returned.

id
string

Unique identifier of the external content source.

name
string

Display name of the external content source.

description
string

Description of the external content source.

sourceUrl
string

URL of the external content source.

sourceTypeId
integer

Numeric identifier of the source type.

sourceByUser
boolean

Indicates whether this source was added by the user.

pinned
boolean

Indicates whether the source is pinned.

pinnedTime
string

Date and time when the source was pinned.

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_DENIED, ERR_ENTITY_USER_HAS_INSUFFICIENT_PERMISSIONS

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" \
  -H "Authorization: Bearer YOUR_TOKEN"
Python
import requests

url = "https://{instance}.kiteworks.com/rest/sources"
headers = {
    "Authorization": "Bearer YOUR_TOKEN",
}
response = requests.get(url, headers=headers)
print(response.json())
Responses
{ "data": [ { "id": "string", "name": "string", "description": "string", "sourceUrl": "string", "sourceTypeId": 1, "sourceByUser": true } ] }
{ "errors": [ { "code": "ERR_AUTH_INVALID_CSRF", "message": "Invalid CSRF Authentication" } ] }
{ "errors": [ { "code": "ERR_AUTH_UNAUTHORIZED", "message": "Unauthorized" } ] }
{ "errors": [ { "code": "ERR_ACCESS_DENIED", "message": "Your access is denied.", "redirectUrl": "/login?code=3317" } ] }
{ "errors": [ { "code": "ERR_ENTITY_USER_HAS_INSUFFICIENT_PERMISSIONS", "message": "Target user has insufficient access permissions" } ] }
// Error - No Body
POST/rest/sources

Add user ECM source

Creates a new ECM source for the current user with the provided name, URL, and source type. Returns 422 if a source with the same name or URL already exists for this user.

Parameters
Query Parameters
returnEntity
Optional
boolean

If set to true, returns information about the newly created entity.

mode
Optional
string

Determines the detail level of the response body.


Request Body
name
Required
string

Display name of the source

description
string

Optional description of the source providing additional context about its contents or purpose

sourceUrl
Required
string

URL of the external source system to connect to

sourceTypeId
Required
string

Unique identifier of source type

username
string

Username for authenticating with the external source system

password
string

Password for authenticating with the external source system

repository
string

Name of the repository within the external source system to connect to

addLinks
boolean

Indicates whether HATEOAS links should be included in the response


Responses

Unprocessable Content

Possible error codes: ERR_INPUT_REQUIRED

code
string

Error code

message
string

Error message

Request blocked by WAF

Empty response body.
Shell
curl -X POST \
  "https://{instance}.kiteworks.com/rest/sources" \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
         "name": "string",
         "description": "string",
         "sourceUrl": "string",
         "sourceTypeId": "string",
         "username": "string",
         "password": "string"
       }'
Python
import requests

url = "https://{instance}.kiteworks.com/rest/sources"
headers = {
    "Authorization": "Bearer YOUR_TOKEN",
    "Content-Type": "application/json",
}
payload = {
  "name": "string",
  "description": "string",
  "sourceUrl": "string",
  "sourceTypeId": "string",
  "username": "string",
  "password": "string"
}
response = requests.post(url, headers=headers, json=payload)
print(response.json())
Responses
{ "errors": { "code": "ERR_INPUT_REQUIRED", "message": "Field is required" } }
// Error - No Body
PATCH/rest/sources/actions/lock

Lock Repositories Gateway files

Locks one or more Repositories Gateway files. Supports partial success — if some files cannot be locked, the operation continues for the remaining files.

Parameters
Query Parameters
id:in
Required
integer

A comma-separated list of unique identifiers for the entities to be processed.. A comma-separated list of unique identifiers for the entities to be processed.

partialSuccess
Optional
boolean

If set to true, the operation will continue for the valid items even if some items result in failure.

mode
Optional
string

Determines the detail level of the response body.


Responses

Files locked successfully.

Empty response body.

Request blocked by WAF

Empty response body.
Shell
curl -X PATCH \
  "https://{instance}.kiteworks.com/rest/sources/actions/lock?id:in=VALUE" \
  -H "Authorization: Bearer YOUR_TOKEN"
Python
import requests

url = "https://{instance}.kiteworks.com/rest/sources/actions/lock"
headers = {
    "Authorization": "Bearer YOUR_TOKEN",
}
params = {
    "id:in": "VALUE",
}
response = requests.patch(url, params=params, headers=headers)
print(response.json())
Responses
// Request successful - No Body
// Error - No Body
PATCH/rest/sources/actions/unlock

Unlock Repositories Gateway files

Unlocks one or more Repositories Gateway files. Supports partial success — if some files cannot be unlocked, the operation continues for the remaining files.

Parameters
Query Parameters
id:in
Required
integer

A comma-separated list of unique identifiers for the entities to be processed.. A comma-separated list of unique identifiers for the entities to be processed.

partialSuccess
Optional
boolean

If set to true, the operation will continue for the valid items even if some items result in failure.

mode
Optional
string

Determines the detail level of the response body.


Responses

Files unlocked successfully.

Empty response body.

Request blocked by WAF

Empty response body.
Shell
curl -X PATCH \
  "https://{instance}.kiteworks.com/rest/sources/actions/unlock?id:in=VALUE" \
  -H "Authorization: Bearer YOUR_TOKEN"
Python
import requests

url = "https://{instance}.kiteworks.com/rest/sources/actions/unlock"
headers = {
    "Authorization": "Bearer YOUR_TOKEN",
}
params = {
    "id:in": "VALUE",
}
response = requests.patch(url, params=params, headers=headers)
print(response.json())
Responses
// Request successful - No Body
// Error - No Body
POST/rest/sources/auth

Login to cloud source

Completes the cloud ECM authentication flow by submitting the code and state values returned by the ECM provider's redirect URL. Returns 200 on success or an error if the credentials are invalid.

Request Body
client
string

ID of the client, from redirect url

code
Required
string

Code from redirect url

state
Required
string

Anti-CSRF state token returned by the OAuth provider in the redirect URL

sessionState
string

Optional field needed for SharePoint Online and OneDrive


Responses

Cloud ECM authentication completed successfully.

Empty response body.

Unprocessable Content

Possible error codes: ERR_INPUT_REQUIRED

code
string

Error code

message
string

Error message

Request blocked by WAF

Empty response body.
Shell
curl -X POST \
  "https://{instance}.kiteworks.com/rest/sources/auth" \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
         "client": "string",
         "code": "string",
         "state": "string",
         "sessionState": "string"
       }'
Python
import requests

url = "https://{instance}.kiteworks.com/rest/sources/auth"
headers = {
    "Authorization": "Bearer YOUR_TOKEN",
    "Content-Type": "application/json",
}
payload = {
  "client": "string",
  "code": "string",
  "state": "string",
  "sessionState": "string"
}
response = requests.post(url, headers=headers, json=payload)
print(response.json())
Responses
// Request successful - No Body
{ "errors": { "code": "ERR_INPUT_REQUIRED", "message": "Field is required" } }
// Error - No Body
GET/rest/sources/files/actions/transferStatus

Get kp transfer status.

Returns the status of one or more file transfer operations to Repositories Gateway, including transaction ID, file name, user ID, error code, transfer status, and AV/DLP scan results.

Parameters
Query Parameters
transactionId
Optional
integer

Transaction ID of download

transactionId:in
Optional
integer

Transaction ID of download. Search for results that match any of the specified values for this parameter.

mode
Optional
string

Determines the detail level of the response body.


Responses

Transfer status records retrieved successfully.

id
Required
string

KP transfer status unique identifier

transactionId
Required
string

Unique transaction identifier for tracking the Repositories Gateway file transfer

kPObjectId
Required
string

Unique identifier of the Repositories Gateway object being transferred

fileHandle
Required
string

File handle used to reference the temporary file during the transfer process

userId
Required
string

The unique identifier of the user.

errCode
Required
string

Numeric error code returned when the file transfer fails

status
string

Current status of the Repositories Gateway file transfer. Accepted values: 0 (received request), 1 (in progress), 2 (completed successfully), 99 (transfer failed)

avStatus
string

AV scan status. Accepted values: allowed, disallowed, scanning

dlpStatus
string

DLP scan status. Accepted values: allowed, disallowed, scanning

Request blocked by WAF

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

url = "https://{instance}.kiteworks.com/rest/sources/files/actions/transferStatus"
headers = {
    "Authorization": "Bearer YOUR_TOKEN",
}
response = requests.get(url, headers=headers)
print(response.json())
Responses
{ "data": [ { "id": 1, "transactionId": "txn-001", "kpObjectId": "e0000001", "fileName": "contract.docx", "userId": 42, "errorCode": null, "status": "completed" } ] }
// Error - No Body
GET/rest/sources/files/{id}

Get info of an Repositories Gateway file.

Returns the details of the specified Repositories Gateway file, including its name, parent ID, type, timestamps, and the current user's permissions on it.

Parameters
Path Parameters
id
Required
string

ID of Repositories Gateway file

Query Parameters
with
Optional
string

With parameters

mode
Optional
string

Determines the detail level of the response body.


Responses

Repositories Gateway file details retrieved successfully.

id
Required
string

Unique SourceContent identifier

name
Required
string

Display name of the source content item

parentId
Required
string

Parent source content unique identifier

type
Required
string

Source content type. Accepted values: \d\ (folder), \f\ (file)

created
string

Creation timestamp of the source content in UTC

modified
string

Last modification timestamp of the source content in UTC

status
string

Current availability status of the source content item

deleted
boolean

Indicates whether the source content is deleted

path
string

Full path of the source content

userRoleId
integer

Current user role id (Explicit field. May be retrieved only if mentioned in "with" parameter)

id
Required
string

The unique identifier of the user

name
Required
string

The name of the user

email
Required
string

The user's email

profileIcon
string

URL to the user's profile icon image

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).

wopiapp
Required
boolean

WOPI info for iOS app

rootId
string

Unique identifier of the root-level source content ancestor (Explicit field. May be retrieved only if mentioned in "with" parameter)

pathIds
string

Ordered list of ancestor identifiers representing the full path from root to this source content item (Explicit field. May be retrieved only if mentioned in "with" parameter)

sourceTypeId
string

Unique identifier of the ECM source type this content belongs to (Explicit field. May be retrieved only if mentioned in "with" parameter)

totalFilesCount
string

Total number of files in the source content (Explicit field. May be retrieved only if mentioned in "with" parameter)

totalFoldersCount
string

Total number of folders in the source content (Explicit field. May be retrieved only if mentioned in "with" parameter)

id
Required
string

Unique SourceContent identifier

name
Required
string

Display name of the source content item

parentId
Required
string

Parent source content unique identifier

type
Required
string

Source content type. Accepted values: \d\ (folder), \f\ (file)

created
string

Creation timestamp of the source content in UTC

modified
string

Last modification timestamp of the source content in UTC

status
string

Current availability status of the source content item

deleted
boolean

Indicates whether the source content is deleted

path
string

Full path of the source content

userRoleId
integer

Current user role id (Explicit field. May be retrieved only if mentioned in "with" parameter)

id
Required
string

The unique identifier of the user

name
Required
string

The name of the user

email
Required
string

The user's email

profileIcon
string

URL to the user's profile icon image

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).

wopiapp
Required
boolean

WOPI info for iOS app

rootId
string

Unique identifier of the root-level source content ancestor (Explicit field. May be retrieved only if mentioned in "with" parameter)

pathIds
string

Ordered list of ancestor identifiers representing the full path from root to this source content item (Explicit field. May be retrieved only if mentioned in "with" parameter)

sourceTypeId
string

Unique identifier of the ECM source type this content belongs to (Explicit field. May be retrieved only if mentioned in "with" parameter)

totalFilesCount
string

Total number of files in the source content (Explicit field. May be retrieved only if mentioned in "with" parameter)

totalFoldersCount
string

Total number of folders in the source content (Explicit field. May be retrieved only if mentioned in "with" parameter)

id
Required
string

Unique SourceContent identifier

name
Required
string

Display name of the source content item

parentId
Required
string

Parent source content unique identifier

type
Required
string

Source content type. Accepted values: \d\ (folder), \f\ (file)

created
string

Creation timestamp of the source content in UTC

modified
string

Last modification timestamp of the source content in UTC

status
string

Current availability status of the source content item

deleted
boolean

Indicates whether the source content is deleted

path
string

Full path of the source content

userRoleId
integer

Current user role id (Explicit field. May be retrieved only if mentioned in "with" parameter)

id
Required
string

The unique identifier of the user

name
Required
string

The name of the user

email
Required
string

The user's email

profileIcon
string

URL to the user's profile icon image

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).

wopiapp
Required
boolean

WOPI info for iOS app

rootId
string

Unique identifier of the root-level source content ancestor (Explicit field. May be retrieved only if mentioned in "with" parameter)

pathIds
string

Ordered list of ancestor identifiers representing the full path from root to this source content item (Explicit field. May be retrieved only if mentioned in "with" parameter)

sourceTypeId
string

Unique identifier of the ECM source type this content belongs to (Explicit field. May be retrieved only if mentioned in "with" parameter)

totalFilesCount
string

Total number of files in the source content (Explicit field. May be retrieved only if mentioned in "with" parameter)

totalFoldersCount
string

Total number of folders in the source content (Explicit field. May be retrieved only if mentioned in "with" parameter)

id
Required
string

Unique SourceContent identifier

name
Required
string

Display name of the source content item

parentId
Required
string

Parent source content unique identifier

type
Required
string

Source content type. Accepted values: \d\ (folder), \f\ (file)

created
string

Creation timestamp of the source content in UTC

modified
string

Last modification timestamp of the source content in UTC

status
string

Current availability status of the source content item

deleted
boolean

Indicates whether the source content is deleted

path
string

Full path of the source content

userRoleId
integer

Current user role id (Explicit field. May be retrieved only if mentioned in "with" parameter)

creator
UserBasicInfo

File's creator (Explicit field. May be retrieved only if mentioned in "with" parameter)

permissions
Permission[]

Current user's permissions (Explicit field. May be retrieved only if mentioned in "with" parameter)

wopiapp
Required
boolean

WOPI info for iOS app

rootId
string

Unique identifier of the root-level source content ancestor (Explicit field. May be retrieved only if mentioned in "with" parameter)

pathIds
string

Ordered list of ancestor identifiers representing the full path from root to this source content item (Explicit field. May be retrieved only if mentioned in "with" parameter)

sourceTypeId
string

Unique identifier of the ECM source type this content belongs to (Explicit field. May be retrieved only if mentioned in "with" parameter)

totalFilesCount
string

Total number of files in the source content (Explicit field. May be retrieved only if mentioned in "with" parameter)

totalFoldersCount
string

Total number of folders in the source content (Explicit field. May be retrieved only if mentioned in "with" parameter)

parent
SourceContent

Class SourceContent - if you need true EAPI entity use App\Entity\ECObject

links
string[]

HATEOAS links associated with the entity

links
string[]

HATEOAS links associated with the entity

links
string[]

HATEOAS links associated with the entity

links
string[]

HATEOAS links associated with the entity

locked
boolean

Indicates whether the file is locked

size
integer

Size of the source file in bytes

fingerprint
string

File content fingerprint

expire
string

Date and time after which the source file expires and becomes unavailable

mime
string

File MIME type

avStatus
string

Check file availability status according to AV settings and file scanned/infected status

dlpStatus
string

Check file availability status according to DLP settings and file scanned/infected status

lockedUserName
string

Username/email of user who locked the file

id
Required
string

The unique identifier of the user

name
Required
string

The name of the user

email
Required
string

The user's email

profileIcon
string

URL to the user's profile icon image

Request blocked by WAF

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

id = "VALUE"  # ID of Repositories Gateway file

url = f"https://{{instance}}.kiteworks.com/rest/sources/files/{id}"
headers = {
    "Authorization": "Bearer YOUR_TOKEN",
}
response = requests.get(url, headers=headers)
print(response.json())
Responses
{ "id": "e0000001", "name": "contract-2024.docx", "parentId": "f0000001", "type": "file", "created": "2024-02-15T10:00:00+00:00", "modified": "2024-03-05T08:00:00+00:00", "deleted": false }
// Error - No Body
DELETE/rest/sources/files/{id}

Delete an Repositories Gateway file.

Permanently deletes the specified Repositories Gateway file. When the forceDelete query parameter is set to true, the file can be deleted even if it is currently in use by the requesting user. Deleting a file in use by another user is not permitted.

Parameters
Path Parameters
id
Required
string

ID of Repositories Gateway file

Query Parameters
forceDelete
Optional
boolean

If set to true, allows the user to delete a file that is only in their own use.

mode
Optional
string

Determines the detail level of the response body.


Responses

Repositories Gateway file deleted successfully.

Empty response body.

Unprocessable Content

Possible error codes: ERR_FILE_IS_IN_USE_BY_OTHER_USER, ERR_FILE_IS_IN_USE_BY_CURRENT_USER

code
string

Error code

message
string

Error message

Request blocked by WAF

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

id = "VALUE"  # ID of Repositories Gateway file

url = f"https://{{instance}}.kiteworks.com/rest/sources/files/{id}"
headers = {
    "Authorization": "Bearer YOUR_TOKEN",
}
response = requests.delete(url, headers=headers)
print(response.json())
Responses
// Request successful - No Body
{ "errors": { "code": "ERR_FILE_IS_IN_USE_BY_OTHER_USER", "message": "Repositories Gateway file is used by other user" } }
{ "errors": { "code": "ERR_FILE_IS_IN_USE_BY_CURRENT_USER", "message": "Repositories Gateway file is used by you" } }
// Error - No Body
GET/rest/sources/folders/{id}

Get info of an Repositories Gateway folder.

Returns the details of the specified Repositories Gateway folder, including its name, parent, type, timestamps, and child counts.

Parameters
Path Parameters
id
Required
string

ID of Repositories Gateway folder

Query Parameters
with
Optional
string

With parameters

mode
Optional
string

Determines the detail level of the response body.


Responses

Repositories Gateway folder details retrieved successfully.

id
Required
string

Unique SourceContent identifier

name
Required
string

Display name of the source content item

parentId
Required
string

Parent source content unique identifier

type
Required
string

Source content type. Accepted values: \d\ (folder), \f\ (file)

created
string

Creation timestamp of the source content in UTC

modified
string

Last modification timestamp of the source content in UTC

status
string

Current availability status of the source content item

deleted
boolean

Indicates whether the source content is deleted

path
string

Full path of the source content

userRoleId
integer

Current user role id (Explicit field. May be retrieved only if mentioned in "with" parameter)

id
Required
string

The unique identifier of the user

name
Required
string

The name of the user

email
Required
string

The user's email

profileIcon
string

URL to the user's profile icon image

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).

wopiapp
Required
boolean

WOPI info for iOS app

rootId
string

Unique identifier of the root-level source content ancestor (Explicit field. May be retrieved only if mentioned in "with" parameter)

pathIds
string

Ordered list of ancestor identifiers representing the full path from root to this source content item (Explicit field. May be retrieved only if mentioned in "with" parameter)

sourceTypeId
string

Unique identifier of the ECM source type this content belongs to (Explicit field. May be retrieved only if mentioned in "with" parameter)

totalFilesCount
string

Total number of files in the source content (Explicit field. May be retrieved only if mentioned in "with" parameter)

totalFoldersCount
string

Total number of folders in the source content (Explicit field. May be retrieved only if mentioned in "with" parameter)

id
Required
string

Unique SourceContent identifier

name
Required
string

Display name of the source content item

parentId
Required
string

Parent source content unique identifier

type
Required
string

Source content type. Accepted values: \d\ (folder), \f\ (file)

created
string

Creation timestamp of the source content in UTC

modified
string

Last modification timestamp of the source content in UTC

status
string

Current availability status of the source content item

deleted
boolean

Indicates whether the source content is deleted

path
string

Full path of the source content

userRoleId
integer

Current user role id (Explicit field. May be retrieved only if mentioned in "with" parameter)

id
Required
string

The unique identifier of the user

name
Required
string

The name of the user

email
Required
string

The user's email

profileIcon
string

URL to the user's profile icon image

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).

wopiapp
Required
boolean

WOPI info for iOS app

rootId
string

Unique identifier of the root-level source content ancestor (Explicit field. May be retrieved only if mentioned in "with" parameter)

pathIds
string

Ordered list of ancestor identifiers representing the full path from root to this source content item (Explicit field. May be retrieved only if mentioned in "with" parameter)

sourceTypeId
string

Unique identifier of the ECM source type this content belongs to (Explicit field. May be retrieved only if mentioned in "with" parameter)

totalFilesCount
string

Total number of files in the source content (Explicit field. May be retrieved only if mentioned in "with" parameter)

totalFoldersCount
string

Total number of folders in the source content (Explicit field. May be retrieved only if mentioned in "with" parameter)

id
Required
string

Unique SourceContent identifier

name
Required
string

Display name of the source content item

parentId
Required
string

Parent source content unique identifier

type
Required
string

Source content type. Accepted values: \d\ (folder), \f\ (file)

created
string

Creation timestamp of the source content in UTC

modified
string

Last modification timestamp of the source content in UTC

status
string

Current availability status of the source content item

deleted
boolean

Indicates whether the source content is deleted

path
string

Full path of the source content

userRoleId
integer

Current user role id (Explicit field. May be retrieved only if mentioned in "with" parameter)

id
Required
string

The unique identifier of the user

name
Required
string

The name of the user

email
Required
string

The user's email

profileIcon
string

URL to the user's profile icon image

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).

wopiapp
Required
boolean

WOPI info for iOS app

rootId
string

Unique identifier of the root-level source content ancestor (Explicit field. May be retrieved only if mentioned in "with" parameter)

pathIds
string

Ordered list of ancestor identifiers representing the full path from root to this source content item (Explicit field. May be retrieved only if mentioned in "with" parameter)

sourceTypeId
string

Unique identifier of the ECM source type this content belongs to (Explicit field. May be retrieved only if mentioned in "with" parameter)

totalFilesCount
string

Total number of files in the source content (Explicit field. May be retrieved only if mentioned in "with" parameter)

totalFoldersCount
string

Total number of folders in the source content (Explicit field. May be retrieved only if mentioned in "with" parameter)

id
Required
string

Unique SourceContent identifier

name
Required
string

Display name of the source content item

parentId
Required
string

Parent source content unique identifier

type
Required
string

Source content type. Accepted values: \d\ (folder), \f\ (file)

created
string

Creation timestamp of the source content in UTC

modified
string

Last modification timestamp of the source content in UTC

status
string

Current availability status of the source content item

deleted
boolean

Indicates whether the source content is deleted

path
string

Full path of the source content

userRoleId
integer

Current user role id (Explicit field. May be retrieved only if mentioned in "with" parameter)

creator
UserBasicInfo

File's creator (Explicit field. May be retrieved only if mentioned in "with" parameter)

permissions
Permission[]

Current user's permissions (Explicit field. May be retrieved only if mentioned in "with" parameter)

wopiapp
Required
boolean

WOPI info for iOS app

rootId
string

Unique identifier of the root-level source content ancestor (Explicit field. May be retrieved only if mentioned in "with" parameter)

pathIds
string

Ordered list of ancestor identifiers representing the full path from root to this source content item (Explicit field. May be retrieved only if mentioned in "with" parameter)

sourceTypeId
string

Unique identifier of the ECM source type this content belongs to (Explicit field. May be retrieved only if mentioned in "with" parameter)

totalFilesCount
string

Total number of files in the source content (Explicit field. May be retrieved only if mentioned in "with" parameter)

totalFoldersCount
string

Total number of folders in the source content (Explicit field. May be retrieved only if mentioned in "with" parameter)

parent
SourceContent

Class SourceContent - if you need true EAPI entity use App\Entity\ECObject

links
string[]

HATEOAS links associated with the entity

links
string[]

HATEOAS links associated with the entity

links
string[]

HATEOAS links associated with the entity

links
string[]

HATEOAS links associated with the entity

isFavorite
boolean

Indicates that Folder is marked as favorite for current user

Request blocked by WAF

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

id = "VALUE"  # ID of Repositories Gateway folder

url = f"https://{{instance}}.kiteworks.com/rest/sources/folders/{id}"
headers = {
    "Authorization": "Bearer YOUR_TOKEN",
}
response = requests.get(url, headers=headers)
print(response.json())
Responses
{ "id": "f0000001", "name": "Contracts", "parentId": "s0000001", "type": "directory", "created": "2024-01-10T09:00:00+00:00", "modified": "2024-03-01T14:30:00+00:00", "totalFilesCount": 5, "totalFoldersCount": 2 }
// Error - No Body
DELETE/rest/sources/folders/{id}

Delete an Repositories Gateway folder.

Permanently deletes the specified Repositories Gateway folder.

Parameters
Path Parameters
id
Required
string

ID of Repositories Gateway folder


Responses

Repositories Gateway folder deleted successfully.

Empty response body.

Request blocked by WAF

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

id = "VALUE"  # ID of Repositories Gateway folder

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

Returns requested ECM source

Returns the details of the specified ECM source, including its name, description, URL, source type, pinned status, and the current user's permissions on it.

Parameters
Path Parameters
id
Required
string

ID of the source to be retrieved

Query Parameters
with
Optional
string

With parameters

mode
Optional
string

Determines the detail level of the response body.


Responses

ECM source details retrieved successfully.

id
string

Unique identifier of the external content source.

name
string

Display name of the external content source.

description
string

Description of the external content source.

sourceUrl
string

URL of the external content source.

sourceTypeId
integer

Numeric identifier of the source type.

sourceByUser
boolean

Indicates whether this source was added by the user.

pinned
boolean

Indicates whether the source is pinned.

pinnedTime
string

Date and time when the source was pinned.

Request blocked by WAF

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

id = "VALUE"  # ID of the source to be retrieved

url = f"https://{{instance}}.kiteworks.com/rest/sources/{id}"
headers = {
    "Authorization": "Bearer YOUR_TOKEN",
}
response = requests.get(url, headers=headers)
print(response.json())
Responses
{ "id": "s0000001", "name": "SharePoint Docs", "description": "Corporate SharePoint", "sourceUrl": "https://sharepoint.example.com", "sourceTypeId": 2, "pinned": false, "pinnedTime": null }
// Error - No Body
DELETE/rest/sources/{id}

Deletes specified source

Removes the specified ECM source from the current user's source list.

Parameters
Path Parameters
id
Required
string

ID of the source to be deleted.


Responses

ECM source deleted successfully.

Empty response body.

Forbidden

Possible error codes: ERR_ACCESS_USER

code
string

Error code

message
string

Error message

Request blocked by WAF

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

id = "VALUE"  # ID of the source to be deleted.

url = f"https://{{instance}}.kiteworks.com/rest/sources/{id}"
headers = {
    "Authorization": "Bearer YOUR_TOKEN",
}
response = requests.delete(url, headers=headers)
print(response.json())
Responses
// Request successful - No Body
{ "errors": { "code": "ERR_ACCESS_USER", "message": "Insufficient access permissions" } }
// Error - No Body
GET/rest/sources/{id}/auth

Get url with redirect to cloud ECM auth

Returns the authentication redirect URL and client ID for the specified cloud ECM source. The caller should redirect the user to the returned URL to complete the authentication flow with the ECM provider.

Parameters
Path Parameters
id
Required
integer

The source ID


Responses

Cloud ECM authentication URL retrieved successfully.

redirect
string

OAuth redirect URL for the cloud source

clientId
string

Cloud source OAuth client unique identifier

Forbidden

Possible error codes: ERR_ACCESS_USER

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/auth" \
  -H "Authorization: Bearer YOUR_TOKEN"
Python
import requests

id = "VALUE"  # The source ID

url = f"https://{{instance}}.kiteworks.com/rest/sources/{id}/auth"
headers = {
    "Authorization": "Bearer YOUR_TOKEN",
}
response = requests.get(url, headers=headers)
print(response.json())
Responses
{ "redirect": "https://ecm.example.com/auth/login", "clientId": "abc123" }
{ "errors": { "code": "ERR_ACCESS_USER", "message": "Insufficient access permissions" } }
// Error - No Body
POST/rest/sources/{id}/auth

Login to on-premise source

Authenticates the current user to the specified on-premise ECM source using a login and password. Returns 200 on success or an error if the credentials are invalid.

Parameters
Path Parameters
id
Required
string

The source ID


Request Body
login
Required
string

Login

password
Required
string

Password


Responses

On-premise ECM authentication completed successfully.

Empty response body.

Forbidden

Possible error codes: ERR_ACCESS_USER

code
string

Error code

message
string

Error message

Unprocessable Content

Possible error codes: ERR_INPUT_REQUIRED

code
string

Error code

message
string

Error message

Request blocked by WAF

Empty response body.
Shell
curl -X POST \
  "https://{instance}.kiteworks.com/rest/sources/:id/auth" \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
         "login": "string",
         "password": "string"
       }'
Python
import requests

id = "VALUE"  # The source ID

url = f"https://{{instance}}.kiteworks.com/rest/sources/{id}/auth"
headers = {
    "Authorization": "Bearer YOUR_TOKEN",
    "Content-Type": "application/json",
}
payload = {
  "login": "string",
  "password": "string"
}
response = requests.post(url, headers=headers, json=payload)
print(response.json())
Responses
// Request successful - No Body
{ "errors": { "code": "ERR_ACCESS_USER", "message": "Insufficient access permissions" } }
{ "errors": { "code": "ERR_INPUT_REQUIRED", "message": "Field is required" } }
// Error - No Body
GET/rest/sources/{id}/authStatus

Get cloud ECM auth status

Checks whether the current user is authenticated to the specified cloud ECM source by attempting to list its contents. Returns HTTP 200 if authenticated, or an error if authentication is required.

Parameters
Path Parameters
id
Required
integer

The source ID


Responses

User is authenticated to the cloud ECM source.

Empty response body.

Request blocked by WAF

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

id = "VALUE"  # The source ID

url = f"https://{{instance}}.kiteworks.com/rest/sources/{id}/authStatus"
headers = {
    "Authorization": "Bearer YOUR_TOKEN",
}
response = requests.get(url, headers=headers)
print(response.json())
Responses
// Request successful - No Body
// Error - No Body
GET/rest/sources/{id}/children

Returns the content of the specified ECM source

Returns a paginated list of both files and subfolders within the specified ECM source folder, including each item's name, parent ID, type, timestamps, and permissions.

Parameters
Path Parameters
id
Required
string

ID of the source folder to be retrieved

Query Parameters
name
Optional
string

Object name

name:contains
Optional
string

Object name. Search for results that contain the specified characters in this parameter.

description
Optional
string

Object description

description:contains
Optional
string

Object description. Search for results that contain the specified characters in this parameter.

created
Optional
string

Object creation date

created:gt
Optional
string

Object creation date. Search for results where this parameter value is greater than the specified value.

created:gte
Optional
string

Object creation date. Search for results where this parameter value is greater than or equal to the specified value.

created:lt
Optional
string

Object creation date. Search for results where this parameter value is less than the specified value.

created:lte
Optional
string

Object creation date. Search for results where this parameter value is less than or equal to the specified value.

modified
Optional
string

Object modification date

modified:gt
Optional
string

Object modification date. Search for results where this parameter value is greater than the specified value.

modified:gte
Optional
string

Object modification date. Search for results where this parameter value is greater than or equal to the specified value.

modified:lt
Optional
string

Object modification date. Search for results where this parameter value is less than the specified value.

modified:lte
Optional
string

Object modification date. Search for results where this parameter value is less than or equal to the specified value.

deleted
Optional
boolean

Indicates that object is deleted

type
Optional
string

Filter by object type. Accepted values: f, d.

orderBy
Optional
string[]

Sorting options

offset
Optional
integer

Offset

limit
Optional
integer

Limit

with
Optional
string

With parameters

mode
Optional
string

Determines the detail level of the response body.


Responses

ECM source folder contents retrieved successfully.

id
Required
string

Unique SourceContent identifier

name
Required
string

Display name of the source content item

parentId
Required
string

Parent source content unique identifier

type
Required
string

Source content type. Accepted values: \d\ (folder), \f\ (file)

created
string

Creation timestamp of the source content in UTC

modified
string

Last modification timestamp of the source content in UTC

status
string

Current availability status of the source content item

deleted
boolean

Indicates whether the source content is deleted

path
string

Full path of the source content

userRoleId
integer

Current user role id (Explicit field. May be retrieved only if mentioned in "with" parameter)

id
Required
string

The unique identifier of the user

name
Required
string

The name of the user

email
Required
string

The user's email

profileIcon
string

URL to the user's profile icon image

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).

wopiapp
Required
boolean

WOPI info for iOS app

rootId
string

Unique identifier of the root-level source content ancestor (Explicit field. May be retrieved only if mentioned in "with" parameter)

pathIds
string

Ordered list of ancestor identifiers representing the full path from root to this source content item (Explicit field. May be retrieved only if mentioned in "with" parameter)

sourceTypeId
string

Unique identifier of the ECM source type this content belongs to (Explicit field. May be retrieved only if mentioned in "with" parameter)

totalFilesCount
string

Total number of files in the source content (Explicit field. May be retrieved only if mentioned in "with" parameter)

totalFoldersCount
string

Total number of folders in the source content (Explicit field. May be retrieved only if mentioned in "with" parameter)

id
Required
string

Unique SourceContent identifier

name
Required
string

Display name of the source content item

parentId
Required
string

Parent source content unique identifier

type
Required
string

Source content type. Accepted values: \d\ (folder), \f\ (file)

created
string

Creation timestamp of the source content in UTC

modified
string

Last modification timestamp of the source content in UTC

status
string

Current availability status of the source content item

deleted
boolean

Indicates whether the source content is deleted

path
string

Full path of the source content

userRoleId
integer

Current user role id (Explicit field. May be retrieved only if mentioned in "with" parameter)

id
Required
string

The unique identifier of the user

name
Required
string

The name of the user

email
Required
string

The user's email

profileIcon
string

URL to the user's profile icon image

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).

wopiapp
Required
boolean

WOPI info for iOS app

rootId
string

Unique identifier of the root-level source content ancestor (Explicit field. May be retrieved only if mentioned in "with" parameter)

pathIds
string

Ordered list of ancestor identifiers representing the full path from root to this source content item (Explicit field. May be retrieved only if mentioned in "with" parameter)

sourceTypeId
string

Unique identifier of the ECM source type this content belongs to (Explicit field. May be retrieved only if mentioned in "with" parameter)

totalFilesCount
string

Total number of files in the source content (Explicit field. May be retrieved only if mentioned in "with" parameter)

totalFoldersCount
string

Total number of folders in the source content (Explicit field. May be retrieved only if mentioned in "with" parameter)

id
Required
string

Unique SourceContent identifier

name
Required
string

Display name of the source content item

parentId
Required
string

Parent source content unique identifier

type
Required
string

Source content type. Accepted values: \d\ (folder), \f\ (file)

created
string

Creation timestamp of the source content in UTC

modified
string

Last modification timestamp of the source content in UTC

status
string

Current availability status of the source content item

deleted
boolean

Indicates whether the source content is deleted

path
string

Full path of the source content

userRoleId
integer

Current user role id (Explicit field. May be retrieved only if mentioned in "with" parameter)

creator
UserBasicInfo

File's creator (Explicit field. May be retrieved only if mentioned in "with" parameter)

permissions
Permission[]

Current user's permissions (Explicit field. May be retrieved only if mentioned in "with" parameter)

wopiapp
Required
boolean

WOPI info for iOS app

rootId
string

Unique identifier of the root-level source content ancestor (Explicit field. May be retrieved only if mentioned in "with" parameter)

pathIds
string

Ordered list of ancestor identifiers representing the full path from root to this source content item (Explicit field. May be retrieved only if mentioned in "with" parameter)

sourceTypeId
string

Unique identifier of the ECM source type this content belongs to (Explicit field. May be retrieved only if mentioned in "with" parameter)

totalFilesCount
string

Total number of files in the source content (Explicit field. May be retrieved only if mentioned in "with" parameter)

totalFoldersCount
string

Total number of folders in the source content (Explicit field. May be retrieved only if mentioned in "with" parameter)

parent
SourceContent

Class SourceContent - if you need true EAPI entity use App\Entity\ECObject

links
string[]

HATEOAS links associated with the entity

links
string[]

HATEOAS links associated with the entity

links
string[]

HATEOAS links associated with the entity

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/sources/:id/children" \
  -H "Authorization: Bearer YOUR_TOKEN"
Python
import requests

id = "VALUE"  # ID of the source folder to be retrieved

url = f"https://{{instance}}.kiteworks.com/rest/sources/{id}/children"
headers = {
    "Authorization": "Bearer YOUR_TOKEN",
}
response = requests.get(url, headers=headers)
print(response.json())
Responses
{ "data": [ { "id": "f0000001", "name": "Contracts", "parentId": "s0000001", "type": "directory" }, { "id": "e0000001", "name": "overview.pdf", "parentId": "s0000001", "type": "file" } ], "metadata": { "total": 2, "limit": 50, "offset": 0 } }
// Error - No Body
GET/rest/sources/{id}/externalEdit

Get access token for external file edit.

Returns a short-lived refresh token (expires after 300 seconds) scoped to the specified Repositories Gateway file, enabling an external editor to download and re-upload the file.

Parameters
Path Parameters
id
Required
integer

ID of the file

Query Parameters
name
Optional
string

Object name

name:contains
Optional
string

Object name. Search for results that contain the specified characters in this parameter.

userId
Optional
string

Unique identifier of Object creator

userId:in
Optional
string

Unique identifier of Object creator. Search for results that match any of the specified values for this parameter.

created
Optional
string

Object creation date

created:gt
Optional
string

Object creation date. Search for results where this parameter value is greater than the specified value.

created:gte
Optional
string

Object creation date. Search for results where this parameter value is greater than or equal to the specified value.

created:lt
Optional
string

Object creation date. Search for results where this parameter value is less than the specified value.

created:lte
Optional
string

Object creation date. Search for results where this parameter value is less than or equal to the specified value.

modified
Optional
string

Object modification date

modified:gt
Optional
string

Object modification date. Search for results where this parameter value is greater than the specified value.

modified:gte
Optional
string

Object modification date. Search for results where this parameter value is greater than or equal to the specified value.

modified:lt
Optional
string

Object modification date. Search for results where this parameter value is less than the specified value.

modified:lte
Optional
string

Object modification date. Search for results where this parameter value is less than or equal to the specified value.

deleted
Optional
boolean

Indicates whether the object is deleted.

expire
Optional
integer

Expiration date

expire:gt
Optional
integer

Expiration date. Search for results where this parameter value is greater than the specified value.

expire:gte
Optional
integer

Expiration date. Search for results where this parameter value is greater than or equal to the specified value.

expire:lt
Optional
integer

Expiration date. Search for results where this parameter value is less than the specified value.

expire:lte
Optional
integer

Expiration date. Search for results where this parameter value is less than or equal to the specified value.

isPushed
Optional
boolean

Whether the file is pushed

orderBy
Optional
string[]

Sorting options

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

Refresh token for external file edit returned successfully.

userId
integer

Unique identifier of the user to whom the refresh token belongs

expire
string

Date and time after which the refresh token is no longer valid

scope
Required
string

OAuth scope of the refresh token

refreshToken
Required
string

Refresh token value

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/sources/:id/externalEdit" \
  -H "Authorization: Bearer YOUR_TOKEN"
Python
import requests

id = "VALUE"  # ID of the file

url = f"https://{{instance}}.kiteworks.com/rest/sources/{id}/externalEdit"
headers = {
    "Authorization": "Bearer YOUR_TOKEN",
}
response = requests.get(url, headers=headers)
print(response.json())
Responses
{ "data": [ { "refreshToken": "abc123def456", "scope": "POST/sources/actions/files/e0000001 GET/sources/files/e0000001", "expires": "2024-03-20T12:05:00+00:00" } ] }
// Error - No Body
GET/rest/sources/{id}/folders

Returns the list of folders of the specified ECM folder

Returns a paginated list of subfolders within the specified ECM source folder, including each folder's name, parent ID, type, timestamps, and permissions.

Parameters
Path Parameters
id
Required
string

ID of the source folder to be retrieved

Query Parameters
name
Optional
string

Object name

name:contains
Optional
string

Object name. Search for results that contain the specified characters in this parameter.

description
Optional
string

Object description

description:contains
Optional
string

Object description. Search for results that contain the specified characters in this parameter.

created
Optional
string

Object creation date

created:gt
Optional
string

Object creation date. Search for results where this parameter value is greater than the specified value.

created:gte
Optional
string

Object creation date. Search for results where this parameter value is greater than or equal to the specified value.

created:lt
Optional
string

Object creation date. Search for results where this parameter value is less than the specified value.

created:lte
Optional
string

Object creation date. Search for results where this parameter value is less than or equal to the specified value.

modified
Optional
string

Object modification date

modified:gt
Optional
string

Object modification date. Search for results where this parameter value is greater than the specified value.

modified:gte
Optional
string

Object modification date. Search for results where this parameter value is greater than or equal to the specified value.

modified:lt
Optional
string

Object modification date. Search for results where this parameter value is less than the specified value.

modified:lte
Optional
string

Object modification date. Search for results where this parameter value is less than or equal to the specified value.

deleted
Optional
boolean

Indicates that object is deleted

orderBy
Optional
string[]

Sorting options

offset
Optional
integer

Offset

limit
Optional
integer

Limit

with
Optional
string

With parameters

mode
Optional
string

Determines the detail level of the response body.


Responses

ECM folder contents retrieved successfully.

id
Required
string

Unique SourceContent identifier

name
Required
string

Display name of the source content item

parentId
Required
string

Parent source content unique identifier

type
Required
string

Source content type. Accepted values: \d\ (folder), \f\ (file)

created
string

Creation timestamp of the source content in UTC

modified
string

Last modification timestamp of the source content in UTC

status
string

Current availability status of the source content item

deleted
boolean

Indicates whether the source content is deleted

path
string

Full path of the source content

userRoleId
integer

Current user role id (Explicit field. May be retrieved only if mentioned in "with" parameter)

id
Required
string

The unique identifier of the user

name
Required
string

The name of the user

email
Required
string

The user's email

profileIcon
string

URL to the user's profile icon image

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).

wopiapp
Required
boolean

WOPI info for iOS app

rootId
string

Unique identifier of the root-level source content ancestor (Explicit field. May be retrieved only if mentioned in "with" parameter)

pathIds
string

Ordered list of ancestor identifiers representing the full path from root to this source content item (Explicit field. May be retrieved only if mentioned in "with" parameter)

sourceTypeId
string

Unique identifier of the ECM source type this content belongs to (Explicit field. May be retrieved only if mentioned in "with" parameter)

totalFilesCount
string

Total number of files in the source content (Explicit field. May be retrieved only if mentioned in "with" parameter)

totalFoldersCount
string

Total number of folders in the source content (Explicit field. May be retrieved only if mentioned in "with" parameter)

id
Required
string

Unique SourceContent identifier

name
Required
string

Display name of the source content item

parentId
Required
string

Parent source content unique identifier

type
Required
string

Source content type. Accepted values: \d\ (folder), \f\ (file)

created
string

Creation timestamp of the source content in UTC

modified
string

Last modification timestamp of the source content in UTC

status
string

Current availability status of the source content item

deleted
boolean

Indicates whether the source content is deleted

path
string

Full path of the source content

userRoleId
integer

Current user role id (Explicit field. May be retrieved only if mentioned in "with" parameter)

id
Required
string

The unique identifier of the user

name
Required
string

The name of the user

email
Required
string

The user's email

profileIcon
string

URL to the user's profile icon image

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).

wopiapp
Required
boolean

WOPI info for iOS app

rootId
string

Unique identifier of the root-level source content ancestor (Explicit field. May be retrieved only if mentioned in "with" parameter)

pathIds
string

Ordered list of ancestor identifiers representing the full path from root to this source content item (Explicit field. May be retrieved only if mentioned in "with" parameter)

sourceTypeId
string

Unique identifier of the ECM source type this content belongs to (Explicit field. May be retrieved only if mentioned in "with" parameter)

totalFilesCount
string

Total number of files in the source content (Explicit field. May be retrieved only if mentioned in "with" parameter)

totalFoldersCount
string

Total number of folders in the source content (Explicit field. May be retrieved only if mentioned in "with" parameter)

id
Required
string

Unique SourceContent identifier

name
Required
string

Display name of the source content item

parentId
Required
string

Parent source content unique identifier

type
Required
string

Source content type. Accepted values: \d\ (folder), \f\ (file)

created
string

Creation timestamp of the source content in UTC

modified
string

Last modification timestamp of the source content in UTC

status
string

Current availability status of the source content item

deleted
boolean

Indicates whether the source content is deleted

path
string

Full path of the source content

userRoleId
integer

Current user role id (Explicit field. May be retrieved only if mentioned in "with" parameter)

creator
UserBasicInfo

File's creator (Explicit field. May be retrieved only if mentioned in "with" parameter)

permissions
Permission[]

Current user's permissions (Explicit field. May be retrieved only if mentioned in "with" parameter)

wopiapp
Required
boolean

WOPI info for iOS app

rootId
string

Unique identifier of the root-level source content ancestor (Explicit field. May be retrieved only if mentioned in "with" parameter)

pathIds
string

Ordered list of ancestor identifiers representing the full path from root to this source content item (Explicit field. May be retrieved only if mentioned in "with" parameter)

sourceTypeId
string

Unique identifier of the ECM source type this content belongs to (Explicit field. May be retrieved only if mentioned in "with" parameter)

totalFilesCount
string

Total number of files in the source content (Explicit field. May be retrieved only if mentioned in "with" parameter)

totalFoldersCount
string

Total number of folders in the source content (Explicit field. May be retrieved only if mentioned in "with" parameter)

parent
SourceContent

Class SourceContent - if you need true EAPI entity use App\Entity\ECObject

links
string[]

HATEOAS links associated with the entity

links
string[]

HATEOAS links associated with the entity

links
string[]

HATEOAS links associated with the entity

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/sources/:id/folders" \
  -H "Authorization: Bearer YOUR_TOKEN"
Python
import requests

id = "VALUE"  # ID of the source folder to be retrieved

url = f"https://{{instance}}.kiteworks.com/rest/sources/{id}/folders"
headers = {
    "Authorization": "Bearer YOUR_TOKEN",
}
response = requests.get(url, headers=headers)
print(response.json())
Responses
{ "data": [ { "id": "f0000001", "name": "Contracts", "parentId": "s0000001", "type": "directory", "created": "2024-01-10T09:00:00+00:00", "modified": "2024-03-01T14:30:00+00:00" } ], "metadata": { "total": 1, "limit": 50, "offset": 0 } }
// Error - No Body
GET/rest/sources/{id}/preview

Get file preview metadata for a file in Repositories Gateway source

Gets the current preview generation status for the specified file in a Repositories Gateway
source. When the preview is ready, the response includes the MIME type and a link to retrieve
it. If the file is empty, infected, or DLP-locked, an appropriate error status is returned
instead.

Requires view permission on the file.

Parameters
Path Parameters
id
Required
integer

The unique identifier of the file from Repositories Gateway Source.


Responses

Returns the current preview status for the file. When status is ready, the mime and link fields are populated.

status
string

The current preview generation status. Possible values: ready, processing, failed, transfer_failed, not_supported_empty.

mime
string

The MIME type of the preview file. Populated only when status is ready; otherwise null.

link
string

The URL path to retrieve the preview file. Populated only when status is ready; otherwise null.

Forbidden

Possible error codes: ERR_ACCESS_USER

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/preview" \
  -H "Authorization: Bearer YOUR_TOKEN"
Python
import requests

id = "VALUE"  # The unique identifier of the file from Repositories Gateway Source.

url = f"https://{{instance}}.kiteworks.com/rest/sources/{id}/preview"
headers = {
    "Authorization": "Bearer YOUR_TOKEN",
}
response = requests.get(url, headers=headers)
print(response.json())
Responses
{ "status": "ready", "mime": "application/pdf", "link": "/preview/file/kp-42" }
{ "status": "processing", "mime": null, "link": null }
{ "status": "failed", "mime": null, "link": null }
{ "errors": { "code": "ERR_ACCESS_USER", "message": "Insufficient access permissions" } }
// Error - No Body
GET/rest/sources/{parent}/files

Returns the list of files of the specified ECM folder

Returns a paginated list of files within the specified ECM source folder, including each file's name, parent ID, type, timestamps, and permissions.

Parameters
Path Parameters
parent
Required
string

ID of the source folder to be retrieved

Query Parameters
name
Optional
string

Object name

name:contains
Optional
string

Object name. Search for results that contain the specified characters in this parameter.

description
Optional
string

Object description

description:contains
Optional
string

Object description. Search for results that contain the specified characters in this parameter.

created
Optional
string

Object creation date

created:gt
Optional
string

Object creation date. Search for results where this parameter value is greater than the specified value.

created:gte
Optional
string

Object creation date. Search for results where this parameter value is greater than or equal to the specified value.

created:lt
Optional
string

Object creation date. Search for results where this parameter value is less than the specified value.

created:lte
Optional
string

Object creation date. Search for results where this parameter value is less than or equal to the specified value.

modified
Optional
string

Object modification date

modified:gt
Optional
string

Object modification date. Search for results where this parameter value is greater than the specified value.

modified:gte
Optional
string

Object modification date. Search for results where this parameter value is greater than or equal to the specified value.

modified:lt
Optional
string

Object modification date. Search for results where this parameter value is less than the specified value.

modified:lte
Optional
string

Object modification date. Search for results where this parameter value is less than or equal to the specified value.

deleted
Optional
boolean

Indicates that object is deleted

orderBy
Optional
string[]

Sorting options

offset
Optional
integer

Offset

limit
Optional
integer

Limit

with
Optional
string

With parameters

mode
Optional
string

Determines the detail level of the response body.


Responses

ECM folder file listing retrieved successfully.

id
Required
string

Unique SourceContent identifier

name
Required
string

Display name of the source content item

parentId
Required
string

Parent source content unique identifier

type
Required
string

Source content type. Accepted values: \d\ (folder), \f\ (file)

created
string

Creation timestamp of the source content in UTC

modified
string

Last modification timestamp of the source content in UTC

status
string

Current availability status of the source content item

deleted
boolean

Indicates whether the source content is deleted

path
string

Full path of the source content

userRoleId
integer

Current user role id (Explicit field. May be retrieved only if mentioned in "with" parameter)

id
Required
string

The unique identifier of the user

name
Required
string

The name of the user

email
Required
string

The user's email

profileIcon
string

URL to the user's profile icon image

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).

wopiapp
Required
boolean

WOPI info for iOS app

rootId
string

Unique identifier of the root-level source content ancestor (Explicit field. May be retrieved only if mentioned in "with" parameter)

pathIds
string

Ordered list of ancestor identifiers representing the full path from root to this source content item (Explicit field. May be retrieved only if mentioned in "with" parameter)

sourceTypeId
string

Unique identifier of the ECM source type this content belongs to (Explicit field. May be retrieved only if mentioned in "with" parameter)

totalFilesCount
string

Total number of files in the source content (Explicit field. May be retrieved only if mentioned in "with" parameter)

totalFoldersCount
string

Total number of folders in the source content (Explicit field. May be retrieved only if mentioned in "with" parameter)

id
Required
string

Unique SourceContent identifier

name
Required
string

Display name of the source content item

parentId
Required
string

Parent source content unique identifier

type
Required
string

Source content type. Accepted values: \d\ (folder), \f\ (file)

created
string

Creation timestamp of the source content in UTC

modified
string

Last modification timestamp of the source content in UTC

status
string

Current availability status of the source content item

deleted
boolean

Indicates whether the source content is deleted

path
string

Full path of the source content

userRoleId
integer

Current user role id (Explicit field. May be retrieved only if mentioned in "with" parameter)

id
Required
string

The unique identifier of the user

name
Required
string

The name of the user

email
Required
string

The user's email

profileIcon
string

URL to the user's profile icon image

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).

wopiapp
Required
boolean

WOPI info for iOS app

rootId
string

Unique identifier of the root-level source content ancestor (Explicit field. May be retrieved only if mentioned in "with" parameter)

pathIds
string

Ordered list of ancestor identifiers representing the full path from root to this source content item (Explicit field. May be retrieved only if mentioned in "with" parameter)

sourceTypeId
string

Unique identifier of the ECM source type this content belongs to (Explicit field. May be retrieved only if mentioned in "with" parameter)

totalFilesCount
string

Total number of files in the source content (Explicit field. May be retrieved only if mentioned in "with" parameter)

totalFoldersCount
string

Total number of folders in the source content (Explicit field. May be retrieved only if mentioned in "with" parameter)

id
Required
string

Unique SourceContent identifier

name
Required
string

Display name of the source content item

parentId
Required
string

Parent source content unique identifier

type
Required
string

Source content type. Accepted values: \d\ (folder), \f\ (file)

created
string

Creation timestamp of the source content in UTC

modified
string

Last modification timestamp of the source content in UTC

status
string

Current availability status of the source content item

deleted
boolean

Indicates whether the source content is deleted

path
string

Full path of the source content

userRoleId
integer

Current user role id (Explicit field. May be retrieved only if mentioned in "with" parameter)

creator
UserBasicInfo

File's creator (Explicit field. May be retrieved only if mentioned in "with" parameter)

permissions
Permission[]

Current user's permissions (Explicit field. May be retrieved only if mentioned in "with" parameter)

wopiapp
Required
boolean

WOPI info for iOS app

rootId
string

Unique identifier of the root-level source content ancestor (Explicit field. May be retrieved only if mentioned in "with" parameter)

pathIds
string

Ordered list of ancestor identifiers representing the full path from root to this source content item (Explicit field. May be retrieved only if mentioned in "with" parameter)

sourceTypeId
string

Unique identifier of the ECM source type this content belongs to (Explicit field. May be retrieved only if mentioned in "with" parameter)

totalFilesCount
string

Total number of files in the source content (Explicit field. May be retrieved only if mentioned in "with" parameter)

totalFoldersCount
string

Total number of folders in the source content (Explicit field. May be retrieved only if mentioned in "with" parameter)

parent
SourceContent

Class SourceContent - if you need true EAPI entity use App\Entity\ECObject

links
string[]

HATEOAS links associated with the entity

links
string[]

HATEOAS links associated with the entity

links
string[]

HATEOAS links associated with the entity

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.

Forbidden

Possible error codes: ERR_ACCESS_USER

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/:parent/files" \
  -H "Authorization: Bearer YOUR_TOKEN"
Python
import requests

parent = "VALUE"  # ID of the source folder to be retrieved

url = f"https://{{instance}}.kiteworks.com/rest/sources/{parent}/files"
headers = {
    "Authorization": "Bearer YOUR_TOKEN",
}
response = requests.get(url, headers=headers)
print(response.json())
Responses
{ "data": [ { "id": "e0000001", "name": "contract-2024.docx", "parentId": "f0000001", "type": "file", "created": "2024-02-15T10:00:00+00:00", "modified": "2024-03-05T08:00:00+00:00" } ], "metadata": { "total": 1, "limit": 50, "offset": 0 } }
{ "errors": { "code": "ERR_ACCESS_USER", "message": "Insufficient access permissions" } }
// Error - No Body