Skip to Content
SeyloDocs

Add a backup schedule

POST
/api/v1/backups.createPolicy

Schedules backups of a service's database or one of its volumes to a destination, keeping the newest keepLast. Database services back up with the engine's dump tool; volumes as a tar.zst archive.

Needs backups.edit on the service (a grant on its project covers it). Available to MCP clients and the assistant.

Authorization

cookieseylo_session<token>

Request Body

application/json
  1. body
serviceId*string

Panel-issued id.

Match^[a-z0-9]{16}$
target*string|string
volumeId?string

Panel-issued id.

Match^[a-z0-9]{16}$
destinationId*string

Panel-issued id.

Match^[a-z0-9]{16}$
schedule*string
Match^\S+( \S+){4}$
Length9 <= length <= 100
keepLast?integer
Range1 <= value <= 1000
stopService?boolean
enabled?boolean

Response Body

Success.

application/json
  1. response
id*string

Panel-issued id.

Match^[a-z0-9]{16}$
serviceId*string

Panel-issued id.

Match^[a-z0-9]{16}$
destinationId*string

Panel-issued id.

Match^[a-z0-9]{16}$
destinationName*string
target*string|string
volumeId*|null
volumeName*string|null
schedule*string
Match^\S+( \S+){4}$
Length9 <= length <= 100
keepLast*integer
Range1 <= value <= 1000
stopService*boolean
enabled*boolean
nextRunAt*|null
lastRun*|null
createdAt*string
Formatdate-time
Example Request
curl -X POST 'https://example.com/api/v1/backups.createPolicy' \  -H 'Content-Type: application/json' \  -d '{  "serviceId": "string",  "target": "database",  "destinationId": "string",  "schedule": "stringstr"}'
Example Response
{  "id": "string",  "serviceId": "string",  "destinationId": "string",  "destinationName": "string",  "target": "database",  "volumeId": "string",  "volumeName": "string",  "schedule": "stringstr",  "keepLast": 1,  "stopService": true,  "enabled": true,  "nextRunAt": "2019-08-24T14:15:22Z",  "lastRun": {    "id": "string",    "status": "string",    "finishedAt": "2019-08-24T14:15:22Z"  },  "createdAt": "2019-08-24T14:15:22Z"}