{ "restSchemaVersion": "1.0", "errors": [ { "error_id": "BAD_REQUEST", "description": "Invalid argument.", "http_status": "400" }, { "error_id": "AUTH_REQUIRED", "description": "Authentication required.", "http_status": "401" }, { "error_id": "AUTH_INVALID_CREDENTIALS", "description": "Make sure the user name is correct and type your password again. Be sure to use the correct case for the user name and password.", "http_status": "401" }, { "error_id": "INTERNAL_ERROR", "description": "Internal error.", "http_status": "500" } ], "name": "mgmt.gateway_backup", "title": "Backup/Restore API.", "version": "1.0", "schemas": [], "defaultAuthorization": "required", "servicePath": "/api/mgmt.gateway_backup/1.0", "resources": { "Backup": { "methods": { "Backup Status": { "description": "Get the status of Flowgateway backup.", "formats": [ "json" ], "httpmethod": "GET", "path": "backup", "authorization_methods": [ "BASIC", "COOKIE", "OAUTH_2_0" ], "response": { "description": "Flowgateway backup status.", "items":{ "description": "Backup Info", "properties": { "last_successful": { "description": "Information of last successfully taken backup.", "properties": { "host": { "description": "Host name or IP of the remote machine as provided.", "required": true, "type": "string" }, "username": { "description": "User name of the remote machine as provided.", "required": true, "type": "string" }, "message": { "description": "Descriptive info about any WARNING or ERROR occured during backup. In case of \"last_successful\" those errors were not be fatal", "required": false, "type": "string" }, "path": { "description": "Location of the backup directory, same as passed by user in POST request.", "required": true, "type": "string" }, "subdir": { "description": "Location of the backup directory along with backup directory.", "required": true, "type": "string" }, "timeStamp": { "description": "EPOCH time in seconds when backup process started.", "required": true, "type": "string" } }, "id": "LastBackup", "type": "object" }, "running": { "description": "Information of latest started backup, either running or finished(failed or successful)", "properties": { "host": { "description": "Host name or IP of the remote machine as provided.", "required": true, "type": "string" }, "username": { "description": "User name of the remote machine as provided.", "required": true, "type": "string" }, "message": { "description": "Descriptive info about any WARNING or ERROR occured during backup.", "required": false, "type": "string" }, "path": { "description": "Location of the backup directory, same as passed by user in POST request.", "required": true, "type": "string" }, "timeStamp": { "description": "EPOCH time in seconds when backup process started.", "required": true, "type": "string" }, "status": { "description": "Shows \"COMPLETED\" if backup process was succesfull, \"ERROR\" if backup has failed because of some error and \"EXECUTING\" if backup process is still in progress.", "enum": [ "NONE", "EXECUTING", "ERROR", "COMPLETED" ], "required": true, "type": "string" } }, "id": "RunningBackup", "type": "object" } }, "id": "BackupStatus", "type": "object" }, "id": "GetBackup", "type": "array", "example": [ { "last_successful" : { "host": "dummyHost", "message": "", "path": "path/to/store/backup/directory", "subdir": "path/to/store/backup/directory/backup_name", "timeStamp": 1659006593, "username": "mazu" }, "running" : { "host": "dummyHost", "message": "", "path": "path/to/store/backup/directory", "status": "COMPLETED", "timeStamp": 1659006593, "username": "mazu" } } ] }, "authorization": "required" }, "Start new Backup": { "description": "Starts new backup.", "formats": [ "json" ], "httpmethod": "POST", "path": "backup", "authorization_methods": [ "BASIC", "COOKIE", "OAUTH_2_0" ], "request": { "description": "Information required to start and store backup for flowgateway", "properties": { "hostname": { "description": "Host name or IP of the remote machine. If taking backup on localhost then pass \"hostname\" as \"localhost\"", "required": true, "type": "string" }, "username": { "description": "User name of the remote machine. If taking backup on the localhost, no need to pass this field by default \"mazu\" will be used", "required": true, "type": "string" }, "password": { "description": "SSH password to connect to the remote system. If taking backup on localhost then no need to pass the password", "required": true, "type": "string" }, "path": { "description": "Location of the backup directory at remote machine. If taking backup on lcoahost no need to pass the path backup directory gets created at \"/mnt/data/flowgateway-backup\"", "required": true, "type": "string" }, "security_pwd": { "description": "Password to protect the sensitive data in the backup file. Restoring the appliance from this backup will require the user to enter this password.", "required": true, "type": "string" } }, "id": "CreateBackup", "type": "object", "example": { "username": "mazu", "hostname": "dummyHost", "password": "password", "path": "path/to/store/backup/directory", "security_pwd": "EncryptionKey" } }, "authorization": "required" } } }, "Restore": { "methods": { "Restore Status": { "description": "Get the status of Flowgateway Restore.", "formats": [ "json" ], "httpmethod": "GET", "path": "restore", "authorization_methods": [ "BASIC", "COOKIE", "OAUTH_2_0" ], "response": { "description": "Flowgateway restore status.", "properties": { "host": { "description": "Host name or IP of the remote machine.", "required": true, "type": "string" }, "username": { "description": "User name of the remote machine", "required": true, "type": "string" }, "message": { "description": "Descriptive info about any WARNING or ERROR occured during restore. These errors may or may not be fatal", "required": false, "type": "string" }, "path": { "description": "Location of the backup at remote machine, path includes backup directory name which has been considered for restore", "required": true, "type": "string" }, "subdir": { "description": "Location of the backup directory along with backup directory.", "required": true, "type": "string" }, "timeStamp": { "description": "EPOCH time in seconds when restore process started.", "required": true, "type": "string" }, "status": { "description": "Shows \"COMPLETED\" if restore process was succesfull, \"ERROR\" if restore has failed because of some error and \"EXECUTING\" if restore process is still in progress.", "enum": [ "NONE", "EXECUTING", "ERROR", "COMPLETED" ], "required": true, "type": "string" } }, "id": "GetRestore", "type": "object", "example": { "host": "dummyHost", "message": "", "path": "path/to/backup/directory/backup_name", "status": "COMPLETED", "timeStamp": 1659006593, "username": "mazu" } }, "authorization": "required" }, "Start restore": { "description": "Starts restore.", "formats": [ "json" ], "httpmethod": "POST", "path": "restore", "authorization_methods": [ "BASIC", "COOKIE", "OAUTH_2_0" ], "request": { "description": "Information required to restore flowgateway", "properties": { "hostname": { "description": "Host name or IP of the remote machine. If restoring using backup stored locally then pass \"hostname\" as \"localhost\"", "required": true, "type": "string" }, "username": { "description": "User name of the remote machine. If restoring using backup stored locally, no need to pass this field by default \"mazu\" will be used", "required": true, "type": "string" }, "password": { "description": "SSH password to connect to the remote system. If taking backup on localhost then no need to pass the password", "required": true, "type": "string" }, "path": { "description": "Location of the backup directory at remote machine(Path of the directory where all backup gets stored), latest directory will picked as backup directory to restore flowgateway, so make sure no other stuffs are stored in that directory other than backups. If restoring using local backup no need to pass the path, \"/mnt/data/flowgateway-backup\" will be used.", "required": true, "type": "string" }, "security_pwd": { "description": "Password to protect the sensitive data in the backup file. Restoring the appliance from this backup will require the user to enter this password.", "required": true, "type": "string" }, "no_cert": { "description": "Either to decompress cloak_key, snmp, and ntp in the vault.", "required": true, "type": "string" } }, "id": "CreateRestore", "type": "object", "example": { "username": "mazu", "hostname": "dummyHost", "password": "password", "path": "path/to/store/backup/directory", "security_pwd": "EncryptionKey", "no_cert": "false" } }, "authorization": "required" } } } }, "description": "" }