curl --request PATCH \
--url https://api.example.com/v1/connections/data/{connection_id}/snapshot-config \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"snapshot_config": {},
"if_match_updated_at": "<string>"
}
'import requests
url = "https://api.example.com/v1/connections/data/{connection_id}/snapshot-config"
payload = {
"snapshot_config": {},
"if_match_updated_at": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({snapshot_config: {}, if_match_updated_at: '<string>'})
};
fetch('https://api.example.com/v1/connections/data/{connection_id}/snapshot-config', 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/v1/connections/data/{connection_id}/snapshot-config",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'snapshot_config' => [
],
'if_match_updated_at' => '<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://api.example.com/v1/connections/data/{connection_id}/snapshot-config"
payload := strings.NewReader("{\n \"snapshot_config\": {},\n \"if_match_updated_at\": \"<string>\"\n}")
req, _ := http.NewRequest("PATCH", 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.patch("https://api.example.com/v1/connections/data/{connection_id}/snapshot-config")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"snapshot_config\": {},\n \"if_match_updated_at\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/v1/connections/data/{connection_id}/snapshot-config")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"snapshot_config\": {},\n \"if_match_updated_at\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"code": "<string>",
"request_id": "<string>"
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"code": "<string>",
"request_id": "<string>"
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"code": "<string>",
"request_id": "<string>"
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"code": "<string>",
"request_id": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"code": "<string>",
"request_id": "<string>"
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"code": "<string>",
"request_id": "<string>"
}Update connection snapshot policy
Replace a connection’s snapshot policy without touching its settings or secrets.
Destructive — requires confirm=true and write scope. The replaced policy is
not kept, and an applied replacement cannot be undone through this API.
Send if_match_updated_at carrying the connection’s current updatedAt (from
GET /v1/connections/data/{connection_id}) and the write is refused with 412 if the
connection changed since. Because this replaces the policy in full, two callers working
from the same read would otherwise leave only the last writer’s policy standing, with no
sign the other was discarded. Optional so that a caller predating the field still works.
Same snapshot_config object the connection PATCH takes, and it replaces the
stored policy in full: read the current one back from the connection and send the
merged object, because omitted keys are cleared. The one exception matches the
connection PATCH — on an HTTP connection, omitting http_replication preserves
the stored one, so a caller that does not round-trip it cannot erase it; send it to
replace it, or null to clear it.
For an HTTP/REST connection this is what turns raw API responses into flat, typed
tables: each http_replication resource names a request_path, the
pagination.data_pointer that locates the row array, the pagination mode, and the
json_string_fields whose nested objects and arrays must land as JSON strings
rather than break schema inference. Without it a dataset snapshots as one envelope
row per response page, with the payload in a content column.
curl --request PATCH \
--url https://api.example.com/v1/connections/data/{connection_id}/snapshot-config \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"snapshot_config": {},
"if_match_updated_at": "<string>"
}
'import requests
url = "https://api.example.com/v1/connections/data/{connection_id}/snapshot-config"
payload = {
"snapshot_config": {},
"if_match_updated_at": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({snapshot_config: {}, if_match_updated_at: '<string>'})
};
fetch('https://api.example.com/v1/connections/data/{connection_id}/snapshot-config', 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/v1/connections/data/{connection_id}/snapshot-config",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'snapshot_config' => [
],
'if_match_updated_at' => '<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://api.example.com/v1/connections/data/{connection_id}/snapshot-config"
payload := strings.NewReader("{\n \"snapshot_config\": {},\n \"if_match_updated_at\": \"<string>\"\n}")
req, _ := http.NewRequest("PATCH", 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.patch("https://api.example.com/v1/connections/data/{connection_id}/snapshot-config")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"snapshot_config\": {},\n \"if_match_updated_at\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/v1/connections/data/{connection_id}/snapshot-config")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"snapshot_config\": {},\n \"if_match_updated_at\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"code": "<string>",
"request_id": "<string>"
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"code": "<string>",
"request_id": "<string>"
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"code": "<string>",
"request_id": "<string>"
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"code": "<string>",
"request_id": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"code": "<string>",
"request_id": "<string>"
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"code": "<string>",
"request_id": "<string>"
}Authorizations
Query Parameters
Body
Snapshot policy on its own, with no field that can carry a credential.
The combined connection PATCH accepts secrets, so it is withheld from the
agent surface — which also withheld the snapshot policy, the one part of a
connection an agent must be able to author (an HTTP/REST connection produces
flat, typed tables only once http_replication names each resource's path,
data pointer, pagination and nested JSON fields). This route carries that
policy alone, so it is safe to expose.
Response
Successful Response