Metrics REST API

    +

    Description of the Sync Gateway Metrics Rest API
    Use the API explorer to find out more about Sync Gateway’s endpoints by functionality.

    Introduction

    Sync Gateway makes collecting performance data easy and secure by providing a Metrics REST API. This API, separate from both the Public and Admin REST APIs, is available by default on port 4986 — see Configuration for how to change this, if needed. It exposes Sync Gateway’s stats on two endpoints, which deliver the same data in one of two formats:

    Configuration

    The Metrics REST API is enabled by default on port 4986. To change this you need to edit your sync-gateway-config.json configuration file.

    Locate the metricsInterface setting and define the Sync Gateway URL and the port you want the API served on (for example: 4986) — see: Example 1.

    Example 1. Setting metrics interface endpoint
    "metricsInterface": "127.0.0.1:4986" (1)
    1 Here we define the Sync Gateway URL and the port (4986 in this instance) that we require the Metrics REST API to be served on.

    API Explorer

    You can browse the API using the explorer below. The explorer groups all the endpoints by functionality. Just click a label to expand the endpoints. You can also generate curl requests if required, for each endpoint.