Updated on 2022-08-05 GMT+08:00

Obtaining Commands from SMS

Function

This API is called by the migration Agent to obtain commands sent from the SMS server to the migration Agent on a specified source server.

This API is automatically called by the migration Agent to obtain migration command sent by the SMS server. You do not need to make calls to this API.

URI

GET /v1/sms/sources/{source_id}/command

For details about the parameters, see Table 1.
Table 1 Parameter description

Parameter

Mandatory

Description

source_id

Yes

Specifies the source server ID.

Request

None

Response

Response parameters

For details about the response parameters, see Table 2.

Table 2 Response parameters

Parameter

Type

Description

command_name

String

Specifies the command name. The options can be START, STOP, DELETE, and SYNC.

command_param

Json

Specifies the command parameters. For details, see Table 3.

Table 3 command_param information

Parameter

Type

Description

key1

String

Specifies the parameters to be used.

key2

String

Specifies the parameters to be used.

Example

  • Example request

    None

  • Example response
    • Starting a migration task
      {
      "command_name":"START",
      "command_param":{
      "task_id":"2c0689c860ad4728a497c91ec0844384"
      }
      }
    • Stopping a migration task
      {
      "command_name":"STOP",
      "command_param":{
      "task_id":"2c0689c860ad4728a497c91ec0844384"
      }
      }
    • Synchronizing data after a migration task is complete
      {
      "command_name":"SYNC"
      "command_param":{
      "task_id":"2c0689c860ad4728a497c91ec0844384"
      }
      }
    • Deleting a migration task
      {
      "command_name":"DELETE"
      "command_param":{
      "task_id":"2c0689c860ad4728a497c91ec0844384"
      }
      }
    • Collecting migration logs to a specified OBS bucket
      {
      "command_name":"UPLOAD_LOG"
      "command_param":{
      "bucket":"logbucket"
      "object":""
      }
      }

Status Code

See Status Codes.

Error Code

See Out-of-Date Error Codes.