Get Basin Config
curl --request GET \
--url https://api.example.com/basins/{basin}import requests
url = "https://api.example.com/basins/{basin}"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.example.com/basins/{basin}', 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://api.example.com/basins/{basin}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/basins/{basin}"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.example.com/basins/{basin}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/basins/{basin}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"default_stream_config": {
"storage_class": "<string>",
"retention_policy": {},
"timestamping": {
"mode": "<string>",
"uncapped": true
},
"delete_on_empty": {
"min_age_secs": 123
}
},
"create_stream_on_append": true,
"create_stream_on_read": true
}Basins
Get Basin Config
GET
/
basins
/
{basin}
Get Basin Config
curl --request GET \
--url https://api.example.com/basins/{basin}import requests
url = "https://api.example.com/basins/{basin}"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.example.com/basins/{basin}', 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://api.example.com/basins/{basin}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/basins/{basin}"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.example.com/basins/{basin}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/basins/{basin}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"default_stream_config": {
"storage_class": "<string>",
"retention_policy": {},
"timestamping": {
"mode": "<string>",
"uncapped": true
},
"delete_on_empty": {
"min_age_secs": 123
}
},
"create_stream_on_append": true,
"create_stream_on_read": true
}Get the configuration for a basin.
Path Parameters
string
required
Basin name.
Response
object
Default stream configuration.
Show StreamConfig
Show StreamConfig
string
Storage class for recent writes.
standard- Append tail latency under 400 millisecondsexpress- Append tail latency under 40 milliseconds
object
Retention policy for the stream.
{"age": <seconds>}- Age in seconds for automatic trimming{"infinite": {}}- Retain records unless explicitly trimmed
object
Timestamping behavior.
Show TimestampingConfig
Show TimestampingConfig
string
Timestamping mode:
client-prefer- Prefer client-specified timestamp if present otherwise use arrival timeclient-require- Require a client-specified timestamparrival- Use arrival time and ignore client-specified timestamp
boolean
Allow client-specified timestamps to exceed the arrival time.
boolean
Create stream on append if it doesn’t exist.
boolean
Create stream on read if it doesn’t exist.
Example
curl -X GET "https://aws.s2.dev/v1/basins/my-basin" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN"
Response
{
"default_stream_config": {
"storage_class": "standard",
"retention_policy": {"age": 604800},
"timestamping": {
"mode": "client-prefer",
"uncapped": false
},
"delete_on_empty": {
"min_age_secs": 0
}
},
"create_stream_on_append": true,
"create_stream_on_read": false
}
Error Responses
404 Not Found- Basin does not exist400 Bad Request- Invalid basin name403 Forbidden- Insufficient permissions408 Request Timeout- Request timed out