Creates an RDB export schedule (a CronJob)
curl --request POST \
--url http://localhost:3001/api/clusters/{clusterName}/transfers/schedules \
--header 'Content-Type: application/json' \
--cookie token= \
--data '
{
"schedule": "<string>",
"name": "<string>",
"enabled": true,
"retention": 50,
"repository": "<string>",
"node": "replica",
"filters": {
"databases": [
7
],
"keyPatterns": [
"<string>"
]
},
"resources": {
"cpu": "<string>",
"memory": "<string>"
}
}
'import requests
url = "http://localhost:3001/api/clusters/{clusterName}/transfers/schedules"
payload = {
"schedule": "<string>",
"name": "<string>",
"enabled": True,
"retention": 50,
"repository": "<string>",
"node": "replica",
"filters": {
"databases": [7],
"keyPatterns": ["<string>"]
},
"resources": {
"cpu": "<string>",
"memory": "<string>"
}
}
headers = {
"cookie": "token=",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {cookie: 'token=', 'Content-Type': 'application/json'},
body: JSON.stringify({
schedule: '<string>',
name: '<string>',
enabled: true,
retention: 50,
repository: '<string>',
node: 'replica',
filters: {databases: [7], keyPatterns: ['<string>']},
resources: {cpu: '<string>', memory: '<string>'}
})
};
fetch('http://localhost:3001/api/clusters/{clusterName}/transfers/schedules', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_PORT => "3001",
CURLOPT_URL => "http://localhost:3001/api/clusters/{clusterName}/transfers/schedules",
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([
'schedule' => '<string>',
'name' => '<string>',
'enabled' => true,
'retention' => 50,
'repository' => '<string>',
'node' => 'replica',
'filters' => [
'databases' => [
7
],
'keyPatterns' => [
'<string>'
]
],
'resources' => [
'cpu' => '<string>',
'memory' => '<string>'
]
]),
CURLOPT_COOKIE => "token=",
CURLOPT_HTTPHEADER => [
"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 := "http://localhost:3001/api/clusters/{clusterName}/transfers/schedules"
payload := strings.NewReader("{\n \"schedule\": \"<string>\",\n \"name\": \"<string>\",\n \"enabled\": true,\n \"retention\": 50,\n \"repository\": \"<string>\",\n \"node\": \"replica\",\n \"filters\": {\n \"databases\": [\n 7\n ],\n \"keyPatterns\": [\n \"<string>\"\n ]\n },\n \"resources\": {\n \"cpu\": \"<string>\",\n \"memory\": \"<string>\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("cookie", "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("http://localhost:3001/api/clusters/{clusterName}/transfers/schedules")
.header("cookie", "token=")
.header("Content-Type", "application/json")
.body("{\n \"schedule\": \"<string>\",\n \"name\": \"<string>\",\n \"enabled\": true,\n \"retention\": 50,\n \"repository\": \"<string>\",\n \"node\": \"replica\",\n \"filters\": {\n \"databases\": [\n 7\n ],\n \"keyPatterns\": [\n \"<string>\"\n ]\n },\n \"resources\": {\n \"cpu\": \"<string>\",\n \"memory\": \"<string>\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("http://localhost:3001/api/clusters/{clusterName}/transfers/schedules")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Post.new(url)
request["cookie"] = 'token='
request["Content-Type"] = 'application/json'
request.body = "{\n \"schedule\": \"<string>\",\n \"name\": \"<string>\",\n \"enabled\": true,\n \"retention\": 50,\n \"repository\": \"<string>\",\n \"node\": \"replica\",\n \"filters\": {\n \"databases\": [\n 7\n ],\n \"keyPatterns\": [\n \"<string>\"\n ]\n },\n \"resources\": {\n \"cpu\": \"<string>\",\n \"memory\": \"<string>\"\n }\n}"
response = http.request(request)
puts response.read_body{
"name": "<string>",
"namespace": "<string>",
"clusterName": "<string>",
"schedule": "<string>",
"enabled": true,
"retention": 123,
"repository": "<string>",
"node": "replica",
"createdAt": "<string>",
"filters": {
"databases": [
7
],
"keyPatterns": [
"<string>"
]
},
"createdBy": "<string>",
"lastScheduleTime": "<string>",
"lastSuccessfulTime": "<string>"
}{
"error": "<string>",
"statusCode": 123,
"message": "<string>"
}{
"error": "<string>",
"statusCode": 123,
"message": "<string>"
}{
"error": "<string>",
"statusCode": 123,
"message": "<string>"
}{
"error": "<string>",
"statusCode": 123,
"message": "<string>"
}RDB Transfers
Creates an RDB export schedule (a CronJob)
Creates an RDB export schedule (a CronJob). Each run writes a new export; once a run succeeds, all but the newest retention exports of the schedule are deleted.
POST
/
api
/
clusters
/
{clusterName}
/
transfers
/
schedules
Creates an RDB export schedule (a CronJob)
curl --request POST \
--url http://localhost:3001/api/clusters/{clusterName}/transfers/schedules \
--header 'Content-Type: application/json' \
--cookie token= \
--data '
{
"schedule": "<string>",
"name": "<string>",
"enabled": true,
"retention": 50,
"repository": "<string>",
"node": "replica",
"filters": {
"databases": [
7
],
"keyPatterns": [
"<string>"
]
},
"resources": {
"cpu": "<string>",
"memory": "<string>"
}
}
'import requests
url = "http://localhost:3001/api/clusters/{clusterName}/transfers/schedules"
payload = {
"schedule": "<string>",
"name": "<string>",
"enabled": True,
"retention": 50,
"repository": "<string>",
"node": "replica",
"filters": {
"databases": [7],
"keyPatterns": ["<string>"]
},
"resources": {
"cpu": "<string>",
"memory": "<string>"
}
}
headers = {
"cookie": "token=",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {cookie: 'token=', 'Content-Type': 'application/json'},
body: JSON.stringify({
schedule: '<string>',
name: '<string>',
enabled: true,
retention: 50,
repository: '<string>',
node: 'replica',
filters: {databases: [7], keyPatterns: ['<string>']},
resources: {cpu: '<string>', memory: '<string>'}
})
};
fetch('http://localhost:3001/api/clusters/{clusterName}/transfers/schedules', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_PORT => "3001",
CURLOPT_URL => "http://localhost:3001/api/clusters/{clusterName}/transfers/schedules",
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([
'schedule' => '<string>',
'name' => '<string>',
'enabled' => true,
'retention' => 50,
'repository' => '<string>',
'node' => 'replica',
'filters' => [
'databases' => [
7
],
'keyPatterns' => [
'<string>'
]
],
'resources' => [
'cpu' => '<string>',
'memory' => '<string>'
]
]),
CURLOPT_COOKIE => "token=",
CURLOPT_HTTPHEADER => [
"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 := "http://localhost:3001/api/clusters/{clusterName}/transfers/schedules"
payload := strings.NewReader("{\n \"schedule\": \"<string>\",\n \"name\": \"<string>\",\n \"enabled\": true,\n \"retention\": 50,\n \"repository\": \"<string>\",\n \"node\": \"replica\",\n \"filters\": {\n \"databases\": [\n 7\n ],\n \"keyPatterns\": [\n \"<string>\"\n ]\n },\n \"resources\": {\n \"cpu\": \"<string>\",\n \"memory\": \"<string>\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("cookie", "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("http://localhost:3001/api/clusters/{clusterName}/transfers/schedules")
.header("cookie", "token=")
.header("Content-Type", "application/json")
.body("{\n \"schedule\": \"<string>\",\n \"name\": \"<string>\",\n \"enabled\": true,\n \"retention\": 50,\n \"repository\": \"<string>\",\n \"node\": \"replica\",\n \"filters\": {\n \"databases\": [\n 7\n ],\n \"keyPatterns\": [\n \"<string>\"\n ]\n },\n \"resources\": {\n \"cpu\": \"<string>\",\n \"memory\": \"<string>\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("http://localhost:3001/api/clusters/{clusterName}/transfers/schedules")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Post.new(url)
request["cookie"] = 'token='
request["Content-Type"] = 'application/json'
request.body = "{\n \"schedule\": \"<string>\",\n \"name\": \"<string>\",\n \"enabled\": true,\n \"retention\": 50,\n \"repository\": \"<string>\",\n \"node\": \"replica\",\n \"filters\": {\n \"databases\": [\n 7\n ],\n \"keyPatterns\": [\n \"<string>\"\n ]\n },\n \"resources\": {\n \"cpu\": \"<string>\",\n \"memory\": \"<string>\"\n }\n}"
response = http.request(request)
puts response.read_body{
"name": "<string>",
"namespace": "<string>",
"clusterName": "<string>",
"schedule": "<string>",
"enabled": true,
"retention": 123,
"repository": "<string>",
"node": "replica",
"createdAt": "<string>",
"filters": {
"databases": [
7
],
"keyPatterns": [
"<string>"
]
},
"createdBy": "<string>",
"lastScheduleTime": "<string>",
"lastSuccessfulTime": "<string>"
}{
"error": "<string>",
"statusCode": 123,
"message": "<string>"
}{
"error": "<string>",
"statusCode": 123,
"message": "<string>"
}{
"error": "<string>",
"statusCode": 123,
"message": "<string>"
}{
"error": "<string>",
"statusCode": 123,
"message": "<string>"
}Authorizations
JWT token stored in HTTP-only cookie
Path Parameters
Query Parameters
Minimum string length:
1Body
application/json
Required string length:
9 - 128Generated when omitted
Pattern:
^[a-z0-9]([-a-z0-9]{0,30}[a-z0-9])?$Required range:
1 <= x <= 100Minimum string length:
1Read from a replica when the shard has one (default), or always from the primary.
Available options:
replica Show child attributes
Show child attributes
Show child attributes
Show child attributes
Response
Default Response
Read from a replica when the shard has one (default), or always from the primary.
Available options:
replica Show child attributes
Show child attributes
Was this page helpful?