Starts an RDB import into this deployment, from an export, an .rdb file (or directory) in a backup repository, another deployment, or a redis:// address
curl --request POST \
--url http://localhost:3001/api/clusters/{clusterName}/transfers/imports \
--header 'Content-Type: application/json' \
--cookie token= \
--data '
{
"source": {
"type": "export",
"exportName": "<string>",
"namespace": "<string>",
"repository": "<string>",
"path": "<string>",
"repositoryNamespace": "<string>",
"deploymentName": "<string>",
"node": "replica",
"uri": "<string>",
"username": "<string>",
"password": "<string>",
"caCertificate": "<string>"
},
"mode": "merge",
"confirm": "<string>",
"filters": {
"databases": [
7
],
"keyPatterns": [
"<string>"
]
},
"rdbVersion": 9,
"rollback": "auto",
"snapshotRepository": "<string>",
"resources": {
"cpu": "<string>",
"memory": "<string>"
}
}
'import requests
url = "http://localhost:3001/api/clusters/{clusterName}/transfers/imports"
payload = {
"source": {
"type": "export",
"exportName": "<string>",
"namespace": "<string>",
"repository": "<string>",
"path": "<string>",
"repositoryNamespace": "<string>",
"deploymentName": "<string>",
"node": "replica",
"uri": "<string>",
"username": "<string>",
"password": "<string>",
"caCertificate": "<string>"
},
"mode": "merge",
"confirm": "<string>",
"filters": {
"databases": [7],
"keyPatterns": ["<string>"]
},
"rdbVersion": 9,
"rollback": "auto",
"snapshotRepository": "<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({
source: {
type: 'export',
exportName: '<string>',
namespace: '<string>',
repository: '<string>',
path: '<string>',
repositoryNamespace: '<string>',
deploymentName: '<string>',
node: 'replica',
uri: '<string>',
username: '<string>',
password: '<string>',
caCertificate: '<string>'
},
mode: 'merge',
confirm: '<string>',
filters: {databases: [7], keyPatterns: ['<string>']},
rdbVersion: 9,
rollback: 'auto',
snapshotRepository: '<string>',
resources: {cpu: '<string>', memory: '<string>'}
})
};
fetch('http://localhost:3001/api/clusters/{clusterName}/transfers/imports', 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/imports",
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([
'source' => [
'type' => 'export',
'exportName' => '<string>',
'namespace' => '<string>',
'repository' => '<string>',
'path' => '<string>',
'repositoryNamespace' => '<string>',
'deploymentName' => '<string>',
'node' => 'replica',
'uri' => '<string>',
'username' => '<string>',
'password' => '<string>',
'caCertificate' => '<string>'
],
'mode' => 'merge',
'confirm' => '<string>',
'filters' => [
'databases' => [
7
],
'keyPatterns' => [
'<string>'
]
],
'rdbVersion' => 9,
'rollback' => 'auto',
'snapshotRepository' => '<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/imports"
payload := strings.NewReader("{\n \"source\": {\n \"type\": \"export\",\n \"exportName\": \"<string>\",\n \"namespace\": \"<string>\",\n \"repository\": \"<string>\",\n \"path\": \"<string>\",\n \"repositoryNamespace\": \"<string>\",\n \"deploymentName\": \"<string>\",\n \"node\": \"replica\",\n \"uri\": \"<string>\",\n \"username\": \"<string>\",\n \"password\": \"<string>\",\n \"caCertificate\": \"<string>\"\n },\n \"mode\": \"merge\",\n \"confirm\": \"<string>\",\n \"filters\": {\n \"databases\": [\n 7\n ],\n \"keyPatterns\": [\n \"<string>\"\n ]\n },\n \"rdbVersion\": 9,\n \"rollback\": \"auto\",\n \"snapshotRepository\": \"<string>\",\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/imports")
.header("cookie", "token=")
.header("Content-Type", "application/json")
.body("{\n \"source\": {\n \"type\": \"export\",\n \"exportName\": \"<string>\",\n \"namespace\": \"<string>\",\n \"repository\": \"<string>\",\n \"path\": \"<string>\",\n \"repositoryNamespace\": \"<string>\",\n \"deploymentName\": \"<string>\",\n \"node\": \"replica\",\n \"uri\": \"<string>\",\n \"username\": \"<string>\",\n \"password\": \"<string>\",\n \"caCertificate\": \"<string>\"\n },\n \"mode\": \"merge\",\n \"confirm\": \"<string>\",\n \"filters\": {\n \"databases\": [\n 7\n ],\n \"keyPatterns\": [\n \"<string>\"\n ]\n },\n \"rdbVersion\": 9,\n \"rollback\": \"auto\",\n \"snapshotRepository\": \"<string>\",\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/imports")
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 \"source\": {\n \"type\": \"export\",\n \"exportName\": \"<string>\",\n \"namespace\": \"<string>\",\n \"repository\": \"<string>\",\n \"path\": \"<string>\",\n \"repositoryNamespace\": \"<string>\",\n \"deploymentName\": \"<string>\",\n \"node\": \"replica\",\n \"uri\": \"<string>\",\n \"username\": \"<string>\",\n \"password\": \"<string>\",\n \"caCertificate\": \"<string>\"\n },\n \"mode\": \"merge\",\n \"confirm\": \"<string>\",\n \"filters\": {\n \"databases\": [\n 7\n ],\n \"keyPatterns\": [\n \"<string>\"\n ]\n },\n \"rdbVersion\": 9,\n \"rollback\": \"auto\",\n \"snapshotRepository\": \"<string>\",\n \"resources\": {\n \"cpu\": \"<string>\",\n \"memory\": \"<string>\"\n }\n}"
response = http.request(request)
puts response.read_body{
"name": "<string>",
"namespace": "<string>",
"kind": "export",
"clusterName": "<string>",
"clusterNamespace": "<string>",
"phase": "Pending",
"createdAt": "<string>",
"startedAt": "<string>",
"completedAt": "<string>",
"createdBy": "<string>",
"scheduleName": "<string>",
"repository": "<string>",
"path": "<string>",
"node": "replica",
"mode": "merge",
"source": "<string>",
"sourceType": "export",
"files": [
{
"path": "<string>",
"shard": "<string>",
"sizeBytes": 123,
"keys": 123
}
],
"keysImported": 123,
"keysSkipped": 123,
"rollback": {
"mode": "auto",
"state": "pending",
"repository": "<string>",
"snapshotPath": "<string>",
"job": "<string>",
"message": "<string>"
},
"rollbackOf": "<string>",
"message": "<string>"
}{
"error": "<string>",
"statusCode": 123,
"message": "<string>"
}{
"error": "<string>",
"statusCode": 123,
"message": "<string>"
}{
"error": "<string>",
"statusCode": 123,
"message": "<string>"
}RDB Transfers
Starts an RDB import into this deployment, from an export, an .rdb file (or directory) in a backup repository, another deployment, or a redis:// address
Starts an RDB import into this deployment, from an export, an .rdb file (or directory) in a backup repository, another deployment, or a redis:// address. merge (default) keeps existing keys and refuses graphs that already exist; replace deletes every key first and needs confirm set to the deployment’s name.
POST
/
api
/
clusters
/
{clusterName}
/
transfers
/
imports
Starts an RDB import into this deployment, from an export, an .rdb file (or directory) in a backup repository, another deployment, or a redis:// address
curl --request POST \
--url http://localhost:3001/api/clusters/{clusterName}/transfers/imports \
--header 'Content-Type: application/json' \
--cookie token= \
--data '
{
"source": {
"type": "export",
"exportName": "<string>",
"namespace": "<string>",
"repository": "<string>",
"path": "<string>",
"repositoryNamespace": "<string>",
"deploymentName": "<string>",
"node": "replica",
"uri": "<string>",
"username": "<string>",
"password": "<string>",
"caCertificate": "<string>"
},
"mode": "merge",
"confirm": "<string>",
"filters": {
"databases": [
7
],
"keyPatterns": [
"<string>"
]
},
"rdbVersion": 9,
"rollback": "auto",
"snapshotRepository": "<string>",
"resources": {
"cpu": "<string>",
"memory": "<string>"
}
}
'import requests
url = "http://localhost:3001/api/clusters/{clusterName}/transfers/imports"
payload = {
"source": {
"type": "export",
"exportName": "<string>",
"namespace": "<string>",
"repository": "<string>",
"path": "<string>",
"repositoryNamespace": "<string>",
"deploymentName": "<string>",
"node": "replica",
"uri": "<string>",
"username": "<string>",
"password": "<string>",
"caCertificate": "<string>"
},
"mode": "merge",
"confirm": "<string>",
"filters": {
"databases": [7],
"keyPatterns": ["<string>"]
},
"rdbVersion": 9,
"rollback": "auto",
"snapshotRepository": "<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({
source: {
type: 'export',
exportName: '<string>',
namespace: '<string>',
repository: '<string>',
path: '<string>',
repositoryNamespace: '<string>',
deploymentName: '<string>',
node: 'replica',
uri: '<string>',
username: '<string>',
password: '<string>',
caCertificate: '<string>'
},
mode: 'merge',
confirm: '<string>',
filters: {databases: [7], keyPatterns: ['<string>']},
rdbVersion: 9,
rollback: 'auto',
snapshotRepository: '<string>',
resources: {cpu: '<string>', memory: '<string>'}
})
};
fetch('http://localhost:3001/api/clusters/{clusterName}/transfers/imports', 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/imports",
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([
'source' => [
'type' => 'export',
'exportName' => '<string>',
'namespace' => '<string>',
'repository' => '<string>',
'path' => '<string>',
'repositoryNamespace' => '<string>',
'deploymentName' => '<string>',
'node' => 'replica',
'uri' => '<string>',
'username' => '<string>',
'password' => '<string>',
'caCertificate' => '<string>'
],
'mode' => 'merge',
'confirm' => '<string>',
'filters' => [
'databases' => [
7
],
'keyPatterns' => [
'<string>'
]
],
'rdbVersion' => 9,
'rollback' => 'auto',
'snapshotRepository' => '<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/imports"
payload := strings.NewReader("{\n \"source\": {\n \"type\": \"export\",\n \"exportName\": \"<string>\",\n \"namespace\": \"<string>\",\n \"repository\": \"<string>\",\n \"path\": \"<string>\",\n \"repositoryNamespace\": \"<string>\",\n \"deploymentName\": \"<string>\",\n \"node\": \"replica\",\n \"uri\": \"<string>\",\n \"username\": \"<string>\",\n \"password\": \"<string>\",\n \"caCertificate\": \"<string>\"\n },\n \"mode\": \"merge\",\n \"confirm\": \"<string>\",\n \"filters\": {\n \"databases\": [\n 7\n ],\n \"keyPatterns\": [\n \"<string>\"\n ]\n },\n \"rdbVersion\": 9,\n \"rollback\": \"auto\",\n \"snapshotRepository\": \"<string>\",\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/imports")
.header("cookie", "token=")
.header("Content-Type", "application/json")
.body("{\n \"source\": {\n \"type\": \"export\",\n \"exportName\": \"<string>\",\n \"namespace\": \"<string>\",\n \"repository\": \"<string>\",\n \"path\": \"<string>\",\n \"repositoryNamespace\": \"<string>\",\n \"deploymentName\": \"<string>\",\n \"node\": \"replica\",\n \"uri\": \"<string>\",\n \"username\": \"<string>\",\n \"password\": \"<string>\",\n \"caCertificate\": \"<string>\"\n },\n \"mode\": \"merge\",\n \"confirm\": \"<string>\",\n \"filters\": {\n \"databases\": [\n 7\n ],\n \"keyPatterns\": [\n \"<string>\"\n ]\n },\n \"rdbVersion\": 9,\n \"rollback\": \"auto\",\n \"snapshotRepository\": \"<string>\",\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/imports")
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 \"source\": {\n \"type\": \"export\",\n \"exportName\": \"<string>\",\n \"namespace\": \"<string>\",\n \"repository\": \"<string>\",\n \"path\": \"<string>\",\n \"repositoryNamespace\": \"<string>\",\n \"deploymentName\": \"<string>\",\n \"node\": \"replica\",\n \"uri\": \"<string>\",\n \"username\": \"<string>\",\n \"password\": \"<string>\",\n \"caCertificate\": \"<string>\"\n },\n \"mode\": \"merge\",\n \"confirm\": \"<string>\",\n \"filters\": {\n \"databases\": [\n 7\n ],\n \"keyPatterns\": [\n \"<string>\"\n ]\n },\n \"rdbVersion\": 9,\n \"rollback\": \"auto\",\n \"snapshotRepository\": \"<string>\",\n \"resources\": {\n \"cpu\": \"<string>\",\n \"memory\": \"<string>\"\n }\n}"
response = http.request(request)
puts response.read_body{
"name": "<string>",
"namespace": "<string>",
"kind": "export",
"clusterName": "<string>",
"clusterNamespace": "<string>",
"phase": "Pending",
"createdAt": "<string>",
"startedAt": "<string>",
"completedAt": "<string>",
"createdBy": "<string>",
"scheduleName": "<string>",
"repository": "<string>",
"path": "<string>",
"node": "replica",
"mode": "merge",
"source": "<string>",
"sourceType": "export",
"files": [
{
"path": "<string>",
"shard": "<string>",
"sizeBytes": 123,
"keys": 123
}
],
"keysImported": 123,
"keysSkipped": 123,
"rollback": {
"mode": "auto",
"state": "pending",
"repository": "<string>",
"snapshotPath": "<string>",
"job": "<string>",
"message": "<string>"
},
"rollbackOf": "<string>",
"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
Show child attributes
Show child attributes
Available options:
merge Show child attributes
Show child attributes
Required range:
6 <= x <= 12Available options:
auto Minimum string length:
1Show child attributes
Show child attributes
Response
Default Response
Available options:
export phase
Option 1 · enum<string>Option 2 · enum<string>Option 3 · enum<string>Option 4 · enum<string>
required
Available options:
Pending Read from a replica when the shard has one (default), or always from the primary.
Available options:
replica Available options:
merge sourceType
Option 1 · enum<string>Option 2 · enum<string>Option 3 · enum<string>Option 4 · enum<string>
Available options:
export Show child attributes
Show child attributes
Show child attributes
Show child attributes
Was this page helpful?