REST API  16
REST API for Luna Network HSMs
POST /api/lunasa/config/backups/{backupid}/actions/{actionid}

POST /api/lunasa/config/backups/{backupid}/actions/{actionid}

This resource will perform specified action on a backup file stored in local file system.

User Privileges

Users with the following role privileges can perform this command:

  • admin

Parameters

actionid

Specifies the action.
Valid values :

  • restore
    1. Restores the configuration of the selected service(s) from a backup file.
    2. The service(s) must be stopped before restoring their configuration.
    3. It does NOT restore the HSM and Partition configurations.
    4. You must reboot the appliance for the changes to take effect.
    5. Please check the new configurations BEFORE rebooting or restarting the services.
    6. It automatically creates a backup file of the current configurations before restoring a previous configuration. You can restore the previous configurations if the new settings are not acceptable.

Use: Required

JSON Schema:

    Object
    type:string

service

Specifies the name of the service.
Valid values: network,ssh,ntls,syslog,ntp,snmp,users,system,webserver,cluster,ismigration,ctc,all.

Note:

If the service being restored is 'webserver'(or if 'all'), the webserver service is restarted on it own. Hence, a new session must be intiated for further communication.

Use: Required

JSON Schema:

    Object
    type:string

Responses

204

Success

400

FRAMEWORK_BAD_REQUEST

We failed to parse your request.

400

SYSCONF_CONFIG_SERVICE_NAME_INVALID

Specified service name is invalid.

400

SYSCONF_CONFIG_FILE_NAME_MISSING

Missing backup file name.

400

SYSCONF_CONFIG_VERSION_NOT_SUPPORTED

Backup file version cannot be restored in the current version.

400

SYSCONF_CONFIG_BACKUP_FILE_NOT_COMPLETE

Provided backup file is not complete.

400

SYSCONF_CONFIG_BACKUP_FILE_NOT_COMPATIBLE

Provided backup file is not compatible for the service specified.Please use a backup file for the same service being restored or a backup file with all services.

400

SYSCONF_CONFIG_NTLS_SERVICE_RUNNING

NTLS must be stopped before requesting this resource.

409

SYSCONF_CONFIG_NTP_SERVICE_RUNNING

NTP must be stopped before requesting this resource.

400

SYSCONF_CONFIG_SSH_SERVICE_RUNNING

SSH must be stopped before requesting this resource.

400

SYSCONF_CONFIG_SNMP_SERVICE_RUNNING

SNMP must be stopped before requesting this resource.

400

SYSCONF_CONFIG_FAILED_TO_RESTORE

Failed to restore the configuration from specified backup file.

403

FRAMEWORK_CRITICAL_OPERATION_RUNNING

Critical Operation currently in Progress.

404

SYSCONF_CONFIG_FILE_NOT_EXIST

Specified backupid is invalid.

Example Request

To restore the backup file

    POST
    https://1.2.3.4:8443/api/lunasa/config/backups/{backupid}/actions/restore
    {
        "service": "all"
    }

Example Response

    {
    }