Help Center/ GeminiDB/ API Reference/ APIs v3 (Recommended)/ Instances/ Performing a Primary/Standby Switchover
Updated on 2025-07-02 GMT+08:00

Performing a Primary/Standby Switchover

Function

This API is used to switch the primary and standby of a GeminiDB Redis instance.

Constraints

This API supports the following instance type:

  • Primary/Standby GeminiDB Redis instance

URI

PUT https://{Endpoint}/v3/{project_id}/instance/{instance_id}/switchover

Table 1 URI parameters

Parameter

Mandatory

Type

Description

project_id

Yes

String

Explanation:

Project ID of a tenant in a region. To obtain this value, see Obtaining a Project ID.

Constraints:

N/A

Values:

N/A

Default value:

N/A

instance_id

Yes

String

Explanation:

Instance ID.

Constraints:

N/A

Values:

N/A

Default value:

N/A

Request Parameters

Table 2 Request header parameters

Parameter

Mandatory

Type

Description

X-Auth-Token

Yes

String

Explanation:

User token.

Constraints:

N/A

Values:

N/A

Default value:

N/A

Response Parameters

Status code: 202

Table 3 Response body parameters

Parameter

Type

Description

job_id

String

Explanation:

Task ID.

Values:

N/A

Example Request

PUT https://{Endpoint}/v3/2900b7b8d03e4619b8db8d43bc6234ee/instance/f42ecf40870644b288884742bff6ef51in12/switchover

Example Response

Status code: 202

Accepted.

{ 
   "job_id" : "528747ac-c30b-4904-a4ed-806c6943ec96" 
 }

Status Codes

For details, see Status Codes.

Error Codes

For details, see Error Codes.