Generate Device Backup

This API triggers backup for a device. The generated backups are stored in the device inventory under the mentioned backup group name. If a backup group doesn’t exist, a new backup group will be created.

Before you begin

Before attempting to initiate device backup with this API, users must ensure any one of the ACF permission is available:
  • ADC > Backup & Restore > Backup now
This can be checked under Accounts > Role > Authorized Functions.

Request Structure

Endpoint: /adc-device-backup
Type: POST
Sample URL: https://<IP/HostName/TenantName>:<GWPORT>/avxapi/adc-device-backup?gwsource=external

To understand the elements of the sample URL, click here.

Headers:
Content-Type: application/json
Table 1. Input Parameter
Name Description
sessionId

Header

(Mandatory) Specifies the session ID of the user session received after login.

Type: String

Constraints: The session ID is used when username and password are not provided.

username

Header

(Mandatory) Specifies the login username used to access the AppViewX.

Type: String

Constraints: The username, along with the password, is used when the session ID is not provided.

password

Header

(Mandatory) Specifies the login password used to access the AppViewX.

Type: String

Constraints: The password, along with the username, is used when the session ID is not provided.

Content-Type

Header

(Mandatory) Specifies the format of the data in the payload.

Type: String

Constraints: The value of this param must be ‘application/json’.

gwsource

Query

(Mandatory) Specifies the source from which the request is triggered. The options are:
  • web
  • external
Type: String
payload

Body

(Mandatory) Contains all the params to be sent in the request body for the post request. See Payload section for more details.

Payload

Name Description
deviceName

String

(Mandatory) Name of the device added in inventory.

Constraints: It can contain only alphanumeric characters, ‘-’ , ’_’ , ‘.’ , ‘*’ , ‘|’, ‘!’.

backupName

String

(Mandatory) The name of the backup group. A backup group will be created in this name if it isn’t available. If the backup group is already existing in the system then backup will be triggered only if one of the following conditions are met.

  • The existing backup group is of device type. In this case, the device will be added to the backup group if it isn’t available.

  • The existing backup group is of device group type and any of the configured device groups contain the requested device.

Constraints: It can contain only Alphanumeric characters , ‘-’, ‘_’, ‘.’ ,’*’ , ‘:’ , ‘|’ , and space.

passphrase

String

(Optional) PassPhrase key to encrypt the backup.

Constraints: Passphrase is supported only for vendor F5.

Response Structure

  • Status Code: 202 OK
  • Message: Successful
  • Headers:
    • Content-Type: application/json
Name Description
response

String

Success message with device name or failure description in case of error.
message

String

Success message or failure description in case of error.
appStatusCode

String

Application-specific status code for the response. Will be non-null for failure response.
tags More info in case of failure response.

Status Codes

HTTP Status Code appStatusCode Message Possible remediation
202 Accepted - Device backup triggered successfully. -
400 Bad Request ADC_INV_2006 Invalid input. Check if a non-null/non-empty value is given under field ‘payload’.
400 Bad Request ADC_INV_1117 Invalid backup name. Backup name accepts only '_','-','.' as special characters and should not start or end with special characters. Check if the value given under field ‘backupName’ is valid. Backup name accepts only '_','-','.' as special characters and should not start or end with special characters.
400 Bad Request ADC_INV_1116 Backup name cannot be null or empty. Check if a non-null/non-empty value is given under the payload field - ‘backupName’.
400 Bad Request ADC_INV_1092 Device Name cannot be null or empty. Check if a non-null/non-empty value is given under payload field - ‘deviceName’.
400 Bad Request ERR_OBJECT_023 Respective vendor's device is not supported. Action cannot be performed. Request only devices of vendor - A10,AVI,Citrix,F5.
400 Bad Request ERR_OBJECT_023 Respective vendor's device is not supported. Action cannot be performed. Request only devices of vendor - AVI,F5.
400 Bad Request ADC_INV_1115 Mismatch in backup type, cannot add device to existing group as it already has a devicegroup configured.
  • Change the request backupName for which device is configured and not device group.

  • Give a new backupName to be created and the requested device will be added in that backup group.

403 Forbidden ADC_INV_1098 Cannot access resource, permission not available. Check if Read/Read Write permission is available for the requested device.
403 Forbidden ADC_INV_1077 Action cannot be performed on unmanaged device object(s). Check if the requested device is in unmanaged state. If required, the device should be moved to managed state for performing backup.
404 Not Found ADC_INV_1076 Device not available for the given details. Check if the requested device is available in inventory.

Sample Request/Response

Use Case

Get the list of backups available for the device testdevice.

Request URL

https://<IP/HostName/TenantName>:<GWPORT>/avxapi/adc-device-backup

Sample Request
{
  "payload": {
    "backupName": "test",
    "deviceName": "testDevice"
  }
}
Sample Response
{
  "response": "Backup triggered for device testDevice",
  "message": "Device backup triggered successfully.",
  "appStatusCode": null,
  "tags": null,
  "headers": null
}

Reference

Understanding the sample URL:
  • IP/HostName/TenantName: Replace with the actual IP address, hostname, or tenant name based on the specific configuration in AppViewX.
    • IP: A unique identifier assigned to each device connected to a computer network that uses the Internet Protocol for communication

      The IP address will be included in the endpoint URL for an on-prem deployment.

    • HostName: A human-readable label assigned to a device (host) on a network

      The hostname will be included in the endpoint URL for an on-prem deployment.

    • TenantName: An identifier label for a tenant given to indicate which tenant's data the API request will access/modify

      The tenant name will be included in the endpoint URL for a SaaS deployment.

  • GWPORT: AppViewX gateway port

    A gateway port refers to a network port through which data is sent and received to communicate with a gateway in an on-prem deployment.

    Example: 31443

  • avxapi: Path parameter value (static) that is part of the endpoint's URL
  • Endpoint: Endpoint of the API, for example: execute-hook
  • gwsource: Source or origin of a gateway, for example: external.

What's Next