Instance Templates

Create a new instance template

Creates a new instance template for you. Instance templates allow you to save predefined configurations for Odoo instances, making it easier to deploy new instances with consistent settings. Currently, instance templates primarily support backup schedule configurations.

Key Parameters:

  • name: Name for your template (used for identification in the UI)
  • schedules: It contains containing backup schedule configurations. Each configuration contains:
    • A cron expression defining when the backup should run (e.g., '00 08 * * *' for daily at 8:00 AM UTC)
    • Format: 'minute hour day-of-month month day-of-week'
    • Special values supported:
      • '@monthly' or '00 00 1 * *' (first day of month at midnight)
      • '@weekly' or '00 00 * * 0' (Sunday at midnight)
      • '@daily', '@midnight' or '00 00 * * *' (daily at midnight)
      • '@hourly' or '00 * * * *' (hourly at minute 00)
    • Interval patterns supported:
      • '00 */12 * * *' (every 12 hours)
      • '00 */6 * * *' (every 6 hours)
      • '00 */3 * * *' (every 3 hours)
    • retention: Integer number of days to retain backups (e.g., 7 for one week, 30 for one month)

NOTE: All pre-fill values are examples and should be replaced with actual data. Example shows how to setup multiple backups with same frequency, please adjust the configuration as per your needs.

post/instance-templates

Request

  • Base URL: https://api.cloudpepper.io
  • URL: https://api.cloudpepper.io/instance-templates
  • Auth: HTTP bearer

Request body

namestring required

Name of the instance template

schedulesobject

Backup schedule configurations

Example request

{
  "name": "Basic Template with Daily Backups",
  "schedules": {
    "daily_backup": {
      "schedule": "00 00 * * *",
      "retention": 7
    },
    "daily_backup_2": {
      "schedule": "00 05 * * *",
      "retention": 7
    },
    "weekly_backup": {
      "schedule": "00 00 * * 0",
      "retention": 30
    },
    "weekly_backup_2": {
      "schedule": "00 00 * * 5",
      "retention": 15
    },
    "monthly_backup": {
      "schedule": "00 00 1 * *",
      "retention": 90
    },
    "monthly_backup_2": {
      "schedule": "00 00 15 * *",
      "retention": 90
    }
  }
}

Response

Instance template created successfully

Changes

No recorded changes to this operation across all 1 revision of this API.