Skip to content

Instantly share code, notes, and snippets.

@pramit-marattha
Created July 4, 2023 08:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pramit-marattha/a673f06cb667faec0dbdc9d91921006a to your computer and use it in GitHub Desktop.
Save pramit-marattha/a673f06cb667faec0dbdc9d91921006a to your computer and use it in GitHub Desktop.
[
{
"folders": [
{
"folders": [],
"v": 1,
"name": "Executing SQL Statements w/ Snowflake API",
"requests": [
{
"headers": [
{
"active": true,
"value": "Bearer <<token>>",
"key": "Authorization"
},
{
"active": true,
"value": "<<tokenType>>",
"key": "X-Snowflake-Authorization-Token-Type"
},
{
"active": true,
"value": "application/json",
"key": "Content-Type"
},
{
"active": true,
"value": "application/json",
"key": "Accept"
}
],
"endpoint": "<<baseURL>>/api/v2/statements",
"method": "POST",
"auth": {
"authActive": true,
"authType": "none"
},
"v": "1",
"testScript": "",
"name": "Snowflake API",
"preRequestScript": "",
"params": [],
"body": {
"body": "{\n\"statement\": \"select C_NAME, C_MKTSEGMENT from snowflake_sample_data.tpch_sf1.customer\",\n\"timeout\": 60,\n\"database\": \"snowflake_sample_data\",\n\"schema\": \"tpch_sf1\",\n\"warehouse\": \"MY_WH\",\n\"role\": \"ACCOUNTADMIN\"\n}",
"contentType": "application/json"
}
}
]
},
{
"folders": [],
"v": 1,
"name": "Checking the Status of Statement Execution",
"requests": [
{
"headers": [
{
"active": true,
"value": "Bearer <<token>>",
"key": "Authorization"
},
{
"active": true,
"value": "<<tokenType>>",
"key": "X-Snowflake-Authorization-Token-Type"
},
{
"active": true,
"value": "application/json",
"key": "Content-Type"
},
{
"active": true,
"value": "application/json",
"key": "Accept"
}
],
"endpoint": "<<baseURL>>/api/v2/statements/<<statementHandle>>",
"method": "GET",
"auth": {
"authActive": true,
"authType": "none"
},
"v": "1",
"testScript": "",
"name": "Snowflake API",
"preRequestScript": "",
"params": [],
"body": {
"body": "{\n \"statement\": \"select C_NAME, C_MKTSEGMENT from snowflake_sample_data.tpch_sf1.customer\",\n \"timeout\": 60,\n \"database\": \"snowflake_sample_data\",\n \"schema\": \"tpch_sf1\",\n \"warehouse\": \"MY_WH\",\n \"role\": \"ACCOUNTADMIN\"\n}",
"contentType": "application/json"
}
}
]
},
{
"folders": [],
"v": 1,
"name": "Canceling Statement Execution",
"requests": [
{
"headers": [
{
"active": true,
"value": "Bearer <<token>>",
"key": "Authorization"
},
{
"active": true,
"value": "<<tokenType>>",
"key": "X-Snowflake-Authorization-Token-Type"
},
{
"active": true,
"value": "application/json",
"key": "Content-Type"
},
{
"active": true,
"value": "application/json",
"key": "Accept"
}
],
"endpoint": "<<baseURL>>/api/v2/statements/<<statementHandle>>/cancel",
"method": "POST",
"auth": {
"authActive": true,
"authType": "none"
},
"v": "1",
"testScript": "",
"name": "Snowflake API",
"preRequestScript": "",
"params": [],
"body": {
"body": "{\n\"statement\": \"select C_NAME, C_MKTSEGMENT from snowflake_sample_data.tpch_sf1.customer\",\n\"timeout\": 60,\n\"database\": \"snowflake_sample_data\",\n\"schema\": \"tpch_sf1\",\n\"warehouse\": \"MY_WH\",\n\"role\": \"ACCOUNTADMIN\"\n}",
"contentType": "application/json"
}
}
]
}
],
"v": 1,
"name": "Snowflake API",
"requests": []
}
]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment