Kiteworks uploads API

The uploads API from Kiteworks — 10 operation(s) for uploads.

OpenAPI Specification

kiteworks-uploads-api-openapi.yml Raw ↑
openapi: 3.0.2
info:
  version: '28'
  title: Kiteworks API Documentation activities uploads API
tags:
- name: uploads
paths:
  /rest/uploads:
    get:
      tags:
      - uploads
      summary: Retrieve all user upload sessions
      description: Returns all active (not yet completed) upload sessions associated with the authenticated user. Each record includes the session ID, file name, total and uploaded sizes, chunk counts, and upload URI.
      responses:
        '200':
          description: Upload sessions retrieved successfully.
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/Upload'
                  metadata:
                    $ref: '#/components/schemas/MetaData'
              examples:
                UploadSessionList:
                  summary: List of active upload sessions
                  value:
                    data:
                    - id: 101
                      userId: 42
                      timestamp: '2024-03-01T10:00:00+00:00'
                      uploadedSize: 1048576
                      uploadedChunks: 1
                      error: null
                      finished: false
                      fileUrl: null
                    metadata:
                      total: 1
                      limit: 50
                      offset: 0
        '490':
          description: Request blocked by WAF
      deprecated: false
      parameters:
      - in: query
        name: offset
        description: Offset
        schema:
          type: integer
      - in: query
        name: limit
        description: Limit
        schema:
          type: integer
      - in: query
        name: locate_id
        description: "If specified, \"offset\" parameter will be ignored\n                                            and the page containing entity with this Id will be returned."
        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/uploads/config:
    get:
      tags:
      - uploads
      summary: Get upload server configuration
      description: Returns the configuration of the upload server, including its active status and the maximum allowed chunk size.
      responses:
        '200':
          description: Upload server configuration retrieved successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AcfsConfig'
              examples:
                AcfsConfigInfo:
                  summary: Upload server configuration
                  value:
                    active: 1
                    uploadChunkMax: 10485760
        '490':
          description: Request blocked by WAF
      deprecated: false
  /rest/uploads/{id}:
    get:
      tags:
      - uploads
      summary: Get upload session
      description: Returns the details of the specified upload session, including its progress, file size, chunk counts, and upload URI.
      responses:
        '200':
          description: Upload session details retrieved successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Upload'
              examples:
                UploadSessionInfo:
                  summary: Details of a single upload session
                  value:
                    id: 101
                    userId: 42
                    timestamp: '2024-03-01T10:00:00+00:00'
                    uploadedSize: 1048576
                    uploadedChunks: 1
                    error: null
                    finished: false
                    fileUrl: null
        '490':
          description: Request blocked by WAF
      deprecated: false
      parameters:
      - in: path
        name: id
        description: The unique identifier of the upload session
        required: true
        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
    delete:
      tags:
      - uploads
      summary: Terminate upload session
      description: Terminates the specified upload session and discards any uploaded chunks. If the session resides on a different upload node, the termination request is forwarded to that node.
      responses:
        '204':
          description: Upload session terminated successfully.
        '490':
          description: Request blocked by WAF
      deprecated: false
      parameters:
      - in: path
        name: id
        description: The unique identifier of the upload session.
        required: true
        schema:
          type: integer
  /rest/folders/{id}/actions/initiateUpload/zip:
    post:
      summary: Initiate a ZIP archive upload session for a folder
      description: "### Description:\n  Creates an upload session for a ZIP archive to be uploaded to the specified folder. The archive will be automatically extracted after all chunks are received. Once the session is created, an upload link is returned which can be used to upload the archive in chunks.\n### Precondition:\n  The user must have `file_add` permission for the folder.\n### Response:\n  The upload session is created and an upload link is returned for subsequent chunk uploads.\n"
      tags:
      - uploads
      parameters:
      - in: path
        name: id
        required: true
        description: The unique identifier (UUID) of the entity.
        schema:
          type: string
          format: uuid
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/InitiateUploadZipPostRequest'
      responses:
        '201':
          description: Upload session successfully created and an upload link returned.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Upload'
        '400':
          description: 'Bad Request<br /><br /><i>Possible error codes: </i>ERR_REQUEST_INVALID_JSON'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Errors'
              examples:
                ERR_REQUEST_INVALID_JSON:
                  summary: Invalid json provided
                  description: Invalid json provided
                  value:
                    errors:
                    - code: ERR_REQUEST_INVALID_JSON
                      message: Invalid json provided
        '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_ACCESS_USER, ERR_ENTITY_DLP_LOCKED, ERR_ENTITY_IS_BASE_DIR, ERR_ENTITY_NOT_SCANNED, ERR_ENTITY_RESTRICTED_EXTENSION, ERR_ENTITY_VIRUS_FOUND'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Errors'
              examples:
                ERR_ACCESS_USER:
                  summary: Insufficient access permissions
                  description: Insufficient access permissions
                  value:
                    errors:
                    - code: ERR_ACCESS_USER
                      message: Insufficient access permissions
                ERR_ENTITY_DLP_LOCKED:
                  summary: One or more files have been quarantined and are not available to download. Please contact your administrator for assistance.
                  description: One or more files have been quarantined and are not available to download. Please contact your administrator for assistance.
                  value:
                    errors:
                    - code: ERR_ENTITY_DLP_LOCKED
                      message: One or more files have been quarantined and are not available to download. Please contact your administrator for assistance.
                ERR_ENTITY_IS_BASE_DIR:
                  summary: Operation not permitted on Base Folder
                  description: Operation not permitted on Base Folder
                  value:
                    errors:
                    - code: ERR_ENTITY_IS_BASE_DIR
                      message: Operation not permitted on Base Folder
                ERR_ENTITY_NOT_SCANNED:
                  summary: One or more files are undergoing security and privacy scans. Please try again later.
                  description: One or more files are undergoing security and privacy scans. Please try again later.
                  value:
                    errors:
                    - code: ERR_ENTITY_NOT_SCANNED
                      message: One or more files are undergoing security and privacy scans. Please try again later.
                ERR_ENTITY_RESTRICTED_EXTENSION:
                  summary: File extension is in exclusion extensions list
                  description: File extension is in exclusion extensions list
                  value:
                    errors:
                    - code: ERR_ENTITY_RESTRICTED_EXTENSION
                      message: File extension is in exclusion extensions list
                ERR_ENTITY_VIRUS_FOUND:
                  summary: File is infected
                  description: File is infected
                  value:
                    errors:
                    - code: ERR_ENTITY_VIRUS_FOUND
                      message: File is infected
        '413':
          description: 'Content Too Large<br /><br /><i>Possible error codes: </i>ERR_SYSTEM_NO_STORAGE_AVAILABLE'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Errors'
              examples:
                ERR_SYSTEM_NO_STORAGE_AVAILABLE:
                  summary: Folder owner's remaining storage quota does not permit for a file upload of this size.
                  description: Folder owner's remaining storage quota does not permit for a file upload of this size.
                  value:
                    errors:
                    - code: ERR_SYSTEM_NO_STORAGE_AVAILABLE
                      message: Folder owner's remaining storage quota does not permit for a file upload of this size.
        '422':
          description: 'Unprocessable Content<br /><br /><i>Possible error codes: </i>ERR_INPUT_INVALID_DATE, ERR_INPUT_INVALID_FORMAT, ERR_INPUT_MAX_VALUE, ERR_INPUT_MIN_VALUE, ERR_INVALID_PARAMETER, ERR_SYSTEM_NO_STORAGE_AVAILABLE, ERR_SYSTEM_NO_AVAILABLE_STORAGE_HOSTS'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Errors'
              examples:
                ERR_INPUT_INVALID_DATE:
                  summary: The input is not a valid date.
                  description: The input is not a valid date.
                  value:
                    errors:
                    - code: ERR_INPUT_INVALID_DATE
                      message: The input is not a valid date.
                ERR_INPUT_INVALID_FORMAT:
                  summary: The input is invalid.
                  description: The input is invalid.
                  value:
                    errors:
                    - code: ERR_INPUT_INVALID_FORMAT
                      message: The input is invalid.
                ERR_INPUT_MAX_VALUE:
                  summary: The specified input exceed the maximum allowed value.
                  description: The specified input exceed the maximum allowed value.
                  value:
                    errors:
                    - code: ERR_INPUT_MAX_VALUE
                      message: The specified input exceed the maximum allowed value.
                ERR_INPUT_MIN_VALUE:
                  summary: The specified input below the minimum allowed value.
                  description: The specified input below the minimum allowed value.
                  value:
                    errors:
                    - code: ERR_INPUT_MIN_VALUE
                      message: The specified input below the minimum allowed value.
                ERR_INVALID_PARAMETER:
                  summary: Invalid Parameter Exception
                  description: Invalid Parameter Exception
                  value:
                    errors:
                    - code: ERR_INVALID_PARAMETER
                      message: Invalid Parameter Exception
                ERR_SYSTEM_NO_STORAGE_AVAILABLE:
                  summary: Folder owner's remaining storage quota does not permit for a file upload of this size.
                  description: Folder owner's remaining storage quota does not permit for a file upload of this size.
                  value:
                    errors:
                    - code: ERR_SYSTEM_NO_STORAGE_AVAILABLE
                      message: Folder owner's remaining storage quota does not permit for a file upload of this size.
                ERR_SYSTEM_NO_AVAILABLE_STORAGE_HOSTS:
                  summary: No available storage hosts
                  description: No available storage hosts
                  value:
                    errors:
                    - code: ERR_SYSTEM_NO_AVAILABLE_STORAGE_HOSTS
                      message: No available storage hosts
        '490':
          description: Request blocked by WAF
  /rest/folders/{id}/actions/initiateUpload:
    post:
      summary: Initiate a file upload session for a folder
      description: "### Description:\n  Creates an upload session for a file to be added to the specified folder. Once the session is created, an upload link is returned which can be used to upload the file in chunks.\n### Precondition:\n  The user must have `file_add` permission for the folder.\n### Response:\n  The upload session is created and an upload link is returned for subsequent chunk uploads.\n"
      tags:
      - uploads
      parameters:
      - in: path
        name: id
        required: true
        description: The unique identifier (UUID) of the entity.
        schema:
          type: string
          format: uuid
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/InitiateUploadPostRequest'
      responses:
        '201':
          description: Upload session successfully created and an upload link returned.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Upload'
        '400':
          description: 'Bad Request<br /><br /><i>Possible error codes: </i>ERR_REQUEST_INVALID_JSON'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Errors'
              examples:
                ERR_REQUEST_INVALID_JSON:
                  summary: Invalid json provided
                  description: Invalid json provided
                  value:
                    errors:
                    - code: ERR_REQUEST_INVALID_JSON
                      message: Invalid json provided
        '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_ACCESS_USER, ERR_ENTITY_DLP_LOCKED, ERR_ENTITY_IS_BASE_DIR, ERR_ENTITY_NOT_SCANNED, ERR_ENTITY_RESTRICTED_EXTENSION, ERR_ENTITY_VIRUS_FOUND'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Errors'
              examples:
                ERR_ACCESS_USER:
                  summary: Insufficient access permissions
                  description: Insufficient access permissions
                  value:
                    errors:
                    - code: ERR_ACCESS_USER
                      message: Insufficient access permissions
                ERR_ENTITY_DLP_LOCKED:
                  summary: One or more files have been quarantined and are not available to download. Please contact your administrator for assistance.
                  description: One or more files have been quarantined and are not available to download. Please contact your administrator for assistance.
                  value:
                    errors:
                    - code: ERR_ENTITY_DLP_LOCKED
                      message: One or more files have been quarantined and are not available to download. Please contact your administrator for assistance.
                ERR_ENTITY_IS_BASE_DIR:
                  summary: Operation not permitted on Base Folder
                  description: Operation not permitted on Base Folder
                  value:
                    errors:
                    - code: ERR_ENTITY_IS_BASE_DIR
                      message: Operation not permitted on Base Folder
                ERR_ENTITY_NOT_SCANNED:
                  summary: One or more files are undergoing security and privacy scans. Please try again later.
                  description: One or more files are undergoing security and privacy scans. Please try again later.
                  value:
                    errors:
                    - code: ERR_ENTITY_NOT_SCANNED
                      message: One or more files are undergoing security and privacy scans. Please try again later.
                ERR_ENTITY_RESTRICTED_EXTENSION:
                  summary: File extension is in exclusion extensions list
                  description: File extension is in exclusion extensions list
                  value:
                    errors:
                    - code: ERR_ENTITY_RESTRICTED_EXTENSION
                      message: File extension is in exclusion extensions list
                ERR_ENTITY_VIRUS_FOUND:
                  summary: File is infected
                  description: File is infected
                  value:
                    errors:
                    - code: ERR_ENTITY_VIRUS_FOUND
                      message: File is infected
        '413':
          description: 'Content Too Large<br /><br /><i>Possible error codes: </i>ERR_SYSTEM_NO_STORAGE_AVAILABLE'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Errors'
              examples:
                ERR_SYSTEM_NO_STORAGE_AVAILABLE:
                  summary: Folder owner's remaining storage quota does not permit for a file upload of this size.
                  description: Folder owner's remaining storage quota does not permit for a file upload of this size.
                  value:
                    errors:
                    - code: ERR_SYSTEM_NO_STORAGE_AVAILABLE
                      message: Folder owner's remaining storage quota does not permit for a file upload of this size.
        '422':
          description: 'Unprocessable Content<br /><br /><i>Possible error codes: </i>ERR_INPUT_INVALID_DATE, ERR_INPUT_INVALID_FORMAT, ERR_INPUT_MAX_VALUE, ERR_INPUT_MIN_VALUE, ERR_INVALID_PARAMETER, ERR_SYSTEM_NO_STORAGE_AVAILABLE, ERR_SYSTEM_NO_AVAILABLE_STORAGE_HOSTS'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Errors'
              examples:
                ERR_INPUT_INVALID_DATE:
                  summary: The input is not a valid date.
                  description: The input is not a valid date.
                  value:
                    errors:
                    - code: ERR_INPUT_INVALID_DATE
                      message: The input is not a valid date.
                ERR_INPUT_INVALID_FORMAT:
                  summary: The input is invalid.
                  description: The input is invalid.
                  value:
                    errors:
                    - code: ERR_INPUT_INVALID_FORMAT
                      message: The input is invalid.
                ERR_INPUT_MAX_VALUE:
                  summary: The specified input exceed the maximum allowed value.
                  description: The specified input exceed the maximum allowed value.
                  value:
                    errors:
                    - code: ERR_INPUT_MAX_VALUE
                      message: The specified input exceed the maximum allowed value.
                ERR_INPUT_MIN_VALUE:
                  summary: The specified input below the minimum allowed value.
                  description: The specified input below the minimum allowed value.
                  value:
                    errors:
                    - code: ERR_INPUT_MIN_VALUE
                      message: The specified input below the minimum allowed value.
                ERR_INVALID_PARAMETER:
                  summary: Invalid Parameter Exception
                  description: Invalid Parameter Exception
                  value:
                    errors:
                    - code: ERR_INVALID_PARAMETER
                      message: Invalid Parameter Exception
                ERR_SYSTEM_NO_STORAGE_AVAILABLE:
                  summary: Folder owner's remaining storage quota does not permit for a file upload of this size.
                  description: Folder owner's remaining storage quota does not permit for a file upload of this size.
                  value:
                    errors:
                    - code: ERR_SYSTEM_NO_STORAGE_AVAILABLE
                      message: Folder owner's remaining storage quota does not permit for a file upload of this size.
                ERR_SYSTEM_NO_AVAILABLE_STORAGE_HOSTS:
                  summary: No available storage hosts
                  description: No available storage hosts
                  value:
                    errors:
                    - code: ERR_SYSTEM_NO_AVAILABLE_STORAGE_HOSTS
                      message: No available storage hosts
        '490':
          description: Request blocked by WAF
  /rest/requestFile/{ref}/actions/initiateUpload:
    post:
      summary: Initiate a file upload session for a request file
      description: "### Description:\n  Creates an upload session for a file to be uploaded to a request file. Once the session is created, an upload link is returned which can be used to upload the file in chunks.\n### Precondition:\n  The caller must have access to the request file for uploading.\n### Response:\n  The upload session is created and an upload link is returned for subsequent chunk uploads.\n"
      tags:
      - uploads
      parameters:
      - in: path
        name: ref
        required: true
        description: The unique reference of the Request File upload link.
        schema:
          type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/InitiateUploadPostRequest'
      responses:
        '201':
          description: Upload session successfully created and an upload link returned.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Upload'
        '400':
          description: 'Bad Request<br /><br /><i>Possible error codes: </i>ERR_REQUEST_INVALID_JSON'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Errors'
              examples:
                ERR_REQUEST_INVALID_JSON:
                  summary: Invalid json provided
                  description: Invalid json provided
                  value:
                    errors:
                    - code: ERR_REQUEST_INVALID_JSON
                      message: Invalid json provided
        '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_ACCESS_USER, ERR_ENTITY_IS_BASE_DIR, ERR_ENTITY_REQUEST_FILE_UPLOAD_LIMIT_REACHED, ERR_ENTITY_RESTRICTED_EXTENSION'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Errors'
              examples:
                ERR_ACCESS_USER:
                  summary: Insufficient access permissions
                  description: Insufficient access permissions
                  value:
                    errors:
                    - code: ERR_ACCESS_USER
                      message: Insufficient access permissions
                ERR_ENTITY_IS_BASE_DIR:
                  summary: Operation not permitted on Base Folder
                  description: Operation not permitted on Base Folder
                  value:
                    errors:
                    - code: ERR_ENTITY_IS_BASE_DIR
                      message: Operation not permitted on Base Folder
                ERR_ENTITY_REQUEST_FILE_UPLOAD_LIMIT_REACHED:
                  summary: Upload limit has reached.
                  description: Upload limit has reached.
                  value:
                    errors:
                    - code: ERR_ENTITY_REQUEST_FILE_UPLOAD_LIMIT_REACHED
                      message: Upload limit has reached.
                ERR_ENTITY_RESTRICTED_EXTENSION:
                  summary: File extension is in exclusion extensions list
                  description: File extension is in exclusion extensions list
                  value:
                    errors:
                    - code: ERR_ENTITY_RESTRICTED_EXTENSION
                      message: File extension is in exclusion extensions list
        '413':
          description: 'Content Too Large<br /><br /><i>Possible error codes: </i>ERR_SYSTEM_NO_STORAGE_AVAILABLE'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Errors'
              examples:
                ERR_SYSTEM_NO_STORAGE_AVAILABLE:
                  summary: Folder owner's remaining storage quota does not permit for a file upload of this size.
                  description: Folder owner's remaining storage quota does not permit for a file upload of this size.
                  value:
                    errors:
                    - code: ERR_SYSTEM_NO_STORAGE_AVAILABLE
                      message: Folder owner's remaining storage quota does not permit for a file upload of this size.
        '422':
          description: 'Unprocessable Content<br /><br /><i>Possible error codes: </i>ERR_INPUT_INVALID_DATE, ERR_INPUT_INVALID_FORMAT, ERR_INPUT_MAX_VALUE, ERR_INPUT_MIN_VALUE, ERR_INVALID_PARAMETER, ERR_SYSTEM_NO_AVAILABLE_STORAGE_HOSTS'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Errors'
              examples:
                ERR_INPUT_INVALID_DATE:
                  summary: The input is not a valid date.
                  description: The input is not a valid date.
                  value:
                    errors:
                    - code: ERR_INPUT_INVALID_DATE
                      message: The input is not a valid date.
                ERR_INPUT_INVALID_FORMAT:
                  summary: The input is invalid.
                  description: The input is invalid.
                  value:
                    errors:
                    - code: ERR_INPUT_INVALID_FORMAT
                      message: The input is invalid.
                ERR_INPUT_MAX_VALUE:
                  summary: The specified input exceed the maximum allowed value.
                  description: The specified input exceed the maximum allowed value.
                  value:
                    errors:
                    - code: ERR_INPUT_MAX_VALUE
                      message: The specified input exceed the maximum allowed value.
                ERR_INPUT_MIN_VALUE:
                  summary: The specified input below the minimum allowed value.
                  description: The specified input below the minimum allowed value.
                  value:
                    errors:
                    - code: ERR_INPUT_MIN_VALUE
                      message: The specified input below the minimum allowed value.
                ERR_INVALID_PARAMETER:
                  summary: Invalid Parameter Exception
                  description: Invalid Parameter Exception
                  value:
                    errors:
                    - code: ERR_INVALID_PARAMETER
                      message: Invalid Parameter Exception
                ERR_SYSTEM_NO_AVAILABLE_STORAGE_HOSTS:
                  summary: No available storage hosts
                  description: No available storage hosts
                  value:
                    errors:
                    - code: ERR_SYSTEM_NO_AVAILABLE_STORAGE_HOSTS
                      message: No available storage hosts
        '490':
          description: Request blocked by WAF
  /rest/mail/{id}/actions/initiateUpload:
    post:
      summary: Initiate a file upload session for an email attachment
      description: "### Description:\n  Creates an upload session for a file to be attached to an email. Once the session is created, an upload link is returned which can be used to upload the attachment in chunks.\n### Precondition:\n  The user must be the sender of the email.\n### Response:\n  The upload session is created and an upload link is returned for subsequent chunk uploads.\n"
      tags:
      - uploads
      parameters:
      - in: path
        name: id
        required: true
        description: The unique identifier (UUID) of the email.
        schema:
          type: string
          format: uuid
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/InitiateUploadPostRequest'
      responses:
        '201':
          description: Upload session successfully created and an upload link returned.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Uplo

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