import requests
url = "https://api.platform.ankra.app/org/onboarding/websites"
payload = {
"cluster_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"target": {
"credential_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"owner": "<string>",
"repository_name": "<string>",
"private": True
}
}
headers = {
"cookie": "ankra_session=",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {cookie: 'ankra_session=', 'Content-Type': 'application/json'},
body: JSON.stringify({
cluster_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
target: {
credential_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
owner: '<string>',
repository_name: '<string>',
private: true
}
})
};
fetch('https://api.platform.ankra.app/org/onboarding/websites', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request POST \
--url https://api.platform.ankra.app/org/onboarding/websites \
--header 'Content-Type: application/json' \
--cookie ankra_session= \
--data '
{
"cluster_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"target": {
"credential_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"owner": "<string>",
"repository_name": "<string>",
"private": true
}
}
'{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"state": "<string>"
}{
"detail": "Cluster not found"
}{
"detail": "Cluster not found"
}{
"detail": "Cluster not found"
}{
"detail": "Cluster not found"
}{
"detail": "Cluster not found"
}{
"detail": "Cluster not found"
}{
"detail": "Cluster not found"
}Generate an onboarding website
Generate a website from a short prompt on the organisation’s website_generation AI lane and deploy it to the cluster: served from a stack (target starter) or committed to a new GitHub repository and deployed as an application (target repository). Answers 202 at once; poll the website for its state. Browser-session route; requires the X-Ankra-CSRF header.
import requests
url = "https://api.platform.ankra.app/org/onboarding/websites"
payload = {
"cluster_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"target": {
"credential_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"owner": "<string>",
"repository_name": "<string>",
"private": True
}
}
headers = {
"cookie": "ankra_session=",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {cookie: 'ankra_session=', 'Content-Type': 'application/json'},
body: JSON.stringify({
cluster_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
target: {
credential_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
owner: '<string>',
repository_name: '<string>',
private: true
}
})
};
fetch('https://api.platform.ankra.app/org/onboarding/websites', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request POST \
--url https://api.platform.ankra.app/org/onboarding/websites \
--header 'Content-Type: application/json' \
--cookie ankra_session= \
--data '
{
"cluster_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"target": {
"credential_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"owner": "<string>",
"repository_name": "<string>",
"private": true
}
}
'{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"state": "<string>"
}{
"detail": "Cluster not found"
}{
"detail": "Cluster not found"
}{
"detail": "Cluster not found"
}{
"detail": "Cluster not found"
}{
"detail": "Cluster not found"
}{
"detail": "Cluster not found"
}{
"detail": "Cluster not found"
}Authorizations
Browser session. Mutations also require X-Ankra-CSRF.
Body
A prompt alone writes the site, starting from the starter it plainly asks for when there is one. A template serves that starter; with a prompt the starter is personalised, without one it is served as it is and needs no AI.
starter serves the site from a stack on the cluster; repository commits it to a new GitHub repository (credential_id, owner and repository_name required) and deploys it as an application.
Show child attributes
Show child attributes
Required without a template; optional and may be blank with one.
3 - 2000A starter key from GET /org/onboarding/website-templates.
A theme key from GET /org/onboarding/website-templates.