Overview
Resources
Backup: Backup Status
Get the status of Flowgateway backup.
GET https://{device}/api/mgmt.gateway_backup/1.0/backupAuthorization
This request requires authorization.
Response BodyOn success, the server returns a response body with the following structure:
- JSON
[ { "last_successful": { "host": string, "username": string, "message": string, "path": string, "subdir": string, "timeStamp": string }, "running": { "host": string, "username": string, "message": string, "path": string, "timeStamp": string, "status": string } } ] 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" } } ]
Property Name | Type | Description | Notes |
---|---|---|---|
GetBackup | <array of <object>> | Flowgateway backup status. | |
GetBackup[BackupStatus] | <object> | Backup Info | |
GetBackup[BackupStatus].last_successful | <object> | Information of last successfully taken backup. | |
GetBackup[BackupStatus].last_successful. host |
<string> | Host name or IP of the remote machine as provided. | |
GetBackup[BackupStatus].last_successful. username |
<string> | User name of the remote machine as provided. | |
GetBackup[BackupStatus].last_successful. message |
<string> | Descriptive info about any WARNING or ERROR occured during backup. In case of "last_successful" those errors were not be fatal | Optional |
GetBackup[BackupStatus].last_successful. path |
<string> | Location of the backup directory, same as passed by user in POST request. | |
GetBackup[BackupStatus].last_successful. subdir |
<string> | Location of the backup directory along with backup directory. | |
GetBackup[BackupStatus].last_successful. timeStamp |
<string> | EPOCH time in seconds when backup process started. | |
GetBackup[BackupStatus].running | <object> | Information of latest started backup, either running or finished(failed or successful) | |
GetBackup[BackupStatus].running.host | <string> | Host name or IP of the remote machine as provided. | |
GetBackup[BackupStatus].running.username | <string> | User name of the remote machine as provided. | |
GetBackup[BackupStatus].running.message | <string> | Descriptive info about any WARNING or ERROR occured during backup. | Optional |
GetBackup[BackupStatus].running.path | <string> | Location of the backup directory, same as passed by user in POST request. | |
GetBackup[BackupStatus].running. timeStamp |
<string> | EPOCH time in seconds when backup process started. | |
GetBackup[BackupStatus].running.status | <string> | 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. | Values: NONE, EXECUTING, ERROR, COMPLETED |
Backup: Start new Backup
Starts new backup.
POST https://{device}/api/mgmt.gateway_backup/1.0/backupAuthorization
This request requires authorization.
Request BodyProvide a request body with the following structure:
- JSON
{ "hostname": string, "username": string, "password": string, "path": string, "security_pwd": string } Example: { "username": "mazu", "hostname": "dummyHost", "password": "password", "path": "path/to/store/backup/directory", "security_pwd": "EncryptionKey" }
Property Name | Type | Description | Notes |
---|---|---|---|
CreateBackup | <object> | Information required to start and store backup for flowgateway | |
CreateBackup.hostname | <string> | Host name or IP of the remote machine. If taking backup on localhost then pass "hostname" as "localhost" | |
CreateBackup.username | <string> | User name of the remote machine. If taking backup on the localhost, no need to pass this field by default "mazu" will be used | |
CreateBackup.password | <string> | SSH password to connect to the remote system. If taking backup on localhost then no need to pass the password | |
CreateBackup.path | <string> | 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" | |
CreateBackup.security_pwd | <string> | Password to protect the sensitive data in the backup file. Restoring the appliance from this backup will require the user to enter this password. |
On success, the server does not provide any body in the responses.
Restore: Restore Status
Get the status of Flowgateway Restore.
GET https://{device}/api/mgmt.gateway_backup/1.0/restoreAuthorization
This request requires authorization.
Response BodyOn success, the server returns a response body with the following structure:
- JSON
{ "host": string, "username": string, "message": string, "path": string, "subdir": string, "timeStamp": string, "status": string } Example: { "host": "dummyHost", "message": "", "path": "path/to/backup/directory/backup_name", "status": "COMPLETED", "timeStamp": 1659006593, "username": "mazu" }
Property Name | Type | Description | Notes |
---|---|---|---|
GetRestore | <object> | Flowgateway restore status. | |
GetRestore.host | <string> | Host name or IP of the remote machine. | |
GetRestore.username | <string> | User name of the remote machine | |
GetRestore.message | <string> | Descriptive info about any WARNING or ERROR occured during restore. These errors may or may not be fatal | Optional |
GetRestore.path | <string> | Location of the backup at remote machine, path includes backup directory name which has been considered for restore | |
GetRestore.subdir | <string> | Location of the backup directory along with backup directory. | |
GetRestore.timeStamp | <string> | EPOCH time in seconds when restore process started. | |
GetRestore.status | <string> | 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. | Values: NONE, EXECUTING, ERROR, COMPLETED |
Restore: Start restore
Starts restore.
POST https://{device}/api/mgmt.gateway_backup/1.0/restoreAuthorization
This request requires authorization.
Request BodyProvide a request body with the following structure:
- JSON
{ "hostname": string, "username": string, "password": string, "path": string, "security_pwd": string, "no_cert": string } Example: { "username": "mazu", "hostname": "dummyHost", "password": "password", "path": "path/to/store/backup/directory", "security_pwd": "EncryptionKey", "no_cert": "false" }
Property Name | Type | Description | Notes |
---|---|---|---|
CreateRestore | <object> | Information required to restore flowgateway | |
CreateRestore.hostname | <string> | Host name or IP of the remote machine. If restoring using backup stored locally then pass "hostname" as "localhost" | |
CreateRestore.username | <string> | User name of the remote machine. If restoring using backup stored locally, no need to pass this field by default "mazu" will be used | |
CreateRestore.password | <string> | SSH password to connect to the remote system. If taking backup on localhost then no need to pass the password | |
CreateRestore.path | <string> | 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. | |
CreateRestore.security_pwd | <string> | Password to protect the sensitive data in the backup file. Restoring the appliance from this backup will require the user to enter this password. | |
CreateRestore.no_cert | <string> | Either to decompress cloak_key, snmp, and ntp in the vault. |
On success, the server does not provide any body in the responses.
Error Codes
In the event that an error occurs while processing a request, the server will respond with appropriate HTTP status code and additional information in the response body:
{ "error_id": "{error identifier}", "error_text": "{error description}", "error_info": {error specific data structure, optional} }
The table below lists the possible errors and the associated HTTP status codes that may returned.
Error ID | HTTP Status | Comments |
---|---|---|
BAD_REQUEST | 400 | Invalid argument. |
AUTH_REQUIRED | 401 | Authentication required. |
AUTH_INVALID_CREDENTIALS | 401 | 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. |
INTERNAL_ERROR | 500 | Internal error. |