Method Path Description
GET /v1/bdbs/{bdb_uid}/sync_source_stats Get stats for all syncer sources
GET /v1/bdbs/{bdb_uid}/sync_source_stats/{uid} Get stats for a specific syncer instance

Get all syncer source stats

GET /v1/bdbs/{bdb_uid}/sync_source_stats

Get stats for all syncer sources of a local database.

Required permissions

Permission name
view_bdb_stats

Request

Example HTTP request

GET /bdbs/1/sync_source_stats?interval=5min 

Request headers

Key Value Description
Host cnm.cluster.fqdn Domain name
Accept application/json Accepted media type

URL parameters

Field Type Description
bdb_uid integer The unique ID of the local database.

Query parameters

Field Type Description
interval string Time interval for which we want stats: 1sec/10sec/5min/15min/1hour/12hour/1week (optional)
stime ISO_8601 Start time from which we want the stats. Should comply with the ISO_8601 format (optional)
etime ISO_8601 Optional end time after which we don’t want the stats. Should comply with the ISO_8601 format (optional)

Response

Returns statistics for all syncer sources.

Example JSON body

{ "sync_source_stats": [
     {
         "intervals": [
             {
                 "etime": "2017-10-22T19:30:00Z",
                 "ingress_bytes": 18528,
                 "ingress_bytes_decompressed": 185992,
                 "interval": "5min",
                 "local_ingress_lag_time": 0.244,
                 "stime": "2017-10-22T19:25:00Z"
             },
             {
                 "etime": "2017-10-22T19:35:00Z",
                 "ingress_bytes": 18,
                 "ingress_bytes_decompressed": 192,
                 "interval": "5min",
                 "local_ingress_lag_time": 0.0,
                 "stime": "2017-10-22T19:30:00Z"
             }
         ],
         "uid": "1"
     }
   ]
 }

Status codes

Code Description
200 OK No error
404 Not Found Database does not exist.

Get syncer instance stats

GET /v1/bdbs/{bdb_uid}/sync_source_stats/{int: uid}

Get stats for a specific syncer (Replica Of) instance.

Required permissions

Permission name
view_bdb_stats

Request

Example HTTP request

GET /bdbs/1/sync_source_stats/1?interval=5min 

Request headers

Key Value Description
Host cnm.cluster.fqdn Domain name
Accept application/json Accepted media type

URL parameters

Field Type Description
bdb_uid integer The unique ID of the local database.
uid integer The sync_source uid.

Query parameters

Field Type Description
interval string Time interval for which we want stats: 1sec/10sec/5min/15min/1hour/12hour/1week (optional)
stime ISO_8601 Optional start time from which we want the stats. Should comply with the ISO_8601 format (optional)
etime ISO_8601 Optional end time after which we don’t want the stats. Should comply with the ISO_8601 format (optional)

Response

Returns statistics for a specific syncer instance.

Example JSON body

{
    "intervals": [
        {
            "etime": "2017-10-22T19:30:00Z",
            "ingress_bytes": 18528,
            "ingress_bytes_decompressed": 185992,
            "interval": "5min",
            "local_ingress_lag_time": 0.244,
            "stime": "2017-10-22T19:25:00Z"
        },
        {
            "etime": "2017-10-22T19:35:00Z",
            "ingress_bytes": 18,
            "ingress_bytes_decompressed": 192,
            "interval": "5min",
            "local_ingress_lag_time": 0.0,
            "stime": "2017-10-22T19:30:00Z"
        }
    ],
    "uid": "1"
}

Status codes

Code Description
200 OK No error
404 Not Found Database or sync_source do not exist.