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 /applicationsGibt alle Anwendungen zurück, auf die der Token Zugriff hat.
curl -s https://coolai.btc-ag.cloud/api/v1/applications \ -H "Authorization: Bearer $COOLIFY_TOKEN"[ { "id": 1, "uuid": "abc123...", "name": "meine-app", "status": "running", "fqdn": "https://meine-app.btc-ag.cloud", "git_repository": "https://git.coolai.btc-ag.cloud/meinteam/meine-app", "git_branch": "main", "build_pack": "dockerfile" }]Einzelne Anwendung abrufen
GET /applications/{uuid}curl -s https://coolai.btc-ag.cloud/api/v1/applications/<uuid> \ -H "Authorization: Bearer $COOLIFY_TOKEN"{ "uuid": "abc123...", "name": "meine-app", "status": "running", "fqdn": "https://meine-app.btc-ag.cloud", "git_repository": "https://git.coolai.btc-ag.cloud/meinteam/meine-app", "git_branch": "main", "build_pack": "dockerfile", "ports_exposes": "3000", "environment_variables": [ { "key": "LOG_LEVEL", "value": "info", "is_secret": false } ]}Anwendung anlegen (privates Repository)
POST /applications/private-deploy-keyFür Repositories auf git.coolai.btc-ag.cloud.
Request-Body:
| Feld | Typ | Pflicht | Beschreibung |
|---|---|---|---|
project_uuid | string | ja | UUID des Projekts |
server_uuid | string | ja | UUID des Ziel-Servers |
environment_name | string | ja | z. B. production |
private_key_uuid | string | ja | UUID des Deploy-Keys |
git_repository | string | ja | SSH-URL des Repositories |
git_branch | string | ja | Branch (z. B. main) |
build_pack | string | ja | dockerfile | nixpacks | static |
ports_exposes | string | ja | Port(s) der Anwendung (z. B. 3000) |
name | string | nein | Anzeigename |
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" }'{ "uuid": "newly-created-uuid", "domains": "http://newly-created-uuid.server-ip.sslip.io"}Anwendung aktualisieren
PATCH /applications/{uuid}Aktualisiert einzelne Felder einer Anwendung. Nur übergebene Felder werden geändert.
Häufige Update-Felder:
| Feld | Beschreibung |
|---|---|
name | Anzeigename |
domains | Domain(s) setzen — nicht fqdn! (GET zeigt fqdn, PATCH erwartet domains) |
git_branch | Branch wechseln |
git_repository | Repository-URL ändern |
environment_variables | Variablen als Newline-getrennter String |
dockerfile_location | Pfad zum Dockerfile |
# 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"}'curl -s -X PATCH https://coolai.btc-ag.cloud/api/v1/applications/<uuid> \ -H "Authorization: Bearer $COOLIFY_TOKEN" \ -H "Content-Type: application/json" \ -d '{ "environment_variables": "DATABASE_URL=postgresql://...\nLOG_LEVEL=info" }'Anwendung löschen
DELETE /applications/{uuid}curl -s -X DELETE https://coolai.btc-ag.cloud/api/v1/applications/<uuid> \ -H "Authorization: Bearer $COOLIFY_TOKEN"