curl --request POST \
--url http://localhost:3000/api/v1/peers/create \
--header 'Authorization: Basic OmJsXPNrU3dhbjEyMw==' \
--header 'Content-Type: application/json' \
--data '{
"peer": {
"name": "snowflake_peer_via_api",
"type": 1,
"snowflake_config": {
"account_id": "account_id",
"username": "username",
"private_key":"***",
"database": "database",
"warehouse": "warehouse",
"role": "role",
"query_timeout": 30,
"password": "password"
}
},
"allow_update":false
}'
{
"status": "CREATED",
"message": ""
}
You can create a Snowflake peer using this endpoint. Here is the request and response format for creating a Snowflake peer.
Request Fields
Configuration of the peer to be created.
The name of the peer to be created.
The type of peer to be created. The value for Snowflake is 1.
Configuration for the Snowflake peer
The account ID of the Snowflake server.
The username to connect to the Snowflake server.
The private key in PEM or pk8 format to connect to the Snowflake server.
If you are providing an encrypted key, please provide the password as a separate field (listed below).
The database to connect to.
The warehouse to connect to.
The Snowflake role to connect to.
The query timeout in seconds. The default is 30 seconds.
This is optional, if the private key provided is encrypted.
Whether you wish to update a peer with this name if it already exists. Default is false
.
Response Fields
Whether the creation/update was successful. If yes, the value will be CREATED
. Else it will be FAILED
.
curl --request POST \
--url http://localhost:3000/api/v1/peers/create \
--header 'Authorization: Basic OmJsXPNrU3dhbjEyMw==' \
--header 'Content-Type: application/json' \
--data '{
"peer": {
"name": "snowflake_peer_via_api",
"type": 1,
"snowflake_config": {
"account_id": "account_id",
"username": "username",
"private_key":"***",
"database": "database",
"warehouse": "warehouse",
"role": "role",
"query_timeout": 30,
"password": "password"
}
},
"allow_update":false
}'
{
"status": "CREATED",
"message": ""
}