Settings
Update storage settings
PUT
/
api
/
settings
/
storage
Update storage settings
curl --request PUT \
--url https://spitshake.io/api/settings/storage \
--header 'Content-Type: application/json' \
--header 'X-Auth-Token: <api-key>' \
--data '
{
"s3_bucket": "<string>",
"s3_region": "<string>",
"s3_access_key": "<string>",
"s3_secret_key": "<string>",
"gcs_bucket": "<string>",
"gcs_project": "<string>",
"azure_container": "<string>",
"azure_account": "<string>"
}
'import requests
url = "https://spitshake.io/api/settings/storage"
payload = {
"s3_bucket": "<string>",
"s3_region": "<string>",
"s3_access_key": "<string>",
"s3_secret_key": "<string>",
"gcs_bucket": "<string>",
"gcs_project": "<string>",
"azure_container": "<string>",
"azure_account": "<string>"
}
headers = {
"X-Auth-Token": "<api-key>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {'X-Auth-Token': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
s3_bucket: '<string>',
s3_region: '<string>',
s3_access_key: '<string>',
s3_secret_key: '<string>',
gcs_bucket: '<string>',
gcs_project: '<string>',
azure_container: '<string>',
azure_account: '<string>'
})
};
fetch('https://spitshake.io/api/settings/storage', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://spitshake.io/api/settings/storage",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
's3_bucket' => '<string>',
's3_region' => '<string>',
's3_access_key' => '<string>',
's3_secret_key' => '<string>',
'gcs_bucket' => '<string>',
'gcs_project' => '<string>',
'azure_container' => '<string>',
'azure_account' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-Auth-Token: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://spitshake.io/api/settings/storage"
payload := strings.NewReader("{\n \"s3_bucket\": \"<string>\",\n \"s3_region\": \"<string>\",\n \"s3_access_key\": \"<string>\",\n \"s3_secret_key\": \"<string>\",\n \"gcs_bucket\": \"<string>\",\n \"gcs_project\": \"<string>\",\n \"azure_container\": \"<string>\",\n \"azure_account\": \"<string>\"\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("X-Auth-Token", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("https://spitshake.io/api/settings/storage")
.header("X-Auth-Token", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"s3_bucket\": \"<string>\",\n \"s3_region\": \"<string>\",\n \"s3_access_key\": \"<string>\",\n \"s3_secret_key\": \"<string>\",\n \"gcs_bucket\": \"<string>\",\n \"gcs_project\": \"<string>\",\n \"azure_container\": \"<string>\",\n \"azure_account\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://spitshake.io/api/settings/storage")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["X-Auth-Token"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"s3_bucket\": \"<string>\",\n \"s3_region\": \"<string>\",\n \"s3_access_key\": \"<string>\",\n \"s3_secret_key\": \"<string>\",\n \"gcs_bucket\": \"<string>\",\n \"gcs_project\": \"<string>\",\n \"azure_container\": \"<string>\",\n \"azure_account\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"success": true
}Authorizations
ApiTokenSessionCookie
API token generated at Settings > API
Body
application/json
Response
200 - application/json
Storage settings updated
⌘I
Update storage settings
curl --request PUT \
--url https://spitshake.io/api/settings/storage \
--header 'Content-Type: application/json' \
--header 'X-Auth-Token: <api-key>' \
--data '
{
"s3_bucket": "<string>",
"s3_region": "<string>",
"s3_access_key": "<string>",
"s3_secret_key": "<string>",
"gcs_bucket": "<string>",
"gcs_project": "<string>",
"azure_container": "<string>",
"azure_account": "<string>"
}
'import requests
url = "https://spitshake.io/api/settings/storage"
payload = {
"s3_bucket": "<string>",
"s3_region": "<string>",
"s3_access_key": "<string>",
"s3_secret_key": "<string>",
"gcs_bucket": "<string>",
"gcs_project": "<string>",
"azure_container": "<string>",
"azure_account": "<string>"
}
headers = {
"X-Auth-Token": "<api-key>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {'X-Auth-Token': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
s3_bucket: '<string>',
s3_region: '<string>',
s3_access_key: '<string>',
s3_secret_key: '<string>',
gcs_bucket: '<string>',
gcs_project: '<string>',
azure_container: '<string>',
azure_account: '<string>'
})
};
fetch('https://spitshake.io/api/settings/storage', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://spitshake.io/api/settings/storage",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
's3_bucket' => '<string>',
's3_region' => '<string>',
's3_access_key' => '<string>',
's3_secret_key' => '<string>',
'gcs_bucket' => '<string>',
'gcs_project' => '<string>',
'azure_container' => '<string>',
'azure_account' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-Auth-Token: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://spitshake.io/api/settings/storage"
payload := strings.NewReader("{\n \"s3_bucket\": \"<string>\",\n \"s3_region\": \"<string>\",\n \"s3_access_key\": \"<string>\",\n \"s3_secret_key\": \"<string>\",\n \"gcs_bucket\": \"<string>\",\n \"gcs_project\": \"<string>\",\n \"azure_container\": \"<string>\",\n \"azure_account\": \"<string>\"\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("X-Auth-Token", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("https://spitshake.io/api/settings/storage")
.header("X-Auth-Token", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"s3_bucket\": \"<string>\",\n \"s3_region\": \"<string>\",\n \"s3_access_key\": \"<string>\",\n \"s3_secret_key\": \"<string>\",\n \"gcs_bucket\": \"<string>\",\n \"gcs_project\": \"<string>\",\n \"azure_container\": \"<string>\",\n \"azure_account\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://spitshake.io/api/settings/storage")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["X-Auth-Token"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"s3_bucket\": \"<string>\",\n \"s3_region\": \"<string>\",\n \"s3_access_key\": \"<string>\",\n \"s3_secret_key\": \"<string>\",\n \"gcs_bucket\": \"<string>\",\n \"gcs_project\": \"<string>\",\n \"azure_container\": \"<string>\",\n \"azure_account\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"success": true
}
