A datasource within a cluster could either refer to the entire cluster service itself, or a specific host.
To list the status of the datasource at the cluster level, the following call can be used
GET https://localhost:8090/api/v2/manager/status/service/usa/datasource/west
This will return the following DatasourceStatusPayload
{
"payloadType": "DatasourceStatusPayload",
"payloadVersion": "1",
"payload": {
"name": "west",
"service": "usa",
"role": "master",
"state": "ONLINE",
"connections": {
"active": 0,
"created": 0
},
"seqno": -1,
"appliedLatency": 1.254,
"relativeLatency": 0.0,
"standby": false,
"archive": false,
"witness": false
}
}
Similarly, to list the status of the datasource at the host level, the following call can be used
GET https://localhost:8090/api/v2/manager/status/service/west/datasource/db1
This will return the following DatasourceStatusPayload
{
"payloadType": "DatasourceStatusPayload",
"payloadVersion": "1",
"payload": {
"name": "db1",
"service": "west",
"role": "master",
"state": "ONLINE",
"connections": {
"active": 42,
"created": 128
},
"seqno": 12856,
"appliedLatency": 0.745,
"relativeLatency": 1.647,
"standby": false,
"archive": false,
"witness": false
}
}