Relocate devices between nodes

Relocates devices between nodes in distributed architectures. For more details, see Relocate devices.

Note: Before relocating devices, disable monitoring and analysis for those devices in AFA. For details, see Schedule analysis and Configure real-time monitoring.

Resource Name: /api/v1/device/relocation

Request Method: POST

Request URL Parameters:

Element

Type

Description

relocationTimeFrameInMinutes

Optional

Integer

Time limit, in minutes, after which you want the relocation process to time-out if not completed.

0 = Unlimited.

Note: Devices are fully relocated as soon as they pass a connectivity check.

If a configured time limit is reached, and not all devices have been relocated, any subsequent devices are left on the source nodes.

Devices that were relocated remain on the new, target, node, and are not reverted.

runDeviceAction

Optional

String

One of the following:

  • Enabled. Monitoring, analysis, and syslog messages are enabled for all relocated devices
  • Disabled. Monitoring, analysis, and syslog messages are disabled for all relocated devices. This helps to reduce CPU load.
  • NO_ACTION. Retains current configuration for each setting.

sourceNode

Mandatory

String

Name of the current device node, as listed on the Architecture tab of the AFA Administration area.

targetNode

Mandatory

String

Name of the node you want to relocate your devices to. Check the names of the nodes listed on the Architecture tab of the AFA Administration area.

treeNames

Mandatory when the source is an ASMS Central Manager.

String

One of the following:

  • For relocating from a Central Manager, the name of the device group you want to relocate.
  • For relocating from a Remote Agent, the name of the device group you want to relocate. This group must include only Remote Agent devices.

    For example, you may have created a group of devices before starting your relocation process. For more details, see Relocate specific devices.

If the source is a Remote Agent, and this value is empty, all devices on the source Remote Agent are relocated.

Note: This parameter is defined as the device name listed in the firewall_data.xml file. This name may be different than the one listed in the device tree.

ignoreConnectivityCheck optional boolean

To relocate devices whose connectivity check failed, despite the failure (not recommended).

true: Force relocation of devices that are down when needed

false: (default) Devices without connectivity are not relocated

Response parameters

Element

Type

Description

uuid string The UUID of the process. You can use the returned UUID parameter value to check the progress of the device relocation in the GET /api/v1/device/relocation method of the Device Relocation Resource Group and to stop the currently running device relocation process in the DELETE /api/v1/device/relocation method of the Device Relocation Resource Group.

Response:

Code

Description

200

Operation completed successfully

400

Bad request

401

Unauthorized

423

Device relocation is already running

Request example

curl -X POST --cookie "PHPSESSID=24l2tk7p8skuk4bbv20krqe7s7" -d '{ "treeNames":["10_20_26_1"], "sourceNode":"RA1", "targetNode":"RA2" }'
--header "Content-Type: application/json" 0:8080/afa/api/v1/device/ relocation

Response example

"bd98c84e-f88c-42b4-899c-9a7584a75951"