Trigger Gateway Failover

Last Updated on : 2023-06-15 05:21:37

Trigger the failover process of a specified gateway.

API address

POST: /v1.0/alps/transfer/trigger

Request parameter

Description of body

Parameter nameTypeINRequiredDescription
sources_gw_idStringbodytrueThe ID of a new gateway.
sn_or_gw_idStringbodytrueThe ID of a faulty gateway.

Return parameter

Parameter nameTypeDescription
resultObjectThe returned result.

Description of result

Parameter nameTypeDescription
source_gw_idStringThe ID of a new gateway.
target_gw_idStringThe ID of a faulty gateway.
jobIdLongThe ID of a specified task.
transfer_statusStringThe status of transfer. Valid values:
  • NONE: no status.
  • DEVICE_CONFIG_INIT: initializing the device file.
  • OS_CONFIG_INIT: initializing the data in the cloud.
  • FINISH: finished.
  • FAILED: failed.

Request example

POST: /v1.0/alps/transfer/trigger
{
  "sourcesGwId": "6c58c30deb348f4*******",
  "snOrGwId": "6ccf98422e7711cde*****"
}

Return example

{
    "result": {
        "transfer_status": "FINISH",
        "source_gw_id": "6c58c30deb348f4*******",
        "target_gw_id": "6ccf98422e7711cde*****",
        "jobId": 240004
    },
    "t": 1640771464052,
    "success": true
}

Error code

For more information, see error code.