import requests
url = "https://api.platform.ankra.app/org/onboarding/apps/{app_id}/continue"
payload = {
"cluster_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"build_with_ankra": True,
"runs_as_service": 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',
build_with_ankra: true,
runs_as_service: true
})
};
fetch('https://api.platform.ankra.app/org/onboarding/apps/{app_id}/continue', 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/apps/{app_id}/continue \
--header 'Content-Type: application/json' \
--cookie ankra_session= \
--data '
{
"cluster_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"build_with_ankra": true,
"runs_as_service": true
}
'{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"cluster_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"application_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"repository": "<string>",
"state": "setting_up",
"url": "<string>",
"message": "<string>",
"steps": [
{
"key": "application",
"state": "todo",
"message": "<string>"
}
],
"dependencies": [
"postgres"
],
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"situation": {
"code": "<string>",
"actor": "ankra",
"title": "<string>",
"message": "<string>",
"action": "<string>",
"url": "<string>",
"values": [
"<string>"
],
"since": "2023-11-07T05:31:56Z",
"is_slow": true,
"is_stopped": true
},
"pull_request": {
"url": "<string>",
"state": "open"
}
}{
"detail": "Cluster not found"
}{
"detail": "Cluster not found"
}{
"detail": "Cluster not found"
}{
"detail": "Cluster not found"
}{
"detail": "Cluster not found"
}Continue an onboarding app
Start an onboarding app that stopped again. An empty body tries what it waits on once more: the setup, the failed build, or the deploy. build_with_ankra has Ankra build the app instead of the repository’s own CI, runs_as_service states that the repository is a service, and cluster_id deploys an app that is on no cluster yet to another one. Answers 202 with the app after one pass. Needs applications.write and applications.deploy. Browser-session route; requires the X-Ankra-CSRF header.
import requests
url = "https://api.platform.ankra.app/org/onboarding/apps/{app_id}/continue"
payload = {
"cluster_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"build_with_ankra": True,
"runs_as_service": 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',
build_with_ankra: true,
runs_as_service: true
})
};
fetch('https://api.platform.ankra.app/org/onboarding/apps/{app_id}/continue', 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/apps/{app_id}/continue \
--header 'Content-Type: application/json' \
--cookie ankra_session= \
--data '
{
"cluster_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"build_with_ankra": true,
"runs_as_service": true
}
'{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"cluster_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"application_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"repository": "<string>",
"state": "setting_up",
"url": "<string>",
"message": "<string>",
"steps": [
{
"key": "application",
"state": "todo",
"message": "<string>"
}
],
"dependencies": [
"postgres"
],
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"situation": {
"code": "<string>",
"actor": "ankra",
"title": "<string>",
"message": "<string>",
"action": "<string>",
"url": "<string>",
"values": [
"<string>"
],
"since": "2023-11-07T05:31:56Z",
"is_slow": true,
"is_stopped": true
},
"pull_request": {
"url": "<string>",
"state": "open"
}
}{
"detail": "Cluster not found"
}{
"detail": "Cluster not found"
}{
"detail": "Cluster not found"
}{
"detail": "Cluster not found"
}{
"detail": "Cluster not found"
}Authorizations
Body
How to continue an onboarding app that stopped. Every member is optional.
Response
The onboarding app, after one pass at what it waits on.
The onboarding wizard's app: an existing repository registered as an application on the cluster, with AI code review, pull request previews, backups, merge-when-green on the setup pull request and the first deploy turned on. The id is the application's id.