Overview
Resources
Restore: Start new Restore
Get Restore Status.
POST https://{device}/api/npm.profiler_backup/1.0/restore
Authorization
This request requires authorization.
Request BodyProvide a request body with the following structure:
- JSON
{ "security_pwd": string, "exclude_logs": string, "password": string, "path": string, "username": string, "email": string, "include_precomputed": string, "exclude_reports": string, "host": string } Example: []
| Property Name | Type | Description | Notes |
|---|---|---|---|
| ApplyRestore | <object> | Start restoring from a backup image. | |
| ApplyRestore.security_pwd | <string> | Password protecting the sensitive data in the backup file. | Optional |
| ApplyRestore.exclude_logs | <string> | Exclude flow, rollup and identity logs. Default value: true. | Optional |
| ApplyRestore.password | <string> | SSH password to connect to the remote system. | Optional |
| ApplyRestore.path | <string> | Directory path on the remote system. | Optional |
| ApplyRestore.username | <string> | SSH username to connect to the remote system. | Optional |
| ApplyRestore.email | <string> | Notify this email address when the restore is completed. | Optional |
| ApplyRestore.include_precomputed | <string> | Include Precomputed tables. Default value: false. | Optional |
| ApplyRestore.exclude_reports | <string> | Exclude saved reports. Default value: false. | Optional |
| ApplyRestore.host | <string> | Remote system: host name or IP Address. | Optional |
On success, the server does not provide any body in the responses.
Restore: Restore status
Get Restore Status.
GET https://{device}/api/npm.profiler_backup/1.0/restore
Authorization
This request requires authorization.
Response BodyOn success, the server returns a response body with the following structure:
- JSON
{ "last_successful": { "path": string, "username": string, "subdir": string, "timestamp": string, "host": string }, "running": { "path": string, "username": string, "status": string, "message": string, "timestamp": string, "host": string } }
| Property Name | Type | Description | Notes |
|---|---|---|---|
| Restore | <object> | Restore Status. | |
| Restore.last_successful | <object> | Information for last successful restore. | |
| Restore.last_successful.path | <string> | Directory path on the remote system. | |
| Restore.last_successful.username | <string> | SSH username to connect to the remote system. | |
| Restore.last_successful.subdir | <string> | Sub-directory path on the remote system. It's in form: {datatime}_{hr}{min}. | |
| Restore.last_successful.timestamp | <string> | Unix time (epoch) of when the restore was started. | |
| Restore.last_successful.host | <string> | Remote system: host name or IP Address. | |
| Restore.running | <object> | Information for currently running or last running restore. | |
| Restore.running.path | <string> | Directory path on the remote system. | Optional |
| Restore.running.username | <string> | SSH username to connect to the remote system. | Optional |
| Restore.running.status | <string> | Status of currently running or finished restore. | Values: COMPLETED, EXECUTING, ERROR, NONE |
| Restore.running.message | <string> | Error message if the restore has failed. | Optional |
| Restore.running.timestamp | <string> | Unix time (epoch) of when the backup was started. | Optional |
| Restore.running.host | <string> | Remote system: host name or IP Address. | Optional |
Backups: Backup status
Get Backup Status.
GET https://{device}/api/npm.profiler_backup/1.0/backups
Authorization
This request requires authorization.
Response BodyOn success, the server returns a response body with the following structure:
- JSON
{ "last_successful": { "path": string, "username": string, "subdir": string, "timestamp": string, "host": string }, "running": { "path": string, "username": string, "status": string, "message": string, "timestamp": string, "host": string } } Example: { "running": { "status": "EXECUTING", "username": "testing", "timestamp": "1595875578", "host": "bach", "path": "/test/nas/mybackup" }, "last_successful": { "username": "testing", "path": "/test/nas/mybackup", "host": "bach", "subdir": "20200727_1430", "timestamp": "1595874702" } }
| Property Name | Type | Description | Notes |
|---|---|---|---|
| Backup | <object> | Backup Status. | |
| Backup.last_successful | <object> | Information for last successful backup. | |
| Backup.last_successful.path | <string> | Directory path on the remote system. | |
| Backup.last_successful.username | <string> | SSH username to connect to the remote system. | |
| Backup.last_successful.subdir | <string> | Sub-directory path on the remote system. It's in form: {datatime}_{hr}{min}. | |
| Backup.last_successful.timestamp | <string> | Unix time (epoch) of when the backup was started. | |
| Backup.last_successful.host | <string> | Remote system: host name or IP Address. | |
| Backup.running | <object> | Information for currently running or last running backup. | |
| Backup.running.path | <string> | Directory path on the remote system. | Optional |
| Backup.running.username | <string> | SSH username to connect to the remote system. | Optional |
| Backup.running.status | <string> | Status of currently running or finished backup. | Values: COMPLETED, EXECUTING, ERROR, NONE |
| Backup.running.message | <string> | Error message if the backup has failed. | Optional |
| Backup.running.timestamp | <string> | Unix time (epoch) of when the backup was started. | Optional |
| Backup.running.host | <string> | Remote system: host name or IP Address. | Optional |
Backups: Start new Backup
Get Backup Status.
POST https://{device}/api/npm.profiler_backup/1.0/backups
Authorization
This request requires authorization.
Request BodyProvide a request body with the following structure:
- JSON
{ "security_pwd": string, "exclude_logs": string, "password": string, "path": string, "username": string, "email": string, "include_precomputed": string, "exclude_reports": string, "host": string } Example: { "exclude_logs": true, "username": "testing", "security_pwd": "test", "exclude_reports": true, "include_precomputed": false, "host": "bach", "path": "test/nas/mybackup", "password": "testing", "email": "" }
| Property Name | Type | Description | Notes |
|---|---|---|---|
| CreateBackup | <object> | Start new 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. | Optional |
| CreateBackup.exclude_logs | <string> | Exclude flow, rollup and identity logs. Default value: true. | Optional |
| CreateBackup.password | <string> | SSH password to connect to the remote system. | Optional |
| CreateBackup.path | <string> | Directory path on the remote system. | Optional |
| CreateBackup.username | <string> | SSH username to connect to the remote system. | Optional |
| CreateBackup.email | <string> | Notify this email address when the backup is completed. | Optional |
| CreateBackup.include_precomputed | <string> | Include Precomputed tables. Default value: false. | Optional |
| CreateBackup.exclude_reports | <string> | Exclude saved reports. Default value: false. | Optional |
| CreateBackup.host | <string> | Remote system: host name or IP Address. | Optional |
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 |
|---|---|---|
| INTERNAL_ERROR | 500 | Internal server error. |
| AUTH_REQUIRED | 401 | The requested resource requires authentication. |
| AUTH_INVALID_CREDENTIALS | 401 | Invalid username and/or password. |
| AUTH_INVALID_SESSION | 401 | Session ID is invalid. |
| AUTH_EXPIRED_PASSWORD | 403 | The password must be changed. Access only to password change resources. |
| AUTH_DISABLED_ACCOUNT | 403 | Account is either temporarily or permanently disabled. |
| AUTH_FORBIDDEN | 403 | User is not authorized to access the requested resource. |
| AUTH_INVALID_TOKEN | 401 | OAuth access token is invalid. |
| AUTH_EXPIRED_TOKEN | 401 | OAuth access token is expired. |
| AUTH_INVALID_CODE | 401 | OAuth access code is invalid. |
| AUTH_EXPIRED_CODE | 401 | OAuth access code is expired. |
| RESOURCE_NOT_FOUND | 404 | Requested resource was not found. |
| HTTP_INVALID_METHOD | 405 | Requested method is not available for this resource. |
| HTTP_INVALID_HEADER | 400 | An HTTP header was malformed. |
| REQUEST_INVALID_INPUT | 400 | Malformed input structure. |
| URI_INVALID_PARAMETER | 400 | URI parameter is not supported or malformed. |
| URI_MISSING_PARAMETER | 400 | Missing required parameter. |