Skip to main content
Every operation on this page starts by obtaining an Application instance:
api.applications.fetch(id) returns an Application. When the app has a website domain bound to it, it is returned as a WebsiteApplication — refine the type at runtime with app.isWebsite() before using .network (see Network).

Application properties

In v4, app.custom is null when no custom domain is set (was undefined in v3).

Getting the application status

app.getStatus() returns an ApplicationStatus instance with the live runtime state.

Summary status for every application

To avoid one request per app, call api.applications.statusAll():

Getting the logs

app.getLogs() returns the most recent log output as a string.
Rate limited to 1 request per application every 5 seconds, plus a burst of 20 requests per 10 seconds per user.

Getting metrics

app.getMetrics() returns the last 24 hours of CPU, RAM and network samples (up to 288 points, one every 5 minutes).
getMetrics() requires the application to have at least 512MB of RAM allocated.

Real-time event stream

app.realtime() opens a Server-Sent Events stream. See the dedicated Realtime page for a full example.

Lifecycle

All lifecycle methods resolve to boolean (true on success).

Deleting an application

app.delete() permanently removes the application. Unless you have a snapshot, the data cannot be recovered.

Refreshing the application data

app.fetch() refetches the application from the API and returns a brand-new Application instance. Use it when you suspect the cached data is stale.