Help Center/ Document Database Service/ API Reference/ APIs V3.0 (Recommended)/ Database O&M/ Forcibly Promoting a Secondary Node to Primary
Updated on 2025-10-24 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.

Constraints

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

URI

  • URI format

    POST /v3/{project_id}/instances/{instance_id}/nodes/{node_id}/primary

  • URI example
    Table 1 Request Parameters

    Parameter

    Mandatory

    Type

    Description

    X-Auth-Token

    Yes

    String

    User token obtained from IAM.

    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

  • Parameter description

    None

  • Example Requests

    None

Response Parameters

  • Parameter description

    None

  • Example Responses

    None

Status Code

For more information, see Status Code.

Error Code

For more information, see Error Code.