Updated on 2026-01-08 GMT+08:00

Forcibly Promoting a Secondary Node to Primary

API Description

This API is used to promote a secondary node of a replica set, shard node, or config node to primary.

Restrictions

If the primary to secondary synchronization delay is long, this operation may fail.

URI

  • URI format

    POST https://{Endpoint}/v3/{project_id}/instances/{instance_id}/nodes/{node_id}/primary

  • URI example
    Table 1 Parameter description

    Parameter

    Mandatory

    Type

    Description

    project_id

    Yes

    String

    Project ID of a tenant in a region.

    instance_id

    Yes

    String

    Instance ID.

    node_id

    Yes

    String

    ID of the secondary node.

Request Parameters

Table 2 Request header parameters

Parameter

Type

IN

Mandatory

Description

X-Auth-Token

string

header

Yes

User token

  • Example request

    None

Response Parameters

  • Parameter description

    None

  • Example response

    None

Status Code

For details, see Status Code.

Error Code

For details, see Error Code.