@lap v0.3
# Machine-readable API spec. Each @endpoint block is one API call.
@api File storage API
@base https://unify.apideck.com
@version 10.24.14
@auth ApiKey Authorization in header
@common_fields {x-apideck-consumer-id: str, x-apideck-app-id: str, x-apideck-service-id: str}
@endpoints 33
@hint download_for_search
@toc file-storage(33)

@endpoint GET /file-storage/files
@optional {raw: bool=false, cursor: str, limit: int=20, filter: map, sort: map, pass_through: map, fields: str}
@returns(200) {status_code: int, status: str, service: str, resource: str, operation: str, data: [map], meta: map{items_on_page: int, cursors: map{previous: str?, current: str?, next: str?}}, links: map{previous: str?, current: str, next: str?}, _raw: map?}
@errors {400, 401, 402, 404, 422}

@endpoint POST /file-storage/files
@required {x-apideck-metadata: any}
@optional {raw: bool=false}
@returns(201) {status_code: int, status: str, service: str, resource: str, operation: str, data: map{id: str}, _raw: map?}
@errors {400, 401, 402, 404, 422}

@endpoint POST /file-storage/files/search
@required {query: str}
@optional {pass_through: map, fields: str, cursor: str, limit: int=20, raw: bool=false, filter: map, drive_id: str, pass_through: [map{service_id!: str, operation_id: str, extend_object: map, extend_paths: [map]}]}
@returns(200) {status_code: int, status: str, service: str, resource: str, operation: str, data: [map], meta: map{items_on_page: int, cursors: map{previous: str?, current: str?, next: str?}}, links: map{previous: str?, current: str, next: str?}, _raw: map?}
@errors {400, 401, 402, 404, 422}

@endpoint GET /file-storage/files/{id}
@required {id: str}
@optional {raw: bool=false, fields: str}
@returns(200) {status_code: int, status: str, service: str, resource: str, operation: str, data: map{id: str, downstream_id: str?, name: str?, description: str?, type: str?, path: str?, mime_type: str?, downloadable: bool, size: int?, owner: map{id: str, email: str?, name: str?}, parent_folders: [map], parent_folders_complete: bool, permissions: map{download: bool}, exportable: bool, export_formats: [str]?, custom_mappings: map?, updated_by: str?, created_by: str?, updated_at: str(date-time)?, created_at: str(date-time)?}, _raw: map?}
@errors {400, 401, 402, 404, 422}

@endpoint PATCH /file-storage/files/{id}
@required {id: str}
@optional {raw: bool=false, name: str, description: str, parent_folder_id: str, pass_through: [map{service_id!: str, operation_id: str, extend_object: map, extend_paths: [map]}]}
@returns(200) {status_code: int, status: str, service: str, resource: str, operation: str, data: map{id: str}, _raw: map?}
@errors {400, 401, 402, 404, 422}

@endpoint DELETE /file-storage/files/{id}
@required {id: str}
@optional {raw: bool=false}
@returns(200) {status_code: int, status: str, service: str, resource: str, operation: str, data: map{id: str}, _raw: map?}
@errors {400, 401, 402, 404, 422}

@endpoint GET /file-storage/files/{id}/download
@required {id: str}
@optional {fields: str}
@returns(200)
@errors {400, 401, 402, 404, 422}

@endpoint GET /file-storage/files/{id}/export
@required {id: str, format: str}
@optional {fields: str}
@returns(200)
@errors {400, 401, 402, 404, 422}

@endpoint POST /file-storage/folders
@required {name: str, parent_folder_id: str}
@optional {raw: bool=false, fields: str, id: str, description: str, drive_id: str, pass_through: [map{service_id!: str, operation_id: str, extend_object: map, extend_paths: [map]}]}
@returns(201) {status_code: int, status: str, service: str, resource: str, operation: str, data: map{id: str}, _raw: map?}
@errors {400, 401, 402, 404, 422}

@endpoint GET /file-storage/folders/{id}
@required {id: str}
@optional {raw: bool=false, fields: str}
@returns(200) {status_code: int, status: str, service: str, resource: str, operation: str, data: map{id: str, downstream_id: str?, name: str, description: str?, path: str?, size: int?, downloadable: bool?, owner: map{id: str, email: str?, name: str?}, parent_folders: [map], parent_folders_complete: bool, custom_mappings: map?, updated_by: str?, created_by: str?, updated_at: str(date-time)?, created_at: str(date-time)?}, _raw: map?}
@errors {400, 401, 402, 404, 422}

@endpoint PATCH /file-storage/folders/{id}
@required {id: str}
@optional {raw: bool=false, id: str, name: str, description: str, parent_folder_id: str, pass_through: [map{service_id!: str, operation_id: str, extend_object: map, extend_paths: [map]}]}
@returns(200) {status_code: int, status: str, service: str, resource: str, operation: str, data: map{id: str}, _raw: map?}
@errors {400, 401, 402, 404, 422}

@endpoint DELETE /file-storage/folders/{id}
@required {id: str}
@optional {raw: bool=false}
@returns(200) {status_code: int, status: str, service: str, resource: str, operation: str, data: map{id: str}, _raw: map?}
@errors {400, 401, 402, 404, 422}

@endpoint POST /file-storage/folders/{id}/copy
@required {id: str, parent_folder_id: str}
@optional {raw: bool=false, fields: str, id: str, name: str, pass_through: [map{service_id!: str, operation_id: str, extend_object: map, extend_paths: [map]}]}
@returns(200) {status_code: int, status: str, service: str, resource: str, operation: str, data: map{id: str}, _raw: map?}
@errors {400, 401, 402, 404, 422}

@endpoint GET /file-storage/shared-links
@optional {raw: bool=false, cursor: str, limit: int=20, pass_through: map, fields: str}
@returns(200) {status_code: int, status: str, service: str, resource: str, operation: str, data: [map], _raw: map?, meta: map{items_on_page: int, cursors: map{previous: str?, current: str?, next: str?}}, links: map{previous: str?, current: str, next: str?}}
@errors {400, 401, 402, 404, 422}

@endpoint POST /file-storage/shared-links
@required {target_id: str}
@optional {raw: bool=false, url: str, download_url: str, target: map{id!: str, name: str, type: str}, scope: str(public/company), password_protected: bool, password: str, expires_at: str(date-time), updated_at: str(date-time), created_at: str(date-time), pass_through: [map{service_id!: str, operation_id: str, extend_object: map, extend_paths: [map]}]}
@returns(201) {status_code: int, status: str, service: str, resource: str, operation: str, data: map{id: str}, _raw: map?}
@errors {400, 401, 402, 404, 422}

@endpoint GET /file-storage/shared-links/{id}
@required {id: str}
@optional {raw: bool=false, fields: str}
@returns(200) {status_code: int, status: str, service: str, resource: str, operation: str, data: map{url: str?, download_url: str?, target_id: str?, target: map{id: str, name: str?, type: str?}, scope: str?, password_protected: bool?, password: str?, expires_at: str(date-time)?, updated_at: str(date-time)?, created_at: str(date-time)?, pass_through: [map]}, _raw: map?}
@errors {400, 401, 402, 404, 422}

@endpoint PATCH /file-storage/shared-links/{id}
@required {id: str, target_id: str}
@optional {raw: bool=false, url: str, download_url: str, target: map{id!: str, name: str, type: str}, scope: str(public/company), password_protected: bool, password: str, expires_at: str(date-time), updated_at: str(date-time), created_at: str(date-time), pass_through: [map{service_id!: str, operation_id: str, extend_object: map, extend_paths: [map]}]}
@returns(200) {status_code: int, status: str, service: str, resource: str, operation: str, data: map{id: str}, _raw: map?}
@errors {400, 401, 402, 404, 422}

@endpoint DELETE /file-storage/shared-links/{id}
@required {id: str}
@optional {raw: bool=false}
@returns(200) {status_code: int, status: str, service: str, resource: str, operation: str, data: map{id: str}, _raw: map?}
@errors {400, 401, 402, 404, 422}

@endpoint POST /file-storage/upload-sessions
@required {name: str, parent_folder_id: str, size: int}
@optional {raw: bool=false, drive_id: str, pass_through: [map{service_id!: str, operation_id: str, extend_object: map, extend_paths: [map]}]}
@returns(201) {status_code: int, status: str, service: str, resource: str, operation: str, data: map{id: str}, _raw: map?}
@errors {400, 401, 402, 404, 422}

@endpoint GET /file-storage/upload-sessions/{id}
@required {id: str}
@optional {raw: bool=false, fields: str}
@returns(200) {status_code: int, status: str, service: str, resource: str, operation: str, data: map{id: str, success: bool, part_size: num, parallel_upload_supported: bool, uploaded_byte_range: str, expires_at: str(date-time)?}, _raw: map?}
@errors {400, 401, 402, 404, 422}

@endpoint PUT /file-storage/upload-sessions/{id}
@required {id: str, part_number: num}
@optional {digest: str, raw: bool=false}
@returns(200) {status_code: int, status: str, service: str, resource: str, operation: str, data: map{id: str}, _raw: map?}
@errors {400, 401, 402, 404, 422}

@endpoint DELETE /file-storage/upload-sessions/{id}
@required {id: str}
@optional {raw: bool=false}
@returns(200) {status_code: int, status: str, service: str, resource: str, operation: str, data: map{id: str}, _raw: map?}
@errors {400, 401, 402, 404, 422}

@endpoint POST /file-storage/upload-sessions/{id}/finish
@required {id: str}
@optional {raw: bool=false, digest: str}
@returns(201) {status_code: int, status: str, service: str, resource: str, operation: str, data: map{id: str, downstream_id: str?, name: str?, description: str?, type: str?, path: str?, mime_type: str?, downloadable: bool, size: int?, owner: map{id: str, email: str?, name: str?}, parent_folders: [map], parent_folders_complete: bool, permissions: map{download: bool}, exportable: bool, export_formats: [str]?, custom_mappings: map?, updated_by: str?, created_by: str?, updated_at: str(date-time)?, created_at: str(date-time)?}, _raw: map?}
@errors {400, 401, 402, 404, 422}

@endpoint GET /file-storage/drives
@optional {raw: bool=false, cursor: str, limit: int=20, filter: map, fields: str}
@returns(200) {status_code: int, status: str, service: str, resource: str, operation: str, data: [map], _raw: map?, meta: map{items_on_page: int, cursors: map{previous: str?, current: str?, next: str?}}, links: map{previous: str?, current: str, next: str?}}
@errors {400, 401, 402, 404, 422}

@endpoint POST /file-storage/drives
@required {id: str, name: str}
@optional {raw: bool=false, description: str, custom_mappings: map, updated_by: str, created_by: str, updated_at: str(date-time), created_at: str(date-time), pass_through: [map{service_id!: str, operation_id: str, extend_object: map, extend_paths: [map]}]}
@returns(201) {status_code: int, status: str, service: str, resource: str, operation: str, data: map{id: str}, _raw: map?}
@errors {400, 401, 402, 404, 422}

@endpoint GET /file-storage/drives/{id}
@required {id: str}
@optional {raw: bool=false, fields: str}
@returns(200) {status_code: int, status: str, service: str, resource: str, operation: str, data: map{id: str, name: str, description: str?, custom_mappings: map?, updated_by: str?, created_by: str?, updated_at: str(date-time)?, created_at: str(date-time)?, pass_through: [map]}, _raw: map?}
@errors {400, 401, 402, 404, 422}

@endpoint PATCH /file-storage/drives/{id}
@required {id: str, id: str, name: str}
@optional {raw: bool=false, description: str, custom_mappings: map, updated_by: str, created_by: str, updated_at: str(date-time), created_at: str(date-time), pass_through: [map{service_id!: str, operation_id: str, extend_object: map, extend_paths: [map]}]}
@returns(200) {status_code: int, status: str, service: str, resource: str, operation: str, data: map{id: str}, _raw: map?}
@errors {400, 401, 402, 404, 422}

@endpoint DELETE /file-storage/drives/{id}
@required {id: str}
@optional {raw: bool=false}
@returns(200) {status_code: int, status: str, service: str, resource: str, operation: str, data: map{id: str}, _raw: map?}
@errors {400, 401, 402, 404, 422}

@endpoint GET /file-storage/drive-groups
@optional {raw: bool=false, cursor: str, limit: int=20, filter: map, pass_through: map, fields: str}
@returns(200) {status_code: int, status: str, service: str, resource: str, operation: str, data: [map], _raw: map?, meta: map{items_on_page: int, cursors: map{previous: str?, current: str?, next: str?}}, links: map{previous: str?, current: str, next: str?}}
@errors {400, 401, 402, 404, 422}

@endpoint POST /file-storage/drive-groups
@required {id: str, name: str}
@optional {raw: bool=false, display_name: str, description: str, custom_mappings: map, updated_by: str, created_by: str, updated_at: str(date-time), created_at: str(date-time), pass_through: [map{service_id!: str, operation_id: str, extend_object: map, extend_paths: [map]}]}
@returns(201) {status_code: int, status: str, service: str, resource: str, operation: str, data: map{id: str}, _raw: map?}
@errors {400, 401, 402, 404, 422}

@endpoint GET /file-storage/drive-groups/{id}
@required {id: str}
@optional {raw: bool=false, fields: str}
@returns(200) {status_code: int, status: str, service: str, resource: str, operation: str, data: map{id: str, name: str, display_name: str?, description: str?, custom_mappings: map?, updated_by: str?, created_by: str?, updated_at: str(date-time)?, created_at: str(date-time)?, pass_through: [map]}, _raw: map?}
@errors {400, 401, 402, 404, 422}

@endpoint PATCH /file-storage/drive-groups/{id}
@required {id: str, id: str, name: str}
@optional {raw: bool=false, display_name: str, description: str, custom_mappings: map, updated_by: str, created_by: str, updated_at: str(date-time), created_at: str(date-time), pass_through: [map{service_id!: str, operation_id: str, extend_object: map, extend_paths: [map]}]}
@returns(200) {status_code: int, status: str, service: str, resource: str, operation: str, data: map{id: str}, _raw: map?}
@errors {400, 401, 402, 404, 422}

@endpoint DELETE /file-storage/drive-groups/{id}
@required {id: str}
@optional {raw: bool=false}
@returns(200) {status_code: int, status: str, service: str, resource: str, operation: str, data: map{id: str}, _raw: map?}
@errors {400, 401, 402, 404, 422}

@end
