Streams Replication Manager Service REST API

The Streams Replication Manager Service REST API can be used to monitor your replication workloads. Learn about the endpoints, endpoint versions, and the data that the endpoints expose.

The processed, aggregated, and in part derived metrics produced by the Streams Replication Manager (SRM) Service are available for consumption through the various endpoints of the SRM Service REST API. Exposed metrics are aggregated over a predefined set of samples and a sliding time window. In addition to aggregated values, the endpoints also return the statistical minimum, maximum, average, and sum of the corresponding sample.

Accessing the API and its endpoints

If you have access to a running instance of SRM, you can find a comprehensive list of the endpoints, their descriptions, as well as example responses for all endpoints on the SRM Service REST API’s Swagger UI.

To access the Swagger UI, select the Streams Replication Manager service in Cloudera Manager and go to Web UI > SRM Service Swagger UI [***CLUSTER NAME***]. Alternatively, you can also view the Streams Replication Manager REST API Reference for a comprehensive list of the endpoints.

Endpoint versions

REST API endpoints are grouped based on their version. There exists V2 and V1 (legacy) endpoints. Both V1 and V2 endpoints are similar in content and role. Additionally, there is considerable overlap in functionality. However, V1 is provided only for backward compatibility. As a result, Cloudera recommends that you always use V2 endpoints when monitoring SRM. V2 is more sophisticated, offers more endpoints, and allows the target clusters to be specified by the user. The same is not true for V1 endpoints where the target cluster is fixed. It is always the target cluster of the SRM Service instance that serves the REST call.

Internal and non-internal endpoints

In addition to version, the endpoints are also grouped based on whether they are internal or not. Cloudera recommends that you always use non-internal endpoints for monitoring. Internal endpoints are reserved for internal use by SRM. For example, if the Remote Querying feature is set up in your deployment, the SRM Service instances in the deployment use the internal endpoints to query each other's metrics.

SMM integration

The endpoints made available on the API can also be used by services that integrate with SRM. Streams Messaging Manager (SMM), for example, queries the replication metrics using the endpoints and makes the data it collected available for consumption on the Replications page of the SMM UI. In other words, the replication insights that you can view in SMM are based on the metrics that SRM produces. For more information on how SMM integrates with SRM as well as the Replications page, see Monitoring Kafka Cluster Replications using Streams Messaging Manager.