curl --request POST \ --url 'https://api.e2enetworks.com/myaccount/api/v1/gpu/dbaas/{managed_db_id}/snapshots/schedule/?project_id=<PROJECT_ID>&location=<LOCATION>&apikey=<API_KEY>' \ --header 'Authorization: Bearer <API_TOKEN>' \ --header 'Content-Type: application/json' \ --data '{ "frequency": "weekly", "start_time": "03:30", "day_of_week": 0, "retention_count": 14}'import requests
response = requests.post( "https://api.e2enetworks.com/myaccount/api/v1/gpu/dbaas/{managed_db_id}/snapshots/schedule/", params={"project_id": "<PROJECT_ID>", "location": "<LOCATION>", "apikey": "<API_KEY>"}, headers={"Authorization": "Bearer <API_TOKEN>"}, json={ "frequency": "weekly", "start_time": "03:30", "day_of_week": 0, "retention_count": 14, },)print(response.json())const url = new URL("https://api.e2enetworks.com/myaccount/api/v1/gpu/dbaas/{managed_db_id}/snapshots/schedule/");url.search = new URLSearchParams({ project_id: "<PROJECT_ID>", location: "<LOCATION>", apikey: "<API_KEY>" });
const response = await fetch(url, { method: "POST", headers: { "Authorization": "Bearer <API_TOKEN>", "Content-Type": "application/json" }, body: JSON.stringify({ "frequency": "weekly", "start_time": "03:30", "day_of_week": 0, "retention_count": 14 }),});console.log(await response.json());Turns automatic snapshots on, or changes the schedule, and returns it. All times are in IST (Asia/Kolkata). Fields you leave out keep their saved values; a database that never had a schedule starts from daily at 02:00, keeping 7. After each scheduled snapshot, scheduled snapshots beyond retention_count are deleted, oldest first; manual snapshots are never deleted by the schedule. A scheduled run is skipped while the database is not Running or Degraded. Refused while the database is Terminating or Failed. Needs the Create permission for DBaaS.
Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Database ID
Query Parameters
Section titled “Query Parameters”Project ID
Active IAM ID (To access contact person account) Find your Active IAM ID here
Location
Request Body
Section titled “Request Body”object
daily runs once a day at start_time. weekly runs once a week on day_of_week at start_time. hourly runs every hour at the minute of start_time. custom_cron runs on cron_expression.
Example
dailyTime of day in IST, HH:MM on a 24-hour clock. For daily, weekly and hourly.
Example
02:000 (Sunday) to 6 (Saturday). Required for weekly.
Example
0For custom_cron: a 5-field cron expression (minute hour day-of-month month weekday), read in IST. Left out, the saved expression is kept (for a database that never had a schedule, 0 */6 * * *, every 6 hours).
Example
0 */6 * * *How many scheduled snapshots to keep, 1 to 60.
Example
7Example
{ "frequency": "weekly", "start_time": "03:30", "day_of_week": 0, "retention_count": 14}Responses
Section titled “Responses”The schedule as saved
object
object
Whether automatic snapshots are on.
Time of day in IST, as HH:MM on a 24-hour clock.
For weekly: 0 (Sunday) to 6 (Saturday).
The 5-field cron expression the schedule runs on, read in IST.
How many scheduled snapshots are kept.
The next scheduled run, in IST. null when the schedule is off.
object
Example
{ "code": 200, "message": "Success", "data": { "enabled": true, "frequency": "daily", "start_time": "02:00", "day_of_week": null, "cron_expression": "0 2 * * *", "retention_count": 7, "next_run_at": "2026-10-27T02:00:00+05:30" }, "errors": {}}A field is outside its rule: “frequency must be one of: daily, weekly, hourly, custom_cron.”, “start_time must be HH:MM in IST (24-hour format, e.g. ‘02:07’).”, “day_of_week is required when frequency is ‘weekly’.”, “cron_expression must be a 5-field cron expression (minute hour day month weekday), e.g. ‘0 */6 * * *’ for every 6 hours.” or “retention_count must be between 1 and 60.”. A missing or invalid project ID gives errors “Project ID is missing or invalid”.
object
object
Example
{ "code": 400, "message": "Bad Request", "data": {}, "errors": "retention_count must be between 1 and 60."}The caller lacks the permission the call needs on the project, or the region is not allowed.
object
object
Example
{ "code": 403, "message": "Forbidden", "data": {}, "errors": "You don't have permission to access this service. Please verify your policy or project."}No database with that ID in the project and region.
object
object
Example
{ "code": 404, "message": "Bad Request", "data": {}, "errors": "Invalid request! Database Not Found"}The database is Terminating or Failed (as shown), or the schedule could not be applied, in which case nothing is changed (“Could not update the snapshot schedule right now; nothing was changed. Please try again.”).
object
object
Example
{ "code": 412, "message": "Precondition Failed", "data": {}, "errors": "Database NOT in RUNNING state. Please try again later."}