openapi: 3.2.0 info: title: Smartcat File Management API version: v1 servers: - url: / tags: - name: File Management paths: /api/integration/v1/file-management/file/{path}: get: tags: - File Management summary: Download a file by path parameters: - name: path in: path description: Path of file required: true schema: type: string responses: '200': description: OK '401': description: Unauthorized content: text/plain: schema: $ref: '#/components/schemas/Models.ErrorResponse' application/json: schema: $ref: '#/components/schemas/Models.ErrorResponse' text/json: schema: $ref: '#/components/schemas/Models.ErrorResponse' '404': description: Not Found content: text/plain: schema: $ref: '#/components/schemas/Models.ErrorResponse' application/json: schema: $ref: '#/components/schemas/Models.ErrorResponse' text/json: schema: $ref: '#/components/schemas/Models.ErrorResponse' operationId: getApiIntegrationV1FileManagementFileByPath x-operation-id-source: derived put: tags: - File Management summary: Upload file to a specified path in storage parameters: - name: path in: path description: Path of file required: true schema: type: string requestBody: content: multipart/form-data: schema: required: - file type: object properties: file: type: string description: New file format: binary encoding: file: style: form responses: '201': description: Created content: application/json: schema: $ref: '#/components/schemas/FileInfoModel' '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/Models.ErrorResponse' '401': description: Unauthorized content: application/json: schema: $ref: '#/components/schemas/Models.ErrorResponse' '402': description: Payment Required content: application/json: schema: $ref: '#/components/schemas/Models.ErrorResponse' operationId: putApiIntegrationV1FileManagementFileByPath x-operation-id-source: derived delete: tags: - File Management summary: Delete a file by path parameters: - name: path in: path description: Path of file required: true schema: type: string responses: '200': description: OK '404': description: Not Found content: text/plain: schema: $ref: '#/components/schemas/Models.ErrorResponse' application/json: schema: $ref: '#/components/schemas/Models.ErrorResponse' text/json: schema: $ref: '#/components/schemas/Models.ErrorResponse' operationId: deleteApiIntegrationV1FileManagementFileByPath x-operation-id-source: derived /api/integration/v1/file-management/files/{path}: put: tags: - File Management summary: Upload multiple files to a specified path in storage description: Original file names will be used for uploaded files parameters: - name: path in: path description: Prefix for uploaded files required: true schema: type: string - name: unzip in: query description: Extract files from uploaded zip file(-s) instead of saving zip as-is schema: type: boolean default: false requestBody: content: multipart/form-data: schema: required: - files type: object properties: files: type: array items: type: string format: binary description: New files encoding: files: style: form responses: '201': description: Created content: application/json: schema: type: array items: $ref: '#/components/schemas/FileInfoModel' '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/Models.ErrorResponse' '401': description: Unauthorized content: application/json: schema: $ref: '#/components/schemas/Models.ErrorResponse' '402': description: Payment Required content: application/json: schema: $ref: '#/components/schemas/Models.ErrorResponse' operationId: putApiIntegrationV1FileManagementFilesByPath x-operation-id-source: derived /api/integration/v1/file-management/file-info/{path}: get: tags: - File Management summary: Get single file info by path parameters: - name: path in: path description: Path of file required: true schema: type: string responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/FileInfoModel' '401': description: Unauthorized content: application/json: schema: $ref: '#/components/schemas/Models.ErrorResponse' '404': description: Not Found content: application/json: schema: $ref: '#/components/schemas/Models.ErrorResponse' operationId: getApiIntegrationV1FileManagementFileInfoByPath x-operation-id-source: derived /api/integration/v1/file-management/file-info-list/{prefix}: get: tags: - File Management summary: Get list of files whose path starts with given prefix parameters: - name: prefix in: path description: Prefix for searching files required: true schema: type: string - name: batchKey in: query description: Key to request the next batch of files schema: type: string responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/BatchResult_FileInfoModel' '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/Models.ErrorResponse' '401': description: Unauthorized content: application/json: schema: $ref: '#/components/schemas/Models.ErrorResponse' operationId: getApiIntegrationV1FileManagementFileInfoListByPrefix x-operation-id-source: derived components: schemas: BatchResult_FileInfoModel: type: object properties: items: type: - array - 'null' items: $ref: '#/components/schemas/FileInfoModel' nextBatchKey: type: - string - 'null' additionalProperties: false FileInfoModel: type: object properties: name: type: - string - 'null' description: Original name of the file mime: type: - string - 'null' description: Mime type of the file path: type: - string - 'null' description: Path of file in storage size: type: integer description: Size of file in bytes format: int64 createdAt: type: string description: Date when file was uploaded format: date-time lastAccessTime: type: - string - 'null' description: Date when file was last time accessed format: date-time expirationTime: type: string description: Date when file will be deleted if not used format: date-time additionalProperties: false description: Information about file uploaded to storage Models.ErrorResponse: type: object properties: message: type: - string - 'null' details: type: - string - 'null' correlationId: type: - string - 'null' additionalProperties: false