fargone / docs / api

REST API

The dashboard is a thin client over a REST API. Authenticate with a Fargone access token (see OAuth) or a session cookie.

Quick reference

Method Path Description
GET /api/me Current user + quota
GET /api/apps List my apps
POST /api/apps Create app
GET /api/apps/:slug App detail (env, resources, deployments)
PATCH /api/apps/:slug Update app settings
DELETE /api/apps/:slug Delete app
POST /api/apps/:slug/deploy Deploy (GitHub)
PUT /api/apps/:slug/deploy Upload zip + deploy (multipart file)
POST /api/apps/:slug/stop Stop app
POST /api/apps/:slug/restart Restart app
GET /api/apps/:slug/logs?kind=runtime|build Log lines (poll with after=<ts>)
GET/POST /api/apps/:slug/env List / set env vars
DELETE /api/apps/:slug/env?key= Remove env var
POST /api/apps/:slug/resources Provision a database
DELETE /api/resources/:id Delete a database
POST /api/quota/requests Request higher limits
GET /api/cdn List my files
POST /api/cdn Upload a file (multipart file)
GET /api/cdn/:id Fetch a file (public — no auth)
DELETE /api/cdn/:id Delete one of my files
GET /api/oauth/clients My OAuth clients
POST /api/oauth/clients Register an OAuth client
POST /api/github/webhook GitHub push webhook (HMAC verified)

Example

# deploy a zip
curl -X PUT https://fargone.sh/api/apps/myapp/deploy \
  -H "Authorization: Bearer <token>" \
  -F file=@app.zip
# watch runtime logs
curl -H "Authorization: Bearer <token>" \
  "https://fargone.sh/api/apps/myapp/logs?kind=runtime"

CDN

# upload a file
curl -X POST https://fargone.sh/api/cdn \
  -H "Authorization: Bearer <token>" \
  -F file=@image.png

# list my files
curl -H "Authorization: Bearer <token>" https://fargone.sh/api/cdn

# fetch a file (public — no auth needed)
curl -L https://fargone.sh/api/cdn/<id>

POST /api/cdn returns 201 with the file record (including its url). Uploads count against your CDN quota; exceeding it returns 413. See the CDN guide for the settings UI.

Admin endpoints

/api/admin/* requires the ADMIN role: stats, users, approvals and limit requests.

Rate limits

API requests count against your quota (default 120/min). Requests beyond the limit are rejected with 429.

Note on the API

This is the native API used by the dashboard. A versioned, scoped public API is on the roadmap — the OAuth userinfo endpoint is the stable entry point today.