Copy a space's structure
curl --request POST \
--url https://api.quiva.ai/workspaces/space/{space_id}/copy-structure \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"id": "<string>",
"staging": true
}
'import requests
url = "https://api.quiva.ai/workspaces/space/{space_id}/copy-structure"
payload = {
"name": "<string>",
"id": "<string>",
"staging": True
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({name: '<string>', id: '<string>', staging: true})
};
fetch('https://api.quiva.ai/workspaces/space/{space_id}/copy-structure', 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://api.quiva.ai/workspaces/space/{space_id}/copy-structure",
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([
'name' => '<string>',
'id' => '<string>',
'staging' => true
]),
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://api.quiva.ai/workspaces/space/{space_id}/copy-structure"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"id\": \"<string>\",\n \"staging\": true\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://api.quiva.ai/workspaces/space/{space_id}/copy-structure")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"id\": \"<string>\",\n \"staging\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.quiva.ai/workspaces/space/{space_id}/copy-structure")
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 \"name\": \"<string>\",\n \"id\": \"<string>\",\n \"staging\": true\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"url": "<string>",
"name": "<string>",
"description": "<string>",
"default_status": "<string>",
"statuses": [
{
"id": "<string>",
"name": "<string>",
"color": "<string>",
"order": 123,
"is_visible": true,
"complete": true,
"role": "<string>"
}
],
"owner": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"record_config_ids": [
"<string>"
],
"default_record_config_id": [
"<string>"
],
"priorities": [
{}
],
"tags": [
{}
],
"staging": true,
"distribution_bindings": [
{
"distribution_id": "<string>",
"product_id": "<string>",
"side": "publisher",
"counterparty_account_id": "<string>",
"counterparty_name": "<string>",
"folder": "<string>",
"required_roles": [
"<string>"
],
"status_map": {},
"bound_at": "2023-11-07T05:31:56Z"
}
]
}{
"error": "<string>",
"code": "<string>"
}{
"error": "<string>",
"code": "<string>"
}{
"error": "<string>",
"code": "<string>"
}{
"error": "<string>",
"code": "<string>"
}{
"error": "<string>",
"code": "<string>"
}{
"error": "<string>",
"code": "<string>"
}{
"error": "<string>",
"code": "<string>"
}Sandbox
Copy a space's structure
Creates a space with the source’s default status, statuses, priorities, tags and folders. Not tasks, description, record configs or bindings. People only: integration tokens are refused. staging: true needs an account root or admin.
POST
/
workspaces
/
space
/
{space_id}
/
copy-structure
Copy a space's structure
curl --request POST \
--url https://api.quiva.ai/workspaces/space/{space_id}/copy-structure \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"id": "<string>",
"staging": true
}
'import requests
url = "https://api.quiva.ai/workspaces/space/{space_id}/copy-structure"
payload = {
"name": "<string>",
"id": "<string>",
"staging": True
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({name: '<string>', id: '<string>', staging: true})
};
fetch('https://api.quiva.ai/workspaces/space/{space_id}/copy-structure', 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://api.quiva.ai/workspaces/space/{space_id}/copy-structure",
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([
'name' => '<string>',
'id' => '<string>',
'staging' => true
]),
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://api.quiva.ai/workspaces/space/{space_id}/copy-structure"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"id\": \"<string>\",\n \"staging\": true\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://api.quiva.ai/workspaces/space/{space_id}/copy-structure")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"id\": \"<string>\",\n \"staging\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.quiva.ai/workspaces/space/{space_id}/copy-structure")
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 \"name\": \"<string>\",\n \"id\": \"<string>\",\n \"staging\": true\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"url": "<string>",
"name": "<string>",
"description": "<string>",
"default_status": "<string>",
"statuses": [
{
"id": "<string>",
"name": "<string>",
"color": "<string>",
"order": 123,
"is_visible": true,
"complete": true,
"role": "<string>"
}
],
"owner": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"record_config_ids": [
"<string>"
],
"default_record_config_id": [
"<string>"
],
"priorities": [
{}
],
"tags": [
{}
],
"staging": true,
"distribution_bindings": [
{
"distribution_id": "<string>",
"product_id": "<string>",
"side": "publisher",
"counterparty_account_id": "<string>",
"counterparty_name": "<string>",
"folder": "<string>",
"required_roles": [
"<string>"
],
"status_map": {},
"bound_at": "2023-11-07T05:31:56Z"
}
]
}{
"error": "<string>",
"code": "<string>"
}{
"error": "<string>",
"code": "<string>"
}{
"error": "<string>",
"code": "<string>"
}{
"error": "<string>",
"code": "<string>"
}{
"error": "<string>",
"code": "<string>"
}{
"error": "<string>",
"code": "<string>"
}{
"error": "<string>",
"code": "<string>"
}Authorizations
bearerAuthapiKeyAuth
JWT Authorization header using the Bearer scheme
Path Parameters
Space id. Case-insensitive; canonical form is upper case.
Body
application/json
Response
The new space.
UI URL to navigate directly to this space
Show child attributes
Show child attributes
ID of the user who created the space, set by the backend
Marks a space for testing. Only root and admin users can set it. Staging spaces can be reset.
Connections to other accounts. Present on a space connected through distribution.
Show child attributes
Show child attributes