Apps

List applications

GET/api/v1/apps

Required scope: apps:read

Parameters

NameInRequiredDescription
account_idqueryyesAccount to scope the list to. Must be one the token owner belongs to.
page[size]querynoItems per page (1-100, default 30).
page[cursor]querynoOpaque cursor from a previous response.

Example request

curl https://hangar.nagara.cloud/api/v1/apps?account_id=acct_123 \
  -H "Authorization: Bearer hgp_your_token"

Example response

{
  "data": [ { /* ... */ } ],
  "meta": { "per_page": 30, "next_cursor": "eyJ...", "prev_cursor": null },
  "links": { "next": "/api/v1/...?page[cursor]=eyJ...", "prev": null }
}

Create an application

POST/api/v1/apps

Required scope: apps:write

Example request

curl https://hangar.nagara.cloud/api/v1/apps \
  -X POST \
  -H "Authorization: Bearer hgp_your_token" \
  -H "Content-Type: application/json" \
  -d '{"account_id": "account_123", "branch": "...", "cluster_id": "...", "mode": "...", "name": "...", "repo_url": "..."}'

Example response

{ "data": {
  "account_id": "account_123",
  "branch": "...",
  "cluster_id": "...",
  "created_at": "2026-01-01T00:00:00Z",
  "force_https": false,
  "framework": "...",
  "id": "id_123",
  "maintenance_mode": false,
  "mode": "...",
  "name": "...",
  "repository": "...",
  "updated_at": "2026-01-01T00:00:00Z"
} }

Get an application

GET/api/v1/apps/{app}

Required scope: apps:read

Parameters

NameInRequiredDescription
apppathyesThe app id.

Example request

curl https://hangar.nagara.cloud/api/v1/apps/app_123 \
  -H "Authorization: Bearer hgp_your_token"

Example response

{ "data": {
  "account_id": "account_123",
  "branch": "...",
  "cluster_id": "...",
  "created_at": "2026-01-01T00:00:00Z",
  "force_https": false,
  "framework": "...",
  "id": "id_123",
  "maintenance_mode": false,
  "mode": "...",
  "name": "...",
  "repository": "...",
  "updated_at": "2026-01-01T00:00:00Z"
} }

Update an application

PATCH/api/v1/apps/{app}

Required scope: apps:write

Parameters

NameInRequiredDescription
apppathyesThe app id.

Example request

curl https://hangar.nagara.cloud/api/v1/apps/app_123 \
  -X PATCH \
  -H "Authorization: Bearer hgp_your_token" \
  -H "Content-Type: application/json" \
  -d '{"branch": "...", "framework": "...", "name": "...", "repository": "..."}'

Example response

{ "data": {
  "account_id": "account_123",
  "branch": "...",
  "cluster_id": "...",
  "created_at": "2026-01-01T00:00:00Z",
  "force_https": false,
  "framework": "...",
  "id": "id_123",
  "maintenance_mode": false,
  "mode": "...",
  "name": "...",
  "repository": "...",
  "updated_at": "2026-01-01T00:00:00Z"
} }

Archive an application

DELETE/api/v1/apps/{app}

Required scope: apps:write

Parameters

NameInRequiredDescription
apppathyesThe app id.

Example request

curl https://hangar.nagara.cloud/api/v1/apps/app_123 \
  -X DELETE \
  -H "Authorization: Bearer hgp_your_token"

Example response

HTTP/1.1 204 No Content

Toggle maintenance mode

POST/api/v1/apps/{app}/maintenance

Required scope: apps:write

Parameters

NameInRequiredDescription
apppathyesThe app id.

Example request

curl https://hangar.nagara.cloud/api/v1/apps/app_123/maintenance \
  -X POST \
  -H "Authorization: Bearer hgp_your_token" \
  -H "Content-Type: application/json" \
  -d '{"enabled": false}'

Example response

{ "data": {
  "account_id": "account_123",
  "branch": "...",
  "cluster_id": "...",
  "created_at": "2026-01-01T00:00:00Z",
  "force_https": false,
  "framework": "...",
  "id": "id_123",
  "maintenance_mode": false,
  "mode": "...",
  "name": "...",
  "repository": "...",
  "updated_at": "2026-01-01T00:00:00Z"
} }