PilotFoxDocs

Set the backup schedule

PUT
/api/v1/admin/backups/schedule

schedule: off, every12h (at hour and 12 hours later), daily (at hour) or weekly (on weekday, 0 = Sunday, at hour); hour is in UTC. Answers the saved schedule and the next run.

Requires a signed-in system administrator (session cookie). API keys and share links: 401; other signed-in users: 403.

Authorization

session
cookie__Secure-pilotfox.session_token<token>

The web app's sign-in session, acting with the user's role; named pilotfox.session_token on an instance whose PUBLIC_URL is plain http. Under /api/v1, a POST, PUT, PATCH or DELETE carrying a cookie must come from the instance's own origin (Origin: PUBLIC_URL or a DASHBOARD_ORIGINS entry; else 403), and a body it carries must be JSON or multipart (else 415).

Request Body

application/json
  1. body
schedule*string
Value in"off""every12h""daily""weekly"
hour*integer
Range0 <= value <= 23
weekday?integer
Range0 <= value <= 6
Default0

Response Body

OK

application/json
  1. response
data*
Example Request
curl -X PUT 'https://pilotfox.app/api/v1/admin/backups/schedule' \  -H 'Content-Type: application/json' \  -d '{  "schedule": "off",  "hour": 0}'
Example Response200
{  "data": {    "schedule": {      "schedule": "off",      "hour": -9007199254740991,      "weekday": -9007199254740991,      "updatedAt": "string",      "updatedBy": {        "id": "string",        "email": "string"      }    },    "nextRunAt": "string"  }}