Kiteworks search API

The search API from Kiteworks — 3 operation(s) for search.

OpenAPI Specification

kiteworks-search-api-openapi.yml Raw ↑
openapi: 3.0.2
info:
  version: '28'
  title: Kiteworks API Documentation activities search API
tags:
- name: search
paths:
  /rest/search:
    get:
      tags:
      - search
      summary: Return lists of files/folders/emails from search results
      description: Searches across files, folders, and emails using the provided query. Returns matching results grouped by type, along with total counts and a flag indicating whether full-text search is enabled.
      responses:
        '200':
          description: Search results retrieved successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Search'
              examples:
                SearchResults:
                  summary: Search results grouped by type
                  value:
                    id: contract
                    fullTextSearch: true
                    files:
                    - id: 7
                      name: contract-2024.pdf
                    folders: []
                    emails: []
                    metadata:
                      files: 1
                      folders: 0
                      emails: 0
        '490':
          description: Request blocked by WAF
      deprecated: false
      parameters:
      - in: query
        name: objectId
        description: Id of folder to search
        schema:
          type: string
      - in: query
        name: content
        description: Search by content
        schema:
          type: string
      - in: query
        name: content:contains
        description: Search by content. Search for results that contain the specified characters in this parameter.
        schema:
          type: string
      - in: query
        name: content:startswith
        description: ''
        schema:
          type: string
      - in: query
        name: description
        description: Search by description
        schema:
          type: string
      - in: query
        name: description:contains
        description: Search by description. Search for results that contain the specified characters in this parameter.
        schema:
          type: string
      - in: query
        name: description:startswith
        description: ''
        schema:
          type: string
      - in: query
        name: user
        description: Search by user
        schema:
          type: string
      - in: query
        name: modified
        description: Search by modified date
        schema:
          type: string
          format: date
      - in: query
        name: modified:gt
        description: Search by modified date. Search for results where this parameter value is greater than the specified value.
        schema:
          type: string
          format: date
      - in: query
        name: modified:gte
        description: Search by modified date. Search for results where this parameter value is greater than or equal to the specified value.
        schema:
          type: string
          format: date
      - in: query
        name: modified:lt
        description: Search by modified date. Search for results where this parameter value is less than the specified value.
        schema:
          type: string
          format: date
      - in: query
        name: modified:lte
        description: Search by modified date. Search for results where this parameter value is less than or equal to the specified value.
        schema:
          type: string
          format: date
      - in: query
        name: created
        description: Search by created date
        schema:
          type: string
          format: date
      - in: query
        name: created:gt
        description: Search by created date. Search for results where this parameter value is greater than the specified value.
        schema:
          type: string
          format: date
      - in: query
        name: created:gte
        description: Search by created date. Search for results where this parameter value is greater than or equal to the specified value.
        schema:
          type: string
          format: date
      - in: query
        name: created:lt
        description: Search by created date. Search for results where this parameter value is less than the specified value.
        schema:
          type: string
          format: date
      - in: query
        name: created:lte
        description: Search by created date. Search for results where this parameter value is less than or equal to the specified value.
        schema:
          type: string
          format: date
      - in: query
        name: locked
        description: Search by lock status
        schema:
          type: integer
      - in: query
        name: locked:gt
        description: Search by lock status. Search for results where this parameter value is greater than the specified value.
        schema:
          type: integer
      - in: query
        name: locked:gte
        description: Search by lock status. Search for results where this parameter value is greater than or equal to the specified value.
        schema:
          type: integer
      - in: query
        name: locked:lt
        description: Search by lock status. Search for results where this parameter value is less than the specified value.
        schema:
          type: integer
      - in: query
        name: locked:lte
        description: Search by lock status. Search for results where this parameter value is less than or equal to the specified value.
        schema:
          type: integer
      - in: query
        name: filesize
        description: Search by file size
        schema:
          type: integer
      - in: query
        name: filesize:gt
        description: Search by file size. Search for results where this parameter value is greater than the specified value.
        schema:
          type: integer
      - in: query
        name: filesize:gte
        description: Search by file size. Search for results where this parameter value is greater than or equal to the specified value.
        schema:
          type: integer
      - in: query
        name: filesize:lt
        description: Search by file size. Search for results where this parameter value is less than the specified value.
        schema:
          type: integer
      - in: query
        name: filesize:lte
        description: Search by file size. Search for results where this parameter value is less than or equal to the specified value.
        schema:
          type: integer
      - in: query
        name: file_type
        description: 'Search by file type. Accepted values: `Documents`, `Spreadsheets`, `Presentations`, `Images`, `PDF`, `Multimedia`, `Text`.'
        schema:
          type: array
          items:
            type: string
          enum:
          - Documents
          - Spreadsheets
          - Presentations
          - Images
          - PDF
          - Multimedia
          - Text
      - in: query
        name: email_type
        description: 'Search by email type. Accepted values: `Inbox`, `Draft`, `Sent`.'
        schema:
          type: array
          items:
            type: string
          enum:
          - Inbox
          - Draft
          - Sent
      - in: query
        name: tracking_id
        description: Search files by tracking ID (UUID)
        schema:
          type: string
      - in: query
        name: tracking_id:eq
        description: ''
        schema:
          type: string
      - in: query
        name: path
        description: Search files/folders by path. If this is specified, other search criteria is no longer valid.
        schema:
          type: string
      - in: query
        name: path:contains
        description: Search files/folders by path. If this is specified, other search criteria is no longer valid.. Search for results that contain the specified characters in this parameter.
        schema:
          type: string
      - in: query
        name: searchType
        description: 'Search by object type. Accepted values: `f`, `d`, `m`, `k`.'
        schema:
          type: array
          items:
            type: string
          enum:
          - f
          - d
          - m
          - k
      - in: query
        name: searchFilter
        description: 'Scope of the search. Accepted values: `all`, `shared`.'
        schema:
          type: string
          enum:
          - all
          - shared
      - in: query
        name: fls_only
        description: Search only files shared to me.
        schema:
          type: boolean
      - in: query
        name: sharedMailboxId
        description: Id of shared mailbox to search
        schema:
          type: integer
      - in: query
        name: orderBy
        description: Sorting options
        schema:
          type: array
          items:
            type: string
          enum:
          - name:asc
          - name:desc
          - created:asc
          - created:desc
          - modified:asc
          - modified:desc
          - score:asc
          - score:desc
      - in: query
        name: offset
        description: Offset
        schema:
          type: integer
      - in: query
        name: limit
        description: Limit
        schema:
          type: integer
      - in: query
        name: with
        description: With parameters
        schema:
          type: string
      - in: query
        name: mode
        description: Determines the detail level of the response body.
        schema:
          type: string
          enum:
          - full_with_links
          - full
          - compact
  /rest/sources/{id}/query:
    get:
      summary: Search SharePoint sites
      description: "### Description:\n  Searches for SharePoint sites accessible through the specified source connection.\n### Precondition:\n  User must have a valid SharePoint Online source connection configured.\n### Response:\n  Returns a list of matching SharePoint sites.\n"
      tags:
      - search
      parameters:
      - in: path
        name: id
        required: true
        description: The unique identifier of the entity.
        schema:
          type: integer
      - in: query
        name: include_kw
        required: false
        description: If true, includes Kiteworks native sources in the results.
        schema:
          type: boolean
      - in: query
        name: include_container
        required: false
        description: If true, includes container-type sources (e.g. SharePoint document libraries) in the results.
        schema:
          type: boolean
      - in: query
        name: limit
        required: false
        description: Maximum number of results to return.
        schema:
          type: integer
      - in: query
        name: offset
        required: false
        description: Number of results to skip before returning results, for pagination.
        schema:
          type: integer
      - in: query
        name: query
        required: false
        description: Search query string to filter sources or sites by name.
        schema:
          type: string
      - in: query
        name: search_type
        required: false
        description: Type of search to perform against the source.
        schema:
          type: string
      responses:
        '200':
          description: SharePoint sites have been successfully returned.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SearchSharePointSitesResult'
        '401':
          description: 'Unauthorized<br /><br /><i>Possible error codes: </i>ERR_AUTH_INVALID_CSRF, ERR_AUTH_UNAUTHORIZED'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Errors'
              examples:
                ERR_AUTH_INVALID_CSRF:
                  summary: Invalid CSRF Authentication
                  description: Invalid CSRF Authentication
                  value:
                    errors:
                    - code: ERR_AUTH_INVALID_CSRF
                      message: Invalid CSRF Authentication
                ERR_AUTH_UNAUTHORIZED:
                  summary: Unauthorized
                  description: Unauthorized
                  value:
                    errors:
                    - code: ERR_AUTH_UNAUTHORIZED
                      message: Unauthorized
        '403':
          description: 'Forbidden<br /><br /><i>Possible error codes: </i>ERR_AUTH_EC_UPDATE_TOKEN, ERR_SPO_SEARCH'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Errors'
              examples:
                ERR_AUTH_EC_UPDATE_TOKEN:
                  summary: Token update/receive required
                  description: Token update/receive required
                  value:
                    errors:
                    - code: ERR_AUTH_EC_UPDATE_TOKEN
                      message: Token update/receive required
                ERR_SPO_SEARCH:
                  summary: Unable to call SPO Search API
                  description: Unable to call SPO Search API
                  value:
                    errors:
                    - code: ERR_SPO_SEARCH
                      message: Unable to call SPO Search API
        '490':
          description: Request blocked by WAF
  /rest/query:
    get:
      summary: Perform a search query
      description: "### Description:\n  Searches for files, folders, or emails based on the provided query parameters.\n### Precondition:\n  The user must be authenticated.\n### Response:\n  Returns a list of matching files, folders, or emails.\n### Sorting:\n  Sorting can be applied using two query parameters: `orderBy` for the field name,\n  and `orderType` for the sort order, which can be either `asc` or `desc`.\n### Sorting options:\n  | FIELD_NAME | Description |\n  |------------|-------------|\n  | score      | The search relevance score |\n  | name       | The name of the folder or file |\n  | created    | The creation datetime of the folder or file |\n  | modified   | The last modified datetime of the folder or file |\n"
      tags:
      - search
      parameters:
      - in: query
        name: limit
        required: false
        description: Range limit.
        schema:
          type: integer
          minimum: 1
      - in: query
        name: offset
        required: false
        description: Range offset.
        schema:
          type: integer
          minimum: 0
      - in: query
        name: includeContent
        required: true
        description: Indicates whether it is a full-text search or a database search.
        schema:
          type: boolean
      - in: query
        name: searchType
        required: true
        explode: true
        style: form
        description: Comma-separated list of object types to search.<br>`f` – Files.<br>`d` – Folders.<br>`e` – Emails.
        schema:
          type: array
          items:
            type: string
      - in: query
        name: query
        required: false
        description: Search query string.
        schema:
          type: string
      - in: query
        name: objectId
        required: false
        description: Search within a specific folder ID.
        schema:
          type: string
      - in: query
        name: created
        required: false
        description: Exact creation date.
        schema:
          type: string
          format: date
      - in: query
        name: created:gt
        required: false
        description: Created after the specified date.
        schema:
          type: string
          format: date
      - in: query
        name: created:gte
        required: false
        description: Created on or after the specified date.
        schema:
          type: string
          format: date
      - in: query
        name: created:lt
        required: false
        description: Created before the specified date.
        schema:
          type: string
          format: date
      - in: query
        name: created:lte
        required: false
        description: Created on or before the specified date.
        schema:
          type: string
          format: date
      - in: query
        name: modified
        required: false
        description: Exact modified date.
        schema:
          type: string
          format: date
      - in: query
        name: modified:gt
        required: false
        description: Modified after the specified date.
        schema:
          type: string
          format: date
      - in: query
        name: modified:gte
        required: false
        description: Modified on or after the specified date.
        schema:
          type: string
          format: date
      - in: query
        name: modified:lt
        required: false
        description: Modified before the specified date.
        schema:
          type: string
          format: date
      - in: query
        name: modified:lte
        required: false
        description: Modified on or before the specified date.
        schema:
          type: string
          format: date
      - in: query
        name: fileSize
        required: false
        description: Exact file size in bytes.
        schema:
          type: integer
      - in: query
        name: fileSize:gt
        required: false
        description: File size greater than the specified value.
        schema:
          type: integer
      - in: query
        name: fileSize:gte
        required: false
        description: File size greater than or equal to the specified value.
        schema:
          type: integer
      - in: query
        name: fileSize:lt
        required: false
        description: File size less than the specified value.
        schema:
          type: integer
      - in: query
        name: fileSize:lte
        required: false
        description: File size less than or equal to the specified value.
        schema:
          type: integer
      - in: query
        name: user
        required: false
        description: User email of the folder creator.
        schema:
          type: string
      - in: query
        name: fileType
        required: false
        explode: true
        style: form
        description: List of comma-separated file types to filter search results.
        schema:
          type: array
          items:
            type: string
      - in: query
        name: flsOnly
        required: false
        description: If true, only includes files shared with the user.
        schema:
          type: boolean
      - in: query
        name: sharedMailboxId
        required: false
        description: Shared mailbox ID.
        schema:
          type: string
      - in: query
        name: orderBy
        required: false
        description: 'Field to sort results by.<br>Allowed values: `score`, `name`, `created`, `modified`.'
        schema:
          type: string
          enum:
          - score
          - name
          - created
          - modified
      - in: query
        name: orderType
        required: false
        description: Sort direction for the results.<br>`asc` – Ascending order.<br>`desc` – Descending order.
        schema:
          type: string
          enum:
          - asc
          - desc
      - in: query
        name: nameOnly
        required: false
        description: If true, searches only for file/folder names.
        schema:
          type: boolean
      - in: query
        name: subject
        required: false
        description: Email subject filter.
        schema:
          type: string
          maxLength: 998
      - in: query
        name: senderId
        required: false
        description: Sender ID.
        schema:
          type: string
      - in: query
        name: recipientId
        required: false
        description: Recipient ID.
        schema:
          type: string
      - in: query
        name: fileName
        required: false
        description: File name filter.
        schema:
          type: string
          maxLength: 255
      - in: query
        name: folderName
        required: false
        description: Folder name filter.
        schema:
          type: string
          maxLength: 255
      - in: query
        name: fileContent
        required: false
        description: Search within file content.
        schema:
          type: string
      - in: query
        name: spellCheck
        required: false
        description: If true, provides spelling suggestions for the search query.
        schema:
          type: boolean
      - in: query
        name: bucket
        required: false
        description: Filter email search results by mailbox folder.<br>`inbox` – Search in the inbox.<br>`sent` – Search in sent items.
        schema:
          type: string
          enum:
          - inbox
          - sent
      - in: query
        name: path
        required: false
        description: Search within a specific folder path.
        schema:
          type: string
      - in: query
        name: tracking_id
        required: false
        description: Filter files by their tracking ID (UUID).
        schema:
          type: string
          format: uuid
      - in: query
        name: extensions
        required: false
        explode: true
        style: form
        description: Comma-separated file extensions to filter (e.g., "pdf,form" or ".pdf,.form").
        schema:
          type: array
          items:
            type: string
            minLength: 1
      responses:
        '200':
          description: Search completed successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SearchResult'
        '401':
          description: 'Unauthorized<br /><br /><i>Possible error codes: </i>ERR_AUTH_INVALID_CSRF, ERR_AUTH_UNAUTHORIZED'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Errors'
              examples:
                ERR_AUTH_INVALID_CSRF:
                  summary: Invalid CSRF Authentication
                  description: Invalid CSRF Authentication
                  value:
                    errors:
                    - code: ERR_AUTH_INVALID_CSRF
                      message: Invalid CSRF Authentication
                ERR_AUTH_UNAUTHORIZED:
                  summary: Unauthorized
                  description: Unauthorized
                  value:
                    errors:
                    - code: ERR_AUTH_UNAUTHORIZED
                      message: Unauthorized
        '403':
          description: 'Forbidden<br /><br /><i>Possible error codes: </i>ERR_PROFILE_COLLABORATION_DISABLED'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Errors'
              examples:
                ERR_PROFILE_COLLABORATION_DISABLED:
                  summary: User's profile has no collaboration access
                  description: User's profile has no collaboration access
                  value:
                    errors:
                    - code: ERR_PROFILE_COLLABORATION_DISABLED
                      message: User's profile has no collaboration access
        '422':
          description: 'Unprocessable Content<br /><br /><i>Possible error codes: </i>ERR_INVALID_PARAMETER'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Errors'
              examples:
                ERR_INVALID_PARAMETER:
                  summary: Invalid Parameter Exception
                  description: Invalid Parameter Exception
                  value:
                    errors:
                    - code: ERR_INVALID_PARAMETER
                      message: Invalid Parameter Exception
        '490':
          description: Request blocked by WAF
