Creating backup plans
POST /v2/{project_id}/jobs
Create a backup plan.
Source: https://docs.openstack.org/api-ref/backup/v2/index.html#creates-job-v2
Request
Parameters
Name | In | Type | Description |
---|---|---|---|
project_id
|
path | string | The UUID of the project. |
name
|
body | string | The name of the job. |
description
|
body | string | The description of the job. |
client_id
|
body | string | The client UUID. |
job_schedule
|
body | dict | The schedule information of the job. |
job_actions
|
body | list | A list of actions that carry out the backup/restore job. |
Example
# curl -ks -H 'Content-Type: application/json' -H 'X-Auth-Token: gAAAAA<...>' -d '\{ "name": "myplan", "description": "My new plan", "client_id": "hci", "job_schedule": { "schedule_day_of_week": "0,1,2,3,4,5,6", "schedule_month": "1,2,3,4,5,6,7,8,9,10,11,12", "schedule_day": "1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31", "schedule_minute": "00", "schedule_hour": "13" }, "job_actions": [ { "freezer_action": { "action": "backup", "mode": "hci-volumes", "recovery_points_rotation": 7 }, "user_id": "d1899d7f32d64b1bb95e262e7a6a4bc2", "project_id": "3046fb2c2a314a0fbb32607caa1e5277", "action_id": "b9dc9e548b914b80a06d752342828371" } ] }' https://<node_IP_addr>:8736/v2/3046fb2c2a314a0fbb32607caa1e5277/jobs
Response
Parameters
Name | In | Type | Description |
---|---|---|---|
job_id
|
body | string | The job UUID. |
Status codes
Success
Code | Reason |
---|---|
201 - Created
|
Resource was created and is ready to use. |
Error
Code | Reason |
---|---|
400 - Bad Request
|
Some content in the request was invalid. |
401 - Unauthorized
|
User must authenticate before making a request. |
503 - Service Unavailable
|
Service is not available. This is mostly caused by service configuration errors which prevents the service from successful start up. |
Example
{ "job_id": "e632eb1884e0468c8a41e656942df500" }