cURL
curl --request POST \
--url https://app.teable.ai/api/base/duplicate-stream \
--header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
--header 'content-type: application/json' \
--data '{"fromBaseId":"string","spaceId":"string","withRecords":true,"name":"string","baseId":"string","nodes":["string"],"shareId":"string","timeZone":"string"}'const url = 'https://app.teable.ai/api/base/duplicate-stream';
const options = {
method: 'POST',
headers: {
Authorization: 'Bearer REPLACE_BEARER_TOKEN',
'content-type': 'application/json'
},
body: '{"fromBaseId":"string","spaceId":"string","withRecords":true,"name":"string","baseId":"string","nodes":["string"],"shareId":"string","timeZone":"string"}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}const http = require('https');
const options = {
method: 'POST',
hostname: 'app.teable.ai',
port: null,
path: '/api/base/duplicate-stream',
headers: {
Authorization: 'Bearer REPLACE_BEARER_TOKEN',
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
fromBaseId: 'string',
spaceId: 'string',
withRecords: true,
name: 'string',
baseId: 'string',
nodes: ['string'],
shareId: 'string',
timeZone: 'string'
}));
req.end();import http.client
conn = http.client.HTTPSConnection("app.teable.ai")
payload = "{\"fromBaseId\":\"string\",\"spaceId\":\"string\",\"withRecords\":true,\"name\":\"string\",\"baseId\":\"string\",\"nodes\":[\"string\"],\"shareId\":\"string\",\"timeZone\":\"string\"}"
headers = {
'Authorization': "Bearer REPLACE_BEARER_TOKEN",
'content-type': "application/json"
}
conn.request("POST", "/api/base/duplicate-stream", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://app.teable.ai/api/base/duplicate-stream",
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([
'fromBaseId' => '<string>',
'spaceId' => '<string>',
'withRecords' => true,
'name' => '<string>',
'baseId' => '<string>',
'nodes' => [
'<string>'
],
'shareId' => '<string>',
'timeZone' => '<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://app.teable.ai/api/base/duplicate-stream"
payload := strings.NewReader("{\n \"fromBaseId\": \"<string>\",\n \"spaceId\": \"<string>\",\n \"withRecords\": true,\n \"name\": \"<string>\",\n \"baseId\": \"<string>\",\n \"nodes\": [\n \"<string>\"\n ],\n \"shareId\": \"<string>\",\n \"timeZone\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", 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.post("https://app.teable.ai/api/base/duplicate-stream")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"fromBaseId\": \"<string>\",\n \"spaceId\": \"<string>\",\n \"withRecords\": true,\n \"name\": \"<string>\",\n \"baseId\": \"<string>\",\n \"nodes\": [\n \"<string>\"\n ],\n \"shareId\": \"<string>\",\n \"timeZone\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.teable.ai/api/base/duplicate-stream")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"fromBaseId\": \"<string>\",\n \"spaceId\": \"<string>\",\n \"withRecords\": true,\n \"name\": \"<string>\",\n \"baseId\": \"<string>\",\n \"nodes\": [\n \"<string>\"\n ],\n \"shareId\": \"<string>\",\n \"timeZone\": \"<string>\"\n}"
response = http.request(request)
puts response.read_bodyproject
Duplicate project with progress
Duplicate a project and receive progress updates and the final result through server-sent events.
POST
/
base
/
duplicate-stream
cURL
curl --request POST \
--url https://app.teable.ai/api/base/duplicate-stream \
--header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
--header 'content-type: application/json' \
--data '{"fromBaseId":"string","spaceId":"string","withRecords":true,"name":"string","baseId":"string","nodes":["string"],"shareId":"string","timeZone":"string"}'const url = 'https://app.teable.ai/api/base/duplicate-stream';
const options = {
method: 'POST',
headers: {
Authorization: 'Bearer REPLACE_BEARER_TOKEN',
'content-type': 'application/json'
},
body: '{"fromBaseId":"string","spaceId":"string","withRecords":true,"name":"string","baseId":"string","nodes":["string"],"shareId":"string","timeZone":"string"}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}const http = require('https');
const options = {
method: 'POST',
hostname: 'app.teable.ai',
port: null,
path: '/api/base/duplicate-stream',
headers: {
Authorization: 'Bearer REPLACE_BEARER_TOKEN',
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
fromBaseId: 'string',
spaceId: 'string',
withRecords: true,
name: 'string',
baseId: 'string',
nodes: ['string'],
shareId: 'string',
timeZone: 'string'
}));
req.end();import http.client
conn = http.client.HTTPSConnection("app.teable.ai")
payload = "{\"fromBaseId\":\"string\",\"spaceId\":\"string\",\"withRecords\":true,\"name\":\"string\",\"baseId\":\"string\",\"nodes\":[\"string\"],\"shareId\":\"string\",\"timeZone\":\"string\"}"
headers = {
'Authorization': "Bearer REPLACE_BEARER_TOKEN",
'content-type': "application/json"
}
conn.request("POST", "/api/base/duplicate-stream", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://app.teable.ai/api/base/duplicate-stream",
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([
'fromBaseId' => '<string>',
'spaceId' => '<string>',
'withRecords' => true,
'name' => '<string>',
'baseId' => '<string>',
'nodes' => [
'<string>'
],
'shareId' => '<string>',
'timeZone' => '<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://app.teable.ai/api/base/duplicate-stream"
payload := strings.NewReader("{\n \"fromBaseId\": \"<string>\",\n \"spaceId\": \"<string>\",\n \"withRecords\": true,\n \"name\": \"<string>\",\n \"baseId\": \"<string>\",\n \"nodes\": [\n \"<string>\"\n ],\n \"shareId\": \"<string>\",\n \"timeZone\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", 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.post("https://app.teable.ai/api/base/duplicate-stream")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"fromBaseId\": \"<string>\",\n \"spaceId\": \"<string>\",\n \"withRecords\": true,\n \"name\": \"<string>\",\n \"baseId\": \"<string>\",\n \"nodes\": [\n \"<string>\"\n ],\n \"shareId\": \"<string>\",\n \"timeZone\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.teable.ai/api/base/duplicate-stream")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"fromBaseId\": \"<string>\",\n \"spaceId\": \"<string>\",\n \"withRecords\": true,\n \"name\": \"<string>\",\n \"baseId\": \"<string>\",\n \"nodes\": [\n \"<string>\"\n ],\n \"shareId\": \"<string>\",\n \"timeZone\": \"<string>\"\n}"
response = http.request(request)
puts response.read_bodyالتفويضات
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
الجسم
application/json
The project to duplicate
The space to duplicate the project to
Whether to duplicate the records
The name of the duplicated project
The node IDs to include in the duplication
The share ID when duplicating from a shared project. If provided, will use share permissions instead of base|update permission.
The IANA time zone to adapt date-related field options (and date filters) to during duplication. Mainly used when applying a template so dates follow the current user environment.
الاستجابة
201
SSE stream with progress events and final duplicated project.
آخر تعديل في ١٥ سبتمبر ٢٠٢٦
هل كانت هذه الصفحة مفيدة؟

