Operations (sample payloads)
Main operationsCopy
Delete Multiple ObjectsCopy
Delete multiple objects in an S3 bucket.
Sample Input
1{2"access_key": "AKIAIOSFODNN7EXAMPLE",3"secret_key": "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY",4"region": "us-west-2",5"bucket_name": "my-example-bucket",6"object_keys": [7{8"Key": "documents/report2023.pdf"9},10{11"Key": "images/profile.jpg"12},13{14"Key": "backups/database_20230515.sql",15"VersionId": "3HL4kqtJvjVBH40Nrjfkd"16}17]18}
Sample Output
1{}
Delete ObjectCopy
Delete an object in an S3 bucket.
Sample Input
1{2"access_key": "AKIAIOSFODNN7EXAMPLE",3"secret_key": "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY",4"region": "us-west-2",5"bucket_name": "my-bucket",6"object_path": "documents/report.pdf"7}
Sample Output
1{2"success": true3}
Get bucket locationCopy
Get the region of specified bucket.
Sample Input
1{2"access_key": "AKIAIOSFODNN7EXAMPLE",3"secret_key": "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY",4"region": "auto",5"bucket_name": "my-example-bucket"6}
Sample Output
1{2"result": "us-west-2"3}
Get ObjectCopy
Get an object from an S3 bucket.
Sample Input
1{2"access_key": "AKIAIOSFODNN7EXAMPLE",3"secret_key": "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY",4"region": "us-west-2",5"bucket_name": "my-bucket",6"object_path": "documents/report.pdf"7}
Sample Output
1{2"file": {3"name": "report.pdf",4"url": "https://my-bucket.s3.us-west-2.amazonaws.com/documents/report.pdf?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIOSFODNN7EXAMPLE%2F20230515%2Fus-west-2%2Fs3%2Faws4_request&X-Amz-Date=20230515T120000Z&X-Amz-Expires=3600&X-Amz-SignedHeaders=host&X-Amz-Signature=1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef",5"mime_type": "application/pdf",6"expires": 16841520007}8}
Get Object's Signed URLCopy
Get an object's signed url from an S3 bucket.
Sample Input
1{2"access_key": "AKIAIOSFODNN7EXAMPLE",3"secret_key": "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY",4"region": "us-west-2",5"bucket_name": "my-example-bucket",6"object_path": "documents/report.pdf",7"expires_seconds": 3600,8"range_from": 0,9"range_to": 104857610}
Sample Output
1{2"file": {3"name": "report.pdf",4"url": "https://my-example-bucket.s3.us-west-2.amazonaws.com/documents/report.pdf?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIOSFODNN7EXAMPLE%2F20230515%2Fus-west-2%2Fs3%2Faws4_request&X-Amz-Date=20230515T120000Z&X-Amz-Expires=3600&X-Amz-SignedHeaders=host&X-Amz-Signature=1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef",5"expires": 16841520006}7}
Head ObjectCopy
Get object metadata
Sample Input
1{2"access_key": "AKIAIOSFODNN7EXAMPLE",3"secret_key": "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY",4"region": "us-west-2",5"bucket_name": "my-bucket",6"object_path": "documents/report.pdf"7}
Sample Output
1{2"AcceptRanges": "bytes",3"LastModified": "2023-05-15T14:30:00.000Z",4"ContentLength": 2048576,5"ETag": "\"d41d8cd98f00b204e9800998ecf8427e\"",6"ContentType": "application/pdf",7"Metadata": {8"sourcetype": "pdf",9"hostname": "example.com",10"s3_filename_prefix": "documents",11"s3_filename": "report.pdf",12"type": "document",13"s3_filename_suffix": "pdf",14"datatype": "binary",15"s3_folder": "documents"16}17}
List Bucket ObjectsCopy
List objects in an S3 bucket.
Sample Input
1{2"access_key": "AKIAIOSFODNN7EXAMPLE",3"secret_key": "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY",4"bucket_name": "my-bucket",5"prefix": "documents/",6"delimiter": "/",7"max_keys": 10008}
Sample Output
1{2"IsTruncated": true,3"Contents": [4{5"Key": "documents/file1.txt",6"LastModified": "2023-05-15T10:30:00.000Z",7"ETag": "\"d41d8cd98f00b204e9800998ecf8427e\"",8"Size": 1024,9"StorageClass": "STANDARD",10"Owner": {11"DisplayName": "JohnDoe",12"ID": "1234567890abcdef1234567890abcdef12345678901234567890abcdef"13}14},15{16"Key": "documents/file2.pdf",17"LastModified": "2023-05-16T14:45:00.000Z",18"ETag": "\"f2ca1bb6c7e907d06dafe4687e579fce\"",19"Size": 2048,20"StorageClass": "STANDARD",21"Owner": {22"DisplayName": "JohnDoe",23"ID": "1234567890abcdef1234567890abcdef12345678901234567890abcdef"24}25}26],27"Name": "my-bucket",28"Prefix": "documents/",29"MaxKeys": 1000,30"CommonPrefixes": [31{32"Prefix": "documents/subfolder1/"33},34{35"Prefix": "documents/subfolder2/"36}37],38"KeyCount": 4,39"NextContinuationToken": "1ueGcxLPRx1Tr/XYExHnhbYLgveDs2J/wm36Hy4vbOwM="40}
List BucketsCopy
List all the buckets available for your authentication.
Sample Input
1{2"access_key": "AKIAIOSFODNN7EXAMPLE",3"secret_key": "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY",4"region": "us-west-2"5}
Sample Output
1{2"Buckets": [3{4"Name": "my-bucket-1",5"CreationDate": "2023-05-15T10:30:00.000Z"6},7{8"Name": "my-bucket-2",9"CreationDate": "2023-05-16T14:45:00.000Z"10},11{12"Name": "backup-bucket",13"CreationDate": "2023-05-17T09:00:00.000Z"14}15]16}
Put Object (File)Copy
Put an object in an S3 bucket from an existing Tray.io file object.
Sample Input
1{2"access_key": "AKIAIOSFODNN7EXAMPLE",3"secret_key": "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY",4"region": "us-west-2",5"bucket_name": "my-bucket",6"object_path": "uploads/document.pdf",7"file": {8"name": "document.pdf",9"url": "https://example.com/files/document.pdf",10"mime_type": "application/pdf"11},12"acl": "private",13"expires": "2023-12-31T23:59:59Z",14"meta_data": [15{16"key": "project",17"value": "annual-report"18},19{20"key": "department",21"value": "finance"22}23]24}
Sample Output
1{2"file": {3"name": "document.pdf",4"url": "https://my-bucket.s3.us-west-2.amazonaws.com/uploads/document.pdf",5"mime_type": "application/pdf",6"expires": 17040671997}8}
Put Object (Text)Copy
Put an object in an S3 bucket from some UTF-8 text content and a mime type.
Sample Input
1{2"access_key": "AKIAIOSFODNN7EXAMPLE",3"secret_key": "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY",4"region": "us-west-2",5"bucket_name": "my-example-bucket",6"object_path": "documents/example.json",7"content": "{\n\t\"name\": \"John Doe\",\n\t\"age\": 30,\n\t\"city\": \"New York\"\n}",8"mime_type": "application/json",9"acl": "private",10"expires": "2023-12-31T23:59:59Z"11}
Sample Output
1{2"file": {3"name": "documents/example.json",4"url": "https://my-example-bucket.s3.us-west-2.amazonaws.com/documents/example.json",5"mime_type": "application/json",6"expires": 17040671997}8}
Put Object ACLCopy
Put an existing-object Access Control List
Sample Input
1{2"access_key": "AKIAIOSFODNN7EXAMPLE",3"secret_key": "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY",4"region": "us-west-2",5"bucket_name": "my-bucket",6"object_path": "documents/report.pdf",7"acl": "public-read"8}
Sample Output
1{}
DDL operationsCopy
List buckets (DDL)Copy
Note that DDL operations can only be called directly by Connectors API, or when using CustomJS in the Embedded solution editor for e.g. DDL-dependent data mapping
Sample Input
1{2"access_key": "AKIAIOSFODNN7EXAMPLE",3"secret_key": "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY",4"region": "us-west-2"5}
Sample Output
1{2"buckets": [3{4"Name": "my-bucket-1",5"CreationDate": "2023-05-15T10:00:00.000Z"6},7{8"Name": "my-bucket-2",9"CreationDate": "2023-05-16T14:30:00.000Z"10},11{12"Name": "my-backup-bucket",13"CreationDate": "2023-05-17T09:15:00.000Z"14}15],16"Owner": {17"DisplayName": "my-aws-account",18"ID": "a1b2c3d4e5f6g7h8i9j0k1l2m3n4o5p6q7r8s9t0"19}20}