Generate an onboarding website
import requests
url = "https://platform.ankra.app/org/onboarding/websites"
payload = {
"prompt": "<string>",
"cluster_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"target": {
"credential_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"owner": "<string>",
"repository_name": "<string>",
"private": 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({
prompt: '<string>',
cluster_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
target: {
credential_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
owner: '<string>',
repository_name: '<string>',
private: true
}
})
};
fetch('https://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://platform.ankra.app/org/onboarding/websites \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"prompt": "<string>",
"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"
}Onboarding
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.
POST
/
org
/
onboarding
/
websites
Generate an onboarding website
import requests
url = "https://platform.ankra.app/org/onboarding/websites"
payload = {
"prompt": "<string>",
"cluster_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"target": {
"credential_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"owner": "<string>",
"repository_name": "<string>",
"private": 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({
prompt: '<string>',
cluster_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
target: {
credential_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
owner: '<string>',
repository_name: '<string>',
private: true
}
})
};
fetch('https://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://platform.ankra.app/org/onboarding/websites \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"prompt": "<string>",
"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
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
application/json
Required string length:
3 - 2000starter 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