components:
  schemas:
    Errors:
      type: object
      properties:
        error:
          type: array
          items:
            $ref: '#/components/schemas/Error'
    PushedObject:
      type: object
      properties:
        objectId:
          type: string
          description: Unique identifier (UUID) for the pushed object.
        userId:
          type: string
          description: Unique identifier (UUID) for the user who pushed the object.
        created:
          type: string
          format: date
          description: The date and time when the object was pushed.
        user:
          description: Details of the user who pushed the object.
          allOf:
          - $ref: '#/components/schemas/UserBasic'
    Tag:
      type: object
      properties:
        guid:
          type: string
          format: uuid
          description: Unique identifier (UUID) for the tag.
        name:
          type: string
          description: Display name of the tag.
        type:
          type: string
          description: Type category of the tag.
    TrackingAccessRecipient:
      type: object
      properties:
        userId:
          type: string
          description: Unique identifier of the user associated with the recipient.
        type:
          type: integer
          description: Recipient type.<br>`0` – To.<br>`1` – CC.<br>`2` – BCC.
        email:
          type: string
          description: Email address of the recipient.
        isDistributionList:
          type: boolean
          description: Indicates if the recipient is a distribution list rather than an individual user.
        user:
          description: Details of the user associated with the recipient.
          allOf:
          - $ref: '#/components/schemas/UserBasic'
        revoked:
          type: boolean
          description: Indicates whether the recipient's tracking access has been revoked.
    SearchSharePointSitesResult:
      type: object
      properties:
        sites:
          type: array
          description: List of SharePoint sites matching the search query.
          items:
            $ref: '#/components/schemas/Site'
    Folder1:
      type: object
      properties:
        id:
          type: string
          format: uuid
          description: Unique identifier (UUID) of the folder.
        parentId:
          type: string
          format: uuid
          description: Unique identifier (UUID) of the parent object.
        name:
          type: string
          description: Name of the object.
        type:
          type: string
          description: Type of the object.<br>`f` – File.<br>`d` – Folder.
        userId:
          type: string
          format: uuid
          description: Unique identifier (UUID) who created the folder.
        creator:
          description: Details of the user who created the object.
          allOf:
          - $ref: '#/components/schemas/UserBasic'
        created:
          type: string
          format: date
          description: The date and time when the object was created.
        modified:
          type: string
          format: date
          description: The date and time when the object was last modified.
        expire:
          type: string
          format: date
          description: Expiration timestamp of the object, if applicable.
        permissions:
          description: List of permissions associated with the object.
          type: array
          items:
            $ref: '#/components/schemas/Permission'
        deleted:
          type: boolean
          description: Indicates whether the object has been deleted.
        permDeleted:
          type: boolean
          description: Indicates whether the object has been permanently deleted.
        permalink:
          type: string
          description: Permanent URL link to access the object.
        path:
          type: string
          description: Path to the folder in the hierarchy.
        members:
          description: List of members who have access to the object.
          type: array
          items:
            $ref: '#/components/schemas/Member'
        vendorDocId:
          type: string
          description: Vendor document ID associated with the object.
        vendorDocName:
          type: string
          description: Name of the vendor document associated with the object.
        secure:
          type: boolean
          description: Indicates whether the folder or the parent folder containing the file is marked as secure.
        source:
          type: integer
          description: ID representing the source of the object (1 - Salesforce, 2 - Teams).
        isShared:
          type: boolean
          description: Indicates if the folder is shared with other users.
        syncable:
          type: boolean
          description: Indicates if the folder can be synced by Desktop Sync Client.
        fileLifetime:
          type: integer
          description: Time duration (in days) for which the files in this folder are kept after being added to the folder.
        description:
          type: string
          description: The description of the folder.
        parent:
          description: The parent folder of the current folder.
          allOf:
          - $ref: '#/components/schemas/Folder'
        isFavorite:
          type: boolean
          description: Indicates if the folder is marked as a favorite by the user.
        pushedFilesCount:
          type: integer
          description: The number of files that have been pushed to mobile apps in this folder.
        currentUserRole:
          description: The role of the current user in this folder.
          allOf:
          - $ref: '#/components/schemas/Role'
        avStatus:
          type: string
          description: The Antivirus (AV) status of the folder.
        dlpStatus:
          type: string
          description: The Data Loss Prevention (DLP) status of the folder.
        totalMembersCount:
          type: integer
          description: Total number of members who have access to this folder.
        totalFoldersCount:
          type: integer
          description: Total number of subfolders within this folder.
        totalFilesCount:
          type: integer
          description: Total number of files within this folder.
        maxFolderExpiration:
          type: string
          format: date
          description: The maximum expiration date allowed for files in this folder.
        maxFileLifetime:
          type: integer
          description: The maximum duration (in days) that files in this folder can be kept after being added to the folder.
        isLdapGroupMember:
          type: boolean
          description: Indicates if the folder is part of an LDAP group.
        isUnderMyFolder:
          type: boolean
          description: Indicates if this folder is a subfolder of the user's "My Folder".
        pathIds:
          type: string
          description: A list of IDs representing the path of the folder within the folder hierarchy.
        isRoot:
          type: boolean
          description: Indicates if this folder is a root folder.
        rootId:
          type: string
          format: uuid
          description: The ID of the root folder if this is a subfolder.
        useFolderQuota:
          type: boolean
          description: Indicates if a folder quota is applied to this folder.
        quota:
          type: integer
          description: The storage quota for the folder (in bytes).
        size:
          type: integer
          description: The total storage size used by the folder (in bytes).
        freeSpace:
          type: integer
          description: The amount of free space available in the folder (in bytes).
        inheritanceEnabled:
          type: boolean
          description: Indicates if a folder inherits permissions from the parent folder
    UserBasic:
      type: object
      properties:
        id:
          type: string
          description: Unique identifier (UUID) for the user.
        email:
          type: string
          description: Email address associated with the user.
        name:
          type: string
          description: Full name of the user.
        profileIcon:
          type: string
          description: URL or identifier for the user's profile icon.
    Attachment:
      type: object
      properties:
        emailPackageId:
          type: string
          format: uuid
          description: Unique identifier for the email package containing the attachment.
        attachmentId:
   

# --- truncated at 32 KB (67 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/kiteworks/refs/heads/main/openapi/kiteworks-search-api-openapi.yml