Operations (sample payloads)
Main operationsCopy
Copy
Bzip2Copy
Copy
Compress a file using bzip2.
Sample Input
1{2"file": {3"name": "example.txt",4"url": "https://example.com/files/example.txt",5"mime_type": "text/plain",6"expires": 16725312007},8"file_name": "compressed_example"9}
Sample Output
1{2"file": {3"name": "compressed_example.bz2",4"url": "https://example.com/files/compressed_example.bz2",5"mime_type": "application/x-bzip2",6"expires": 16726176007}8}
GzipCopy
Copy
Gzip a file.
Sample Input
1{2"file": {3"name": "example.txt",4"url": "https://example.com/files/example.txt",5"mime_type": "text/plain",6"expires": 16725312007}8}
Sample Output
1{2"result": {3"name": "example.txt.gz",4"url": "https://example.com/files/example.txt.gz",5"mime_type": "application/gzip",6"expires": 16726176007}8}
Unbzip2Copy
Copy
Decompress a bzip2 file.
Sample Input
1{2"file": {3"name": "compressed_document.bz2",4"url": "https://example.com/files/compressed_document.bz2",5"mime_type": "application/x-bzip2",6"expires": 16234567897},8"file_name": "decompressed_document.pdf"9}
Sample Output
1{2"file": {3"name": "decompressed_document.pdf",4"url": "https://example.com/files/decompressed_document.pdf",5"mime_type": "application/pdf",6"expires": 16234567897}8}
UngzipCopy
Copy
Decompress a gzip file.
Sample Input
1{2"file": {3"name": "compressed_document.gz",4"url": "https://example.com/files/compressed_document.gz",5"mime_type": "application/gzip",6"expires": 16234567897},8"output_file_name": "decompressed_document.pdf"9}
Sample Output
1{2"result": {3"name": "decompressed_document.pdf",4"url": "https://example.com/files/decompressed_document.pdf",5"mime_type": "application/pdf",6"expires": 16234577897}8}
UnzipCopy
Copy
Unzip a file.
Sample Input
1{2"url": "https://example.com/files/archive.zip"3}
Sample Output
1{2"items": [3{4"name": "document1.pdf",5"url": "https://example.com/temp/unzipped/document1.pdf",6"mime_type": "application/pdf",7"expires": 16234567898},9{10"name": "image1.jpg",11"url": "https://example.com/temp/unzipped/image1.jpg",12"mime_type": "image/jpeg",13"expires": 162345678914},15{16"name": "spreadsheet.xlsx",17"url": "https://example.com/temp/unzipped/spreadsheet.xlsx",18"mime_type": "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",19"expires": 162345678920}21]22}
Unzip and decryptCopy
Copy
Unzip a password protected file
Sample Input
1{2"file": {3"name": "confidential_report.zip",4"url": "https://example.com/files/confidential_report.zip",5"mime_type": "application/zip",6"expires": 16234567897},8"password": "S3cureP@ssw0rd!"9}
Sample Output
1{2"items": [3{4"name": "financial_data.xlsx",5"url": "https://example.com/files/financial_data.xlsx",6"mime_type": "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",7"expires": 16234577898},9{10"name": "project_summary.pdf",11"url": "https://example.com/files/project_summary.pdf",12"mime_type": "application/pdf",13"expires": 162345778914},15{16"name": "meeting_notes.docx",17"url": "https://example.com/files/meeting_notes.docx",18"mime_type": "application/vnd.openxmlformats-officedocument.wordprocessingml.document",19"expires": 162345778920}21]22}
ZipCopy
Copy
Zip up a number of files.
Sample Input
1{2"files": [3{4"file": {5"name": "document1.pdf",6"url": "https://example.com/files/document1.pdf",7"mime_type": "application/pdf",8"expires": 16234567899},10"path": "/documents/document1.pdf"11},12{13"file": {14"name": "image1.jpg",15"url": "https://example.com/files/image1.jpg",16"mime_type": "image/jpeg",17"expires": 162345679018},19"path": "/images/image1.jpg"20},21{22"file": {23"name": "spreadsheet1.xlsx",24"url": "https://example.com/files/spreadsheet1.xlsx",25"mime_type": "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",26"expires": 162345679127},28"path": "/spreadsheets/spreadsheet1.xlsx"29}30],31"file_name": "my_project_files",32"encase_files_in_directory": true33}
Sample Output
1{2"result": {3"name": "my_project_files.zip",4"url": "https://example.com/zipped/my_project_files.zip",5"mime_type": "application/zip",6"expires": 16235431897}8}
Zip and encryptCopy
Copy
Zip and password protect a number of files
Sample Input
1{2"files": [3{4"file": {5"name": "document1.pdf",6"url": "https://example.com/files/document1.pdf",7"mime_type": "application/pdf",8"expires": 16234567899},10"path": "/documents/"11},12{13"file": {14"name": "image1.jpg",15"url": "https://example.com/files/image1.jpg",16"mime_type": "image/jpeg",17"expires": 162345679018},19"path": "/images/"20}21],22"file_name": "protected_archive.zip",23"password": "securePassword123!",24"encryption_type": "AES 256"25}
Sample Output
1{2"result": {3"name": "protected_archive.zip",4"url": "https://example.com/files/protected_archive.zip",5"mime_type": "application/zip",6"expires": 16234600007}8}