curl --request GET \
--url https://cockroachlabs.cloud/api/v1/physical-replication-streams/{id} \
--header 'Authorization: Bearer REPLACE_BEARER_TOKEN'{
"activated_at": "2006-01-03T15:04:15Z",
"created_at": "2006-01-02T15:04:05Z",
"failover_at": "2006-01-03T15:04:05Z",
"id": "00000000-0000-0000-0000-000000000001",
"primary_cluster_id": "00000000-0000-0000-0000-000000000002",
"replicated_time": "2006-01-03T15:04:04Z",
"retained_time": "2006-01-02T15:04:06Z",
"standby_cluster_id": "00000000-0000-0000-0000-000000000003",
"status": "COMPLETED"
}{
"code": 123,
"details": [
{
"@type": "<string>"
}
],
"message": "<string>"
}Get a physical replication stream
Can be used by the following roles assigned at the organization, folder or cluster scope:
- CLUSTER_ADMIN
- CLUSTER_OPERATOR_WRITER
- CLUSTER_DEVELOPER
curl --request GET \
--url https://cockroachlabs.cloud/api/v1/physical-replication-streams/{id} \
--header 'Authorization: Bearer REPLACE_BEARER_TOKEN'{
"activated_at": "2006-01-03T15:04:15Z",
"created_at": "2006-01-02T15:04:05Z",
"failover_at": "2006-01-03T15:04:05Z",
"id": "00000000-0000-0000-0000-000000000001",
"primary_cluster_id": "00000000-0000-0000-0000-000000000002",
"replicated_time": "2006-01-03T15:04:04Z",
"retained_time": "2006-01-02T15:04:06Z",
"standby_cluster_id": "00000000-0000-0000-0000-000000000003",
"status": "COMPLETED"
}{
"code": 123,
"details": [
{
"@type": "<string>"
}
],
"message": "<string>"
}Authorizations
Response
A successful response.
status describes the desired status of the replication stream.
- STARTING: signifies that a stream is starting
- REPLICATING: signifies that the standby is receiving the primary's changes. Failover is available once the stream reports a 'replicated_time'.
- FAILING_OVER: used to trigger a failover, or to signify that a failover is occurring.
- COMPLETED: signifies that a failover is complete.
- CANCELED: signifies that a stream is canceled.
STARTING, REPLICATING, FAILING_OVER, COMPLETED, CANCELED failover_at is the time for which failover is requested. If the user sets the status to 'FAILING_OVER' but omits failover_at, the failover time will default to the latest consistent replicated time. Otherwise, the user can pick a time up to one hour in the future to schedule a failover, or a time in the past to restore the cluster to a recent state. This field will be present if the user has requested failover at a future time.
replicated_time is the timestamp indicating the point up to which data has been replicated. The window between replicated_time and the actual time is known as replication lag. This field is absent until the standby has copied the primary's existing data. Failover is available only once it is present.

