Generate an onboarding website
import requests
url = "https://platform.ankra.app/api/v1/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 = {
"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({
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/api/v1/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/api/v1/org/onboarding/websites \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--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": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Onboarding
Generate an onboarding website
Queues the Get started website: a starter or a described site deployed to a cluster of the organisation, or committed to a new repository. It answers 202 with the record to poll at GET /api/v1/org/onboarding/websites/. Requires stacks.write on the cluster and, for a repository target, applications.write, both checked against the token’s scopes and the member’s role; a described website spends the monthly AI allowance. The website belongs to the request’s project.
POST
/
api
/
v1
/
org
/
onboarding
/
websites
Generate an onboarding website
import requests
url = "https://platform.ankra.app/api/v1/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 = {
"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({
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/api/v1/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/api/v1/org/onboarding/websites \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--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": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Authorizations
Headers
Body
application/json
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.