Public API
API yardımcısı
Bu endpointler paneldeki Container App ve Object Storage akışlarının API karşılığıdır. Tüm istekler yetkili CDN hesabı kapsamında çalışır.
Platform yardımına dönContainer Apps
GET /api/accounts/{uuid}/platform/container/apps
POST /api/accounts/{uuid}/platform/container/apps
PATCH /api/accounts/{uuid}/platform/container/apps/{app_uuid}
GET /api/accounts/{uuid}/platform/container/registry-credentials
POST /api/accounts/{uuid}/platform/container/registry-credentials
POST /api/accounts/{uuid}/platform/container/apps/{app_uuid}/deploy
POST /api/accounts/{uuid}/platform/container/apps/{app_uuid}/restart
POST /api/accounts/{uuid}/platform/container/apps/{app_uuid}/scale
GET /api/accounts/{uuid}/platform/container/apps/{app_uuid}/status
GET /api/accounts/{uuid}/platform/container/apps/{app_uuid}/logs
POST /api/accounts/{uuid}/platform/container/apps/{app_uuid}/imports/database
POST /api/accounts/{uuid}/platform/container/apps/{app_uuid}/imports/files
POST /api/accounts/{uuid}/platform/container/apps/{app_uuid}/scheduled-jobs
POST /api/accounts/{uuid}/platform/container/apps/{app_uuid}/scheduled-jobs/{job_uuid}/run
DELETE /api/accounts/{uuid}/platform/container/apps/{app_uuid}
Object Storage
GET /api/accounts/{uuid}/platform/container/object-storage/buckets
POST /api/accounts/{uuid}/platform/container/object-storage/buckets
POST /api/accounts/{uuid}/platform/container/object-storage/access-keys
POST /api/accounts/{uuid}/platform/container/object-storage/access-keys/{key_uuid}/rotate
DELETE /api/accounts/{uuid}/platform/container/object-storage/access-keys/{key_uuid}
POST /api/accounts/{uuid}/platform/container/apps/{app_uuid}/object-storage/bindings
Kimlik doğrulama
Tüm uçlar kullanıcı kapsamlı bir Bearer token ister. En hızlı yol cdnctl login; aynı token script ve CI içinden doğrudan curl/HTTP çağrılarında da geçerlidir.
# 1) authenticate once (stores the token in ~/.cdnctl/config.json)
cdnctl login --email you@example.com
# 2) call any endpoint directly with the same Bearer token
curl -H "Authorization: Bearer $TOKEN" \
https://cdn.com.tr/api/accounts/{uuid}/platform/container/apps
Çalışan örnek: bir uygulamanın durumunu oku
Yanıtlar JSON döner. 2xx dışındaki yanıtlar, neyin ters gittiğini açıklayan status ve message alanları taşır.
curl -H "Authorization: Bearer $TOKEN" \
https://cdn.com.tr/api/accounts/{uuid}/platform/container/apps/{app_uuid}/status
# response (abridged)
{
"status": "success",
"app": { "uuid": "…", "name": "web", "status": "running", "replicas": 1 }
}
Bilmekte fayda var
- Bunlar panelin ve cdnctl'in kullandığı uçların aynısı — panelde tıklayabildiğiniz her şeyi script'leyebilirsiniz.
- Deploy otomasyonunda sıkı polling yerine "cdnctl container apps wait --status running" kullanın.
- İşlemler asenkrondur: değişiklik yapan çağrılar, panelden ya da status ucundan izlenebilen bir operasyon döndürür.