Updated on 2026-05-30 GMT+08:00

Switching a Route (a V3 API)

Function

This API is used to switch a route.

URI

PUT /v3/{project_id}/instances/{instance_id}/databases/{db_name}/migration/jobs/{job_id}/route-switch

Table 1 URI parameters

Parameter

Mandatory

Type

Description

project_id

Yes

String

Project ID of a tenant in a region

instance_id

Yes

String

DDM instance ID

db_name

Yes

String

Schema name

job_id

Yes

String

Workflow ID. For details about how to obtain the value of this parameter, see Configuring Shards (a V3 API).

Request Parameters

Table 2 Request header parameters

Parameter

Mandatory

Type

Description

X-Auth-Token

Yes

String

User token.

The token can be obtained by calling the IAM API used to obtain a user token. The value of X-Subject-Token in the response header is the user token.

Response Parameters

Status code: 200

OK

Status code: 400

Table 3 Response body parameters

Parameter

Type

Description

error_code

String

Error code

error_msg

String

Error message

Status code: 500

Table 4 Response body parameters

Parameter

Type

Description

error_code

String

Error code

error_msg

String

Error message

Example Request

Configuring route switching
PUT https://{endpoint}/v3/74f57817ca8f42e19318eb0e0ad41d18/instances/733c7e8d73a54c27b8308ec784a8be8cin09/databases/db_e487/migration/jobs/10501cd3-0c19-498b-9ba4-8935ed447542/route-switch

Example Response

Status code: 200

None

Status code: 400

Bad request

{
  "error_msg" : "Parameter error.",
  "error_code" : "DBS.280001"
}

Status code: 500

Server error

{
  "error_msg" : "Parameter error.",
  "error_code" : "DBS.280001"
}

Status Codes

Status Codes

Description

200

OK

400

Bad request

500

Server error

Error Codes

For details, see Error Codes.