Scheduled Tasks

List scheduled tasks

GET/api/v1/apps/{app}/scheduled-tasks

Required scope: apps:read

Parameters

NameInRequiredDescription
apppathyesThe app id.
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/app_123/scheduled-tasks?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 a scheduled task

POST/api/v1/apps/{app}/scheduled-tasks

Required scope: apps:write

Parameters

NameInRequiredDescription
apppathyesThe app id.

Example request

curl https://hangar.nagara.cloud/api/v1/apps/app_123/scheduled-tasks \
  -X POST \
  -H "Authorization: Bearer hgp_your_token" \
  -H "Content-Type: application/json" \
  -d '{"command": "...", "name": "...", "schedule": "...", "timezone": "..."}'

Example response

{ "data": {
  "app_id": "app_123",
  "command": "...",
  "created_at": "2026-01-01T00:00:00Z",
  "enabled": false,
  "id": "id_123",
  "last_run_at": "2026-01-01T00:00:00Z",
  "name": "...",
  "schedule": "...",
  "timezone": "...",
  "updated_at": "2026-01-01T00:00:00Z"
} }

Enable/disable a scheduled task

PATCH/api/v1/apps/{app}/scheduled-tasks/{task}

Required scope: apps:write

Parameters

NameInRequiredDescription
apppathyesThe app id.
taskpathyesThe task id.

Example request

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

Example response

{ "data": {
  "app_id": "app_123",
  "command": "...",
  "created_at": "2026-01-01T00:00:00Z",
  "enabled": false,
  "id": "id_123",
  "last_run_at": "2026-01-01T00:00:00Z",
  "name": "...",
  "schedule": "...",
  "timezone": "...",
  "updated_at": "2026-01-01T00:00:00Z"
} }

Delete a scheduled task

DELETE/api/v1/apps/{app}/scheduled-tasks/{task}

Required scope: apps:write

Parameters

NameInRequiredDescription
apppathyesThe app id.
taskpathyesThe task id.

Example request

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

Example response

HTTP/1.1 204 No Content