A newer version of this documentation is available.

View Latest

Retrieving Auto-Failover Settings

    +
    Auto-failover setting are retrieved with the GET /settins/autoFailover HTTP method and URI.

    HTTP method and URI

    Use this request to retrieve any auto-failover settings for a cluster. Auto-failover is a global setting for all clusters. Authenticated is required to read this value.

    GET /settings/autoFailover

    Parameters include:

    • enabled: Value is true or false. True if auto-failover is enabled; False if it is not.

    • timeout: Seconds that must elapse before auto-failover executes on a cluster.

    • count [0|1]: Value is 0 or 1. It shows whether any node in a cluster can be automatically failed-over.

      After one auto-failover occurs, the count is set to 1 and Couchbase server does not perform auto-failover for the cluster again unless the count is reset to 0. To failover more than one node at a time in a cluster, perform a manual failover.

    Syntax

    Curl request syntax:

    curl -u [admin]:[password] http://[localhost]:8091/settings/autoFailover

    Example

    Curl request example

    curl -u Administrator:password http://10.5.2.54:8091/settings/autoFailover

    Response

    If successful Couchbase Server returns any auto-failover settings for the cluster:

    {
        "count": 0,
        "enabled": false,
        "timeout": 120
    }

    Response codes

    Possible errors include:

    HTTP/1.1 401 Unauthorized
    This endpoint isn't available yet.
    GET /settings/autoFailover HTTP/1.1
    Host: localhost:8091
    Authorization: Basic YWRtaW46YWRtaW4=
    Accept: */*
    HTTP/1.1 200 OK
    Content-Type: application/json
    Content-Length: nnn
    { "enabled": false, "timeout": 30, "count": 0 }