Refresh tables
curl --request POST \
--url https://api.sequinstream.com/api/postgres_databases/{id_or_name}/refresh_tables \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.sequinstream.com/api/postgres_databases/{id_or_name}/refresh_tables"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.sequinstream.com/api/postgres_databases/{id_or_name}/refresh_tables', 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.sequinstream.com/api/postgres_databases/{id_or_name}/refresh_tables",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$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.sequinstream.com/api/postgres_databases/{id_or_name}/refresh_tables"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.sequinstream.com/api/postgres_databases/{id_or_name}/refresh_tables")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sequinstream.com/api/postgres_databases/{id_or_name}/refresh_tables")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"success": true
}
{
"success": false
}
{
"errors": {
"detail": "Postgres Database not found"
}
}
Postgres databases
Refresh tables
Synchronously refresh Sequin’s cache of all of a Postgres database’s tables.
POST
/
postgres_databases
/
{id_or_name}
/
refresh_tables
Refresh tables
curl --request POST \
--url https://api.sequinstream.com/api/postgres_databases/{id_or_name}/refresh_tables \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.sequinstream.com/api/postgres_databases/{id_or_name}/refresh_tables"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.sequinstream.com/api/postgres_databases/{id_or_name}/refresh_tables', 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.sequinstream.com/api/postgres_databases/{id_or_name}/refresh_tables",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$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.sequinstream.com/api/postgres_databases/{id_or_name}/refresh_tables"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.sequinstream.com/api/postgres_databases/{id_or_name}/refresh_tables")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sequinstream.com/api/postgres_databases/{id_or_name}/refresh_tables")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"success": true
}
{
"success": false
}
{
"errors": {
"detail": "Postgres Database not found"
}
}
Sequin is able to detect schema changes right away. Use this endpoint only if you want to eliminate race conditions.For example, in test you might want to add a table to your source database and then make an immediate call to setup a sink with that table. It could be a good idea to call this endpoint after creating the table to ensure the table has propagated to Sequin.
Path parameters
The ID or name of the Postgres database connection.
Example request
curl
curl -X POST 'https://api.sequinstream.com/api/postgres_databases/production_rds/refresh_tables' \
-H 'Authorization: Bearer YOUR_API_KEY' \
-H 'Content-Type: application/json'
Response
Indicates whether the table refresh operation was successful (
true) or failed (false).{
"success": true
}
{
"success": false
}
{
"errors": {
"detail": "Postgres Database not found"
}
}
⌘I

