Data Transfer

Data Transfer

The data transfer APIs allow initiating data transfer on a connection and getting the status of the transfer.

Initiate Transfer

This API can be used to initiate transfer on an active connection. Run time parameters can also be passed during the initiate transfer call.

POST /es/v2/data/<connection_id>/transfer

Query parameters

&accountId=<sub_account_id> // Required for data transfers in sub-accounts

Request Body:

{
  "configuration": {
  	"source": {
    
  	},
  	"destination": {
    
  	}
   }
// run time configuration
}

Response:

{
  "id": string,  // batch_id
  "status": string  // in-progress / failure / success
}

Sample Curl::

curl --location --globoff '<host>/es/v2/data/825c0cb809444dba/transfer?account_id=da85fa0834e1bb11}}' \
--header ''Authorization: Bearer f571a1ea-bd6a-487e-a33f-3999bf00b060' \
--header 'Content-Type: application/json' \
--data '{
    "configuration": {
        "source": {
            "bucketURI": "s3://snowflake-native-app-test/connectors/sample"
        }
    }
}'

Get Request Status

This API allows fetching status of ongoing or completed data transfers.

GET /es/v2/data/<connection_id>/status/<batch_id>

Query parameters

&accountId=<sub_account_id> // Required for data transfers in sub-accounts

Response:

{
  "id": string,
  "status": string  // pending / failure / success
}

Sample Curl::

curl --location '<host>/es/v2/data/849b79953b98feac/status/c21c77079c084d0c9846259bf564c070?accountId=a3ba4fbd9d51df11' \
--header 'Authorization: Bearer c076dc2e-d0c2-4d4d-ab13-e4e3dd555fc0'

Last updated