Initialize confluence sandbox with data
curl --request POST \
--url https://api.klavis.ai/sandbox/confluence/{sandbox_id}/initialize \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"spaces": [
{
"identifier": "TEAM",
"name": "Team Space",
"description": "Space for team collaboration",
"pages": [
{
"title": "Welcome to the Team",
"content": "<p>This is the home page for our team.</p>",
"comments": [
{
"content": "<p>Great start!</p>"
}
],
"children": [
{
"title": "Project Alpha",
"content": "<h1>Project Alpha</h1><p>Details about the project.</p>",
"comments": [
{
"content": "<p>Looking forward to this.</p>"
}
]
},
{
"title": "Meeting Notes",
"content": "<p>Weekly meeting notes go here.</p>",
"children": [
{
"title": "2023-10-27 Sync",
"content": "<p>Discussed Q4 goals.</p>"
}
]
}
]
}
]
},
{
"identifier": "DOCS",
"name": "Documentation",
"description": "Product documentation",
"pages": [
{
"title": "Getting Started",
"content": "<p>How to use the product.</p>"
}
]
}
]
}
'import requests
url = "https://api.klavis.ai/sandbox/confluence/{sandbox_id}/initialize"
payload = { "spaces": [
{
"identifier": "TEAM",
"name": "Team Space",
"description": "Space for team collaboration",
"pages": [
{
"title": "Welcome to the Team",
"content": "<p>This is the home page for our team.</p>",
"comments": [{ "content": "<p>Great start!</p>" }],
"children": [
{
"title": "Project Alpha",
"content": "<h1>Project Alpha</h1><p>Details about the project.</p>",
"comments": [{ "content": "<p>Looking forward to this.</p>" }]
},
{
"title": "Meeting Notes",
"content": "<p>Weekly meeting notes go here.</p>",
"children": [
{
"title": "2023-10-27 Sync",
"content": "<p>Discussed Q4 goals.</p>"
}
]
}
]
}
]
},
{
"identifier": "DOCS",
"name": "Documentation",
"description": "Product documentation",
"pages": [
{
"title": "Getting Started",
"content": "<p>How to use the product.</p>"
}
]
}
] }
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({
spaces: [
{
identifier: 'TEAM',
name: 'Team Space',
description: 'Space for team collaboration',
pages: [
{
title: 'Welcome to the Team',
content: '<p>This is the home page for our team.</p>',
comments: [{content: '<p>Great start!</p>'}],
children: [
{
title: 'Project Alpha',
content: '<h1>Project Alpha</h1><p>Details about the project.</p>',
comments: [{content: '<p>Looking forward to this.</p>'}]
},
{
title: 'Meeting Notes',
content: '<p>Weekly meeting notes go here.</p>',
children: [{title: '2023-10-27 Sync', content: '<p>Discussed Q4 goals.</p>'}]
}
]
}
]
},
{
identifier: 'DOCS',
name: 'Documentation',
description: 'Product documentation',
pages: [{title: 'Getting Started', content: '<p>How to use the product.</p>'}]
}
]
})
};
fetch('https://api.klavis.ai/sandbox/confluence/{sandbox_id}/initialize', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
spaces: [
{
identifier: 'TEAM',
name: 'Team Space',
description: 'Space for team collaboration',
pages: [
{
title: 'Welcome to the Team',
content: '<p>This is the home page for our team.</p>',
comments: [{content: '<p>Great start!</p>'}],
children: [
{
title: 'Project Alpha',
content: '<h1>Project Alpha</h1><p>Details about the project.</p>',
comments: [{content: '<p>Looking forward to this.</p>'}]
},
{
title: 'Meeting Notes',
content: '<p>Weekly meeting notes go here.</p>',
children: [{title: '2023-10-27 Sync', content: '<p>Discussed Q4 goals.</p>'}]
}
]
}
]
},
{
identifier: 'DOCS',
name: 'Documentation',
description: 'Product documentation',
pages: [{title: 'Getting Started', content: '<p>How to use the product.</p>'}]
}
]
})
};
fetch('https://api.klavis.ai/sandbox/confluence/{sandbox_id}/initialize', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"sandbox_id": "<string>",
"message": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Confluence
Initialize confluence sandbox with data
Initialize the sandbox with confluence-specific data following the defined schema.
POST
/
sandbox
/
confluence
/
{sandbox_id}
/
initialize
Initialize confluence sandbox with data
curl --request POST \
--url https://api.klavis.ai/sandbox/confluence/{sandbox_id}/initialize \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"spaces": [
{
"identifier": "TEAM",
"name": "Team Space",
"description": "Space for team collaboration",
"pages": [
{
"title": "Welcome to the Team",
"content": "<p>This is the home page for our team.</p>",
"comments": [
{
"content": "<p>Great start!</p>"
}
],
"children": [
{
"title": "Project Alpha",
"content": "<h1>Project Alpha</h1><p>Details about the project.</p>",
"comments": [
{
"content": "<p>Looking forward to this.</p>"
}
]
},
{
"title": "Meeting Notes",
"content": "<p>Weekly meeting notes go here.</p>",
"children": [
{
"title": "2023-10-27 Sync",
"content": "<p>Discussed Q4 goals.</p>"
}
]
}
]
}
]
},
{
"identifier": "DOCS",
"name": "Documentation",
"description": "Product documentation",
"pages": [
{
"title": "Getting Started",
"content": "<p>How to use the product.</p>"
}
]
}
]
}
'import requests
url = "https://api.klavis.ai/sandbox/confluence/{sandbox_id}/initialize"
payload = { "spaces": [
{
"identifier": "TEAM",
"name": "Team Space",
"description": "Space for team collaboration",
"pages": [
{
"title": "Welcome to the Team",
"content": "<p>This is the home page for our team.</p>",
"comments": [{ "content": "<p>Great start!</p>" }],
"children": [
{
"title": "Project Alpha",
"content": "<h1>Project Alpha</h1><p>Details about the project.</p>",
"comments": [{ "content": "<p>Looking forward to this.</p>" }]
},
{
"title": "Meeting Notes",
"content": "<p>Weekly meeting notes go here.</p>",
"children": [
{
"title": "2023-10-27 Sync",
"content": "<p>Discussed Q4 goals.</p>"
}
]
}
]
}
]
},
{
"identifier": "DOCS",
"name": "Documentation",
"description": "Product documentation",
"pages": [
{
"title": "Getting Started",
"content": "<p>How to use the product.</p>"
}
]
}
] }
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({
spaces: [
{
identifier: 'TEAM',
name: 'Team Space',
description: 'Space for team collaboration',
pages: [
{
title: 'Welcome to the Team',
content: '<p>This is the home page for our team.</p>',
comments: [{content: '<p>Great start!</p>'}],
children: [
{
title: 'Project Alpha',
content: '<h1>Project Alpha</h1><p>Details about the project.</p>',
comments: [{content: '<p>Looking forward to this.</p>'}]
},
{
title: 'Meeting Notes',
content: '<p>Weekly meeting notes go here.</p>',
children: [{title: '2023-10-27 Sync', content: '<p>Discussed Q4 goals.</p>'}]
}
]
}
]
},
{
identifier: 'DOCS',
name: 'Documentation',
description: 'Product documentation',
pages: [{title: 'Getting Started', content: '<p>How to use the product.</p>'}]
}
]
})
};
fetch('https://api.klavis.ai/sandbox/confluence/{sandbox_id}/initialize', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
spaces: [
{
identifier: 'TEAM',
name: 'Team Space',
description: 'Space for team collaboration',
pages: [
{
title: 'Welcome to the Team',
content: '<p>This is the home page for our team.</p>',
comments: [{content: '<p>Great start!</p>'}],
children: [
{
title: 'Project Alpha',
content: '<h1>Project Alpha</h1><p>Details about the project.</p>',
comments: [{content: '<p>Looking forward to this.</p>'}]
},
{
title: 'Meeting Notes',
content: '<p>Weekly meeting notes go here.</p>',
children: [{title: '2023-10-27 Sync', content: '<p>Discussed Q4 goals.</p>'}]
}
]
}
]
},
{
identifier: 'DOCS',
name: 'Documentation',
description: 'Product documentation',
pages: [{title: 'Getting Started', content: '<p>How to use the product.</p>'}]
}
]
})
};
fetch('https://api.klavis.ai/sandbox/confluence/{sandbox_id}/initialize', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"sandbox_id": "<string>",
"message": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Authorizations
Your Klavis AI API key.
Path Parameters
The unique sandbox identifier
Query Parameters
If true, use default test data for initialization
Body
application/json
Complete Confluence sandbox data structure.
Hierarchy:
- Spaces contain Pages
- Pages can have children (nested pages) and Comments
List of spaces
Show child attributes
Show child attributes
⌘I
