Create a new project by copying an existing project and providing optional overrides.
Create a new project by copying an existing project and providing optional overrides. Specify a git repository to link to the copied project or copy the original project’s git repository for the copied project.
curl --request POST \
--url https://mycluster.domino.tech/api/projects/v1/projects/{projectId}/copy-project \
--header 'Content-Type: application/json' \
--header 'X-Domino-Api-Key: <api-key>' \
--data '
{
"copyDatasets": true,
"copyNetAppVolumes": true,
"importedGitReposCredentialId": "<string>",
"name": "<string>",
"ownerId": "<string>"
}
'import requests
url = "https://mycluster.domino.tech/api/projects/v1/projects/{projectId}/copy-project"
payload = {
"copyDatasets": True,
"copyNetAppVolumes": True,
"importedGitReposCredentialId": "<string>",
"name": "<string>",
"ownerId": "<string>"
}
headers = {
"X-Domino-Api-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-Domino-Api-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
copyDatasets: true,
copyNetAppVolumes: true,
importedGitReposCredentialId: '<string>',
name: '<string>',
ownerId: '<string>'
})
};
fetch('https://mycluster.domino.tech/api/projects/v1/projects/{projectId}/copy-project', 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://mycluster.domino.tech/api/projects/v1/projects/{projectId}/copy-project",
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([
'copyDatasets' => true,
'copyNetAppVolumes' => true,
'importedGitReposCredentialId' => '<string>',
'name' => '<string>',
'ownerId' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-Domino-Api-Key: <api-key>"
],
]);
$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://mycluster.domino.tech/api/projects/v1/projects/{projectId}/copy-project"
payload := strings.NewReader("{\n \"copyDatasets\": true,\n \"copyNetAppVolumes\": true,\n \"importedGitReposCredentialId\": \"<string>\",\n \"name\": \"<string>\",\n \"ownerId\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-Domino-Api-Key", "<api-key>")
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://mycluster.domino.tech/api/projects/v1/projects/{projectId}/copy-project")
.header("X-Domino-Api-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"copyDatasets\": true,\n \"copyNetAppVolumes\": true,\n \"importedGitReposCredentialId\": \"<string>\",\n \"name\": \"<string>\",\n \"ownerId\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://mycluster.domino.tech/api/projects/v1/projects/{projectId}/copy-project")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-Domino-Api-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"copyDatasets\": true,\n \"copyNetAppVolumes\": true,\n \"importedGitReposCredentialId\": \"<string>\",\n \"name\": \"<string>\",\n \"ownerId\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"metadata": {
"notices": [
"<string>"
],
"requestId": "<string>"
},
"project": {
"collaborators": [
{
"id": "662604702b7e5d347dbe7a908",
"role": "contributor"
}
],
"description": "<string>",
"id": "626046fcb7e5d347dbe7a904",
"isRestricted": true,
"name": "My Project",
"ownerId": "662604702b7e5d347dbe7a908",
"ownerUsername": "steve_holt",
"visibility": "public",
"billingTag": {
"tag": "<string>"
},
"internalTags": [
"restricted"
],
"mainRepository": {
"defaultRef": {
"refType": "head",
"value": "<string>"
},
"id": "62604702b7e5d347dbe7a908",
"serviceProvider": "bitbucket",
"uri": "https://github.com/torvalds/linux",
"name": "<string>"
}
},
"datasetsNotCopied": [
{
"datasetInfo": {
"createdAt": "2022-03-12T02:13:44.467Z",
"id": "62313ce67a0af0281c01a6a5",
"name": "My Dataset",
"description": "<string>",
"projectId": "62313ce67a0af0281c01a6a5"
},
"errorMessage": "<string>"
}
],
"netAppVolumesNotCopied": [
{
"errorMessage": "<string>",
"volumeInfo": {
"id": "06cd6820-3226-4d41-99b2-14ec51e38771",
"name": "My NetApp Volume",
"createdAt": "2022-03-12T02:13:44.467Z",
"description": "<string>"
}
}
]
}{
"error": "<string>"
}{
"code": "UNAUTHORIZED",
"message": "Authentication is required to access this resource."
}{
"code": "FORBIDDEN",
"message": "You do not have permission to perform this action."
}{
"error": "<string>"
}{
"errors": [
"<string>"
],
"requestId": "bbd78579-93c4-45ee-a983-0d5c8da6d5b1"
}{
"error": "<string>"
}Authorizations
Path Parameters
Project ID
Body
Information needed in order to copy a project.
Whether to copy the Project's Datasets or not
Billing Tag to assign to projects for cost aggregation
Show child attributes
Show child attributes
Whether to copy the Project's NetApp Volumes or not
Details needed in order to copy the code repository of a Git-backed project.
Show child attributes
Show child attributes
The Domino ID of the PAT credential, which will be used to access the Imported Git Repos on the new project.
The name of the new Domino Project.
The Domino ID of owner of the copied project.
The visibility of the new Project.
public, searchable, private Was this page helpful?
curl --request POST \
--url https://mycluster.domino.tech/api/projects/v1/projects/{projectId}/copy-project \
--header 'Content-Type: application/json' \
--header 'X-Domino-Api-Key: <api-key>' \
--data '
{
"copyDatasets": true,
"copyNetAppVolumes": true,
"importedGitReposCredentialId": "<string>",
"name": "<string>",
"ownerId": "<string>"
}
'import requests
url = "https://mycluster.domino.tech/api/projects/v1/projects/{projectId}/copy-project"
payload = {
"copyDatasets": True,
"copyNetAppVolumes": True,
"importedGitReposCredentialId": "<string>",
"name": "<string>",
"ownerId": "<string>"
}
headers = {
"X-Domino-Api-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-Domino-Api-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
copyDatasets: true,
copyNetAppVolumes: true,
importedGitReposCredentialId: '<string>',
name: '<string>',
ownerId: '<string>'
})
};
fetch('https://mycluster.domino.tech/api/projects/v1/projects/{projectId}/copy-project', 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://mycluster.domino.tech/api/projects/v1/projects/{projectId}/copy-project",
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([
'copyDatasets' => true,
'copyNetAppVolumes' => true,
'importedGitReposCredentialId' => '<string>',
'name' => '<string>',
'ownerId' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-Domino-Api-Key: <api-key>"
],
]);
$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://mycluster.domino.tech/api/projects/v1/projects/{projectId}/copy-project"
payload := strings.NewReader("{\n \"copyDatasets\": true,\n \"copyNetAppVolumes\": true,\n \"importedGitReposCredentialId\": \"<string>\",\n \"name\": \"<string>\",\n \"ownerId\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-Domino-Api-Key", "<api-key>")
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://mycluster.domino.tech/api/projects/v1/projects/{projectId}/copy-project")
.header("X-Domino-Api-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"copyDatasets\": true,\n \"copyNetAppVolumes\": true,\n \"importedGitReposCredentialId\": \"<string>\",\n \"name\": \"<string>\",\n \"ownerId\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://mycluster.domino.tech/api/projects/v1/projects/{projectId}/copy-project")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-Domino-Api-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"copyDatasets\": true,\n \"copyNetAppVolumes\": true,\n \"importedGitReposCredentialId\": \"<string>\",\n \"name\": \"<string>\",\n \"ownerId\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"metadata": {
"notices": [
"<string>"
],
"requestId": "<string>"
},
"project": {
"collaborators": [
{
"id": "662604702b7e5d347dbe7a908",
"role": "contributor"
}
],
"description": "<string>",
"id": "626046fcb7e5d347dbe7a904",
"isRestricted": true,
"name": "My Project",
"ownerId": "662604702b7e5d347dbe7a908",
"ownerUsername": "steve_holt",
"visibility": "public",
"billingTag": {
"tag": "<string>"
},
"internalTags": [
"restricted"
],
"mainRepository": {
"defaultRef": {
"refType": "head",
"value": "<string>"
},
"id": "62604702b7e5d347dbe7a908",
"serviceProvider": "bitbucket",
"uri": "https://github.com/torvalds/linux",
"name": "<string>"
}
},
"datasetsNotCopied": [
{
"datasetInfo": {
"createdAt": "2022-03-12T02:13:44.467Z",
"id": "62313ce67a0af0281c01a6a5",
"name": "My Dataset",
"description": "<string>",
"projectId": "62313ce67a0af0281c01a6a5"
},
"errorMessage": "<string>"
}
],
"netAppVolumesNotCopied": [
{
"errorMessage": "<string>",
"volumeInfo": {
"id": "06cd6820-3226-4d41-99b2-14ec51e38771",
"name": "My NetApp Volume",
"createdAt": "2022-03-12T02:13:44.467Z",
"description": "<string>"
}
}
]
}{
"error": "<string>"
}{
"code": "UNAUTHORIZED",
"message": "Authentication is required to access this resource."
}{
"code": "FORBIDDEN",
"message": "You do not have permission to perform this action."
}{
"error": "<string>"
}{
"errors": [
"<string>"
],
"requestId": "bbd78579-93c4-45ee-a983-0d5c8da6d5b1"
}{
"error": "<string>"
}