Create Storage Connection
curl --request POST \
--url https://{host}/api/admin/storage-connections \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"description": "",
"endpoint": "",
"region": "",
"bucket": "",
"access_key": "",
"secret_key": "",
"base_path": "",
"fs_view": "none",
"fs_path": "",
"allowed_prefixes": [
"<string>"
],
"usable_by": [
"<string>"
]
}
'import requests
url = "https://{host}/api/admin/storage-connections"
payload = {
"name": "<string>",
"description": "",
"endpoint": "",
"region": "",
"bucket": "",
"access_key": "",
"secret_key": "",
"base_path": "",
"fs_view": "none",
"fs_path": "",
"allowed_prefixes": ["<string>"],
"usable_by": ["<string>"]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
description: '',
endpoint: '',
region: '',
bucket: '',
access_key: '',
secret_key: '',
base_path: '',
fs_view: 'none',
fs_path: '',
allowed_prefixes: ['<string>'],
usable_by: ['<string>']
})
};
fetch('https://{host}/api/admin/storage-connections', 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://{host}/api/admin/storage-connections",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'description' => '',
'endpoint' => '',
'region' => '',
'bucket' => '',
'access_key' => '',
'secret_key' => '',
'base_path' => '',
'fs_view' => 'none',
'fs_path' => '',
'allowed_prefixes' => [
'<string>'
],
'usable_by' => [
'<string>'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$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://{host}/api/admin/storage-connections"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"description\": \"\",\n \"endpoint\": \"\",\n \"region\": \"\",\n \"bucket\": \"\",\n \"access_key\": \"\",\n \"secret_key\": \"\",\n \"base_path\": \"\",\n \"fs_view\": \"none\",\n \"fs_path\": \"\",\n \"allowed_prefixes\": [\n \"<string>\"\n ],\n \"usable_by\": [\n \"<string>\"\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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.post("https://{host}/api/admin/storage-connections")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"description\": \"\",\n \"endpoint\": \"\",\n \"region\": \"\",\n \"bucket\": \"\",\n \"access_key\": \"\",\n \"secret_key\": \"\",\n \"base_path\": \"\",\n \"fs_view\": \"none\",\n \"fs_path\": \"\",\n \"allowed_prefixes\": [\n \"<string>\"\n ],\n \"usable_by\": [\n \"<string>\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{host}/api/admin/storage-connections")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"description\": \"\",\n \"endpoint\": \"\",\n \"region\": \"\",\n \"bucket\": \"\",\n \"access_key\": \"\",\n \"secret_key\": \"\",\n \"base_path\": \"\",\n \"fs_view\": \"none\",\n \"fs_path\": \"\",\n \"allowed_prefixes\": [\n \"<string>\"\n ],\n \"usable_by\": [\n \"<string>\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"name": "<string>",
"kind": "<string>",
"description": "",
"endpoint": "",
"region": "",
"bucket": "",
"access_key": "",
"base_path": "",
"fs_view": "none",
"fs_path": "",
"allowed_prefixes": [
"<string>"
],
"usable_by": [
"<string>"
],
"has_secret": false,
"probes": {},
"created_by": ""
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}POST
/
api
/
admin
/
storage-connections
Create Storage Connection
curl --request POST \
--url https://{host}/api/admin/storage-connections \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"description": "",
"endpoint": "",
"region": "",
"bucket": "",
"access_key": "",
"secret_key": "",
"base_path": "",
"fs_view": "none",
"fs_path": "",
"allowed_prefixes": [
"<string>"
],
"usable_by": [
"<string>"
]
}
'import requests
url = "https://{host}/api/admin/storage-connections"
payload = {
"name": "<string>",
"description": "",
"endpoint": "",
"region": "",
"bucket": "",
"access_key": "",
"secret_key": "",
"base_path": "",
"fs_view": "none",
"fs_path": "",
"allowed_prefixes": ["<string>"],
"usable_by": ["<string>"]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
description: '',
endpoint: '',
region: '',
bucket: '',
access_key: '',
secret_key: '',
base_path: '',
fs_view: 'none',
fs_path: '',
allowed_prefixes: ['<string>'],
usable_by: ['<string>']
})
};
fetch('https://{host}/api/admin/storage-connections', 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://{host}/api/admin/storage-connections",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'description' => '',
'endpoint' => '',
'region' => '',
'bucket' => '',
'access_key' => '',
'secret_key' => '',
'base_path' => '',
'fs_view' => 'none',
'fs_path' => '',
'allowed_prefixes' => [
'<string>'
],
'usable_by' => [
'<string>'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$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://{host}/api/admin/storage-connections"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"description\": \"\",\n \"endpoint\": \"\",\n \"region\": \"\",\n \"bucket\": \"\",\n \"access_key\": \"\",\n \"secret_key\": \"\",\n \"base_path\": \"\",\n \"fs_view\": \"none\",\n \"fs_path\": \"\",\n \"allowed_prefixes\": [\n \"<string>\"\n ],\n \"usable_by\": [\n \"<string>\"\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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.post("https://{host}/api/admin/storage-connections")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"description\": \"\",\n \"endpoint\": \"\",\n \"region\": \"\",\n \"bucket\": \"\",\n \"access_key\": \"\",\n \"secret_key\": \"\",\n \"base_path\": \"\",\n \"fs_view\": \"none\",\n \"fs_path\": \"\",\n \"allowed_prefixes\": [\n \"<string>\"\n ],\n \"usable_by\": [\n \"<string>\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{host}/api/admin/storage-connections")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"description\": \"\",\n \"endpoint\": \"\",\n \"region\": \"\",\n \"bucket\": \"\",\n \"access_key\": \"\",\n \"secret_key\": \"\",\n \"base_path\": \"\",\n \"fs_view\": \"none\",\n \"fs_path\": \"\",\n \"allowed_prefixes\": [\n \"<string>\"\n ],\n \"usable_by\": [\n \"<string>\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"name": "<string>",
"kind": "<string>",
"description": "",
"endpoint": "",
"region": "",
"bucket": "",
"access_key": "",
"base_path": "",
"fs_view": "none",
"fs_path": "",
"allowed_prefixes": [
"<string>"
],
"usable_by": [
"<string>"
],
"has_secret": false,
"probes": {},
"created_by": ""
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
application/json
Handle a Volume references it by; immutable once created
Minimum string length:
1Available options:
s3, posix S3 endpoint, e.g. https://minio.internal:9000
Stored encrypted; never returned
Absolute path a posix connection is rooted at
Whether this content is reachable as files. none is the honest default: reading a bucket over the S3 API and mounting it are different capabilities. gateway asserts fs_path is the same content (s3fs, a CSI driver); the platform cannot verify that. pull fetches per node on demand.
Available options:
none, gateway, pull Paths under this connection that may be referenced. Empty means all of it.
Projects that may reference it. Empty means every project.
Response
Successful Response
Show child attributes
Show child attributes