Skip to content

Applications API

Über die Applications-API lassen sich Anwendungen auf der Plattform vollständig programmatisch verwalten.

Base URL: https://coolai.btc-ag.cloud/api/v1


Alle Anwendungen abrufen

GET /applications

Gibt alle Anwendungen zurück, auf die der Token Zugriff hat.

Terminal window
curl -s https://coolai.btc-ag.cloud/api/v1/applications \
-H "Authorization: Bearer $COOLIFY_TOKEN"

Einzelne Anwendung abrufen

GET /applications/{uuid}
Terminal window
curl -s https://coolai.btc-ag.cloud/api/v1/applications/<uuid> \
-H "Authorization: Bearer $COOLIFY_TOKEN"

Anwendung anlegen (privates Repository)

POST /applications/private-deploy-key

Für Repositories auf git.coolai.btc-ag.cloud.

Request-Body:

FeldTypPflichtBeschreibung
project_uuidstringjaUUID des Projekts
server_uuidstringjaUUID des Ziel-Servers
environment_namestringjaz. B. production
private_key_uuidstringjaUUID des Deploy-Keys
git_repositorystringjaSSH-URL des Repositories
git_branchstringjaBranch (z. B. main)
build_packstringjadockerfile | nixpacks | static
ports_exposesstringjaPort(s) der Anwendung (z. B. 3000)
namestringneinAnzeigename
Terminal window
curl -s -X POST https://coolai.btc-ag.cloud/api/v1/applications/private-deploy-key \
-H "Authorization: Bearer $COOLIFY_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"project_uuid": "<projekt-uuid>",
"server_uuid": "<server-uuid>",
"environment_name": "production",
"private_key_uuid": "<deploy-key-uuid>",
"git_repository": "git@git.coolai.btc-ag.cloud:meinteam/meine-app.git",
"git_branch": "main",
"build_pack": "dockerfile",
"ports_exposes": "3000",
"name": "meine-app"
}'

Anwendung aktualisieren

PATCH /applications/{uuid}

Aktualisiert einzelne Felder einer Anwendung. Nur übergebene Felder werden geändert.

Häufige Update-Felder:

FeldBeschreibung
nameAnzeigename
domainsDomain(s) setzen — nicht fqdn! (GET zeigt fqdn, PATCH erwartet domains)
git_branchBranch wechseln
git_repositoryRepository-URL ändern
environment_variablesVariablen als Newline-getrennter String
dockerfile_locationPfad zum Dockerfile
Terminal window
# Feld heißt "domains" beim Schreiben (GET-Response zeigt "fqdn")
curl -s -X PATCH https://coolai.btc-ag.cloud/api/v1/applications/<uuid> \
-H "Authorization: Bearer $COOLIFY_TOKEN" \
-H "Content-Type: application/json" \
-d '{"domains": "https://meine-app.btc-ag.cloud"}'

Anwendung löschen

DELETE /applications/{uuid}
Terminal window
curl -s -X DELETE https://coolai.btc-ag.cloud/api/v1/applications/<uuid> \
-H "Authorization: Bearer $COOLIFY_TOKEN"