Clone database.
ROLES: RESOURCE_ADMIN USER: true SERVICE ACCOUNT: true
curl --request POST \
--url https://api.revoengine.com/api/v1/databases/{databaseId}/clone \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"metadata": {},
"audit": true,
"name": "<string>",
"suffix": "<string>",
"includeItems": true,
"includeData": true,
"includePartitions": true,
"category": "<string>",
"desc": "<string>",
"tags": [
"<string>"
],
"restricted": true,
"groups": [
"<string>"
],
"users": [
"<string>"
]
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
metadata: {},
audit: true,
name: '<string>',
suffix: '<string>',
includeItems: true,
includeData: true,
includePartitions: true,
category: '<string>',
desc: '<string>',
tags: ['<string>'],
restricted: true,
groups: ['<string>'],
users: ['<string>']
})
};
fetch('https://api.revoengine.com/api/v1/databases/{databaseId}/clone', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.revoengine.com/api/v1/databases/{databaseId}/clone"
payload = {
"metadata": {},
"audit": True,
"name": "<string>",
"suffix": "<string>",
"includeItems": True,
"includeData": True,
"includePartitions": True,
"category": "<string>",
"desc": "<string>",
"tags": ["<string>"],
"restricted": True,
"groups": ["<string>"],
"users": ["<string>"]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"accepted": true,
"databaseId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"sourceDatabaseId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"cloneId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"includeItems": true,
"includePartitions": true,
"audit": true,
"message": "<string>"
}Authorizations
Bearer JWT token or API Key (sk-*).
Path Parameters
Provide databaseId.
Body
Replacement user metadata for the root clone only. Omit to inherit source metadata; pass {} to clear user metadata. Maximum 16 KiB and 64 top-level keys. Keys starting with "__" are reserved for backend use.
Optional audit override. Defaults to the source logical table setting.
Optional target root database name. Defaults to the source database name with "_Clone" suffix.
1 - 60Suffix used for automatically generated clone names. Defaults to "Clone".
1 - 30Whether to copy existing rows/items into the clone. Defaults to false.
Alias for includeItems. Defaults to false.
Whether to clone connected table partitions. Defaults to true.
Optional cloned database category override.
30Optional cloned database description override.
1000Optional cloned database tags override.
Optional cloned database restricted flag override.
Optional cloned database group access override.
Optional cloned database user access override.
Response
Resolved audit setting applied to the cloned logical table.
curl --request POST \
--url https://api.revoengine.com/api/v1/databases/{databaseId}/clone \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"metadata": {},
"audit": true,
"name": "<string>",
"suffix": "<string>",
"includeItems": true,
"includeData": true,
"includePartitions": true,
"category": "<string>",
"desc": "<string>",
"tags": [
"<string>"
],
"restricted": true,
"groups": [
"<string>"
],
"users": [
"<string>"
]
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
metadata: {},
audit: true,
name: '<string>',
suffix: '<string>',
includeItems: true,
includeData: true,
includePartitions: true,
category: '<string>',
desc: '<string>',
tags: ['<string>'],
restricted: true,
groups: ['<string>'],
users: ['<string>']
})
};
fetch('https://api.revoengine.com/api/v1/databases/{databaseId}/clone', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.revoengine.com/api/v1/databases/{databaseId}/clone"
payload = {
"metadata": {},
"audit": True,
"name": "<string>",
"suffix": "<string>",
"includeItems": True,
"includeData": True,
"includePartitions": True,
"category": "<string>",
"desc": "<string>",
"tags": ["<string>"],
"restricted": True,
"groups": ["<string>"],
"users": ["<string>"]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"accepted": true,
"databaseId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"sourceDatabaseId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"cloneId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"includeItems": true,
"includePartitions": true,
"audit": true,
"message": "<string>"
}
