CDN

Usage & stats

The CDN section of the dashboard shows, per namespace: storage used vs quota, file count, upload trends, and connected hosts. All figures are scoped to your own namespaces.

Dashboard

Go to Dashboard → CDN. It shows your account's CDN host and custom domains; pick a namespace to see its storage/monthly usage against quota, the ingest chart, and recent files.

API

Everything the dashboard shows is available programmatically (scoped to the caller's user + namespace):

// Storage totals (optionally for one namespace)
const { data: stats } = await oblien.cdn.stats({ namespace: 'customer-123' });
// → { totalFiles, totalSize, activeFiles, activeSize, uploadedFiles, urlFiles }

// List files, optionally by namespace + filters
const { data } = await oblien.cdn.list({
  namespace: 'customer-123', page: 1, limit: 50,
  include_deleted: false, upload_type: 'upload',   // 'upload' | 'url'
  sort_by: 'created_at', sort_order: 'DESC',
});

// Manage a single file
await oblien.cdn.get(fileId);
await oblien.cdn.delete(fileId);    // soft delete
await oblien.cdn.restore(fileId);   // undo a soft delete
GET    /cdn/stats?namespace=customer-123
GET    /cdn/files?namespace=customer-123&page=1&limit=50&sort_by=created_at&sort_order=DESC
GET    /cdn/files/:id
DELETE /cdn/files/:id                 # soft delete
POST   /cdn/files/:id/restore
curl "https://api.oblien.com/cdn/stats?namespace=customer-123" \
  -H "X-Client-ID: $OBLIEN_CLIENT_ID" -H "X-Client-Secret: $OBLIEN_CLIENT_SECRET"

curl "https://api.oblien.com/cdn/files?namespace=customer-123&limit=50" \
  -H "X-Client-ID: $OBLIEN_CLIENT_ID" -H "X-Client-Secret: $OBLIEN_CLIENT_SECRET"

For per-month usage (ingest + active) + the storage caps, and the windowed series for charts, use GET /cdn/usage and GET /cdn/usage/series — see Quotas & usage. Delivery traffic (egress) is metered separately — see Traffic & billing.

Records are written by the CDN nodes' durable async recording, so figures reflect uploads across every node — one unified view regardless of how the CDN scales. Byte figures count the full footprint (original + every variant). A namespace suspended for a traffic overage still shows its files here — suspension stops delivery, not storage.