A newer version of this documentation is available.

View Latest

Analytics REST API

  • reference
    +

    Analytics provides REST APIs that a client application can use to invoke services using simple HTTP methods. A catalog of available REST resources and requests is provided below.

    The Analytics REST APIs can be called on any node running the analytics service. By default, the Analytics REST endpoints below listen on port 8095, or 18095 for secure access. Note that the Settings API listens on port 8091, or 18091 for secure access.

    For the examples, we assume that:

    • You’re running a Couchbase node with the Analytics service using the default port on localhost.

    • You authenticate as a user with the "Full Administrator" role with the user name "Administrator" and the password "password".

    APIs in this Section

    For a list of the methods and URIs covered in these pages, see the tables below.

    Analytics Query API

    HTTP Method URI Documented at

    POST

    /analytics/service

    Query Service

    GET

    /analytics/service

    Read-Only Query Service

    POST

    /query/service

    Query Service (Alternative)

    GET

    /query/service

    Read-Only Query Service (Alternative)

    Analytics Admin API

    HTTP Method URI Documented at

    DELETE

    /analytics/admin/active_requests

    Request Cancellation

    GET

    /analytics/cluster

    Cluster Status

    POST

    /analytics/cluster/restart

    Cluster Restart

    POST

    /analytics/node/restart

    Node Restart

    GET

    /analytics/status/ingestion

    Ingestion Status

    Analytics Config API

    HTTP Method URI Documented at

    GET

    /analytics/config/service

    View Service-Level Parameters

    PUT

    /analytics/config/service

    Modify Service-Level Parameters

    GET

    /analytics/config/node

    View Node-Specific Parameters

    PUT

    /analytics/config/node

    Modify Node-Specific Parameters

    Analytics Settings API

    HTTP Method URI Documented at

    GET

    /settings/analytics

    View Analytics Settings

    POST

    /settings/analytics

    Modify Analytics Settings

    HTTP Method URI Documented at

    POST

    /analytics/link/{scope}/{name}

    Create Link

    GET

    /analytics/link/{scope}/{name}

    Query Link

    PUT

    /analytics/link/{scope}/{name}

    Edit Link

    DELETE

    /analytics/link/{scope}/{name}

    Delete Link

    GET

    /analytics/link

    Query All Links

    GET

    /analytics/link/{scope}

    Query Scope Links

    Analytics Library API

    HTTP Method URI Documented at

    GET

    /analytics/library

    Read All Libraries

    POST

    /analytics/library/{scope}/{library}

    Create or Update a Library

    DELETE

    /analytics/library/{scope}/{library}

    Delete a Library

    Legacy APIs

    The following methods are deprecated, and will be removed in a future release.

    HTTP Method URI Documented at

    GET

    /analytics/node/agg/stats/remaining

    Pending Mutations (Deprecated)

    POST

    /analytics/link

    Create Link (Alternative)

    PUT

    /analytics/link

    Edit Link (Alternative)

    DELETE

    /analytics/link

    Delete Link (Alternative)