Skip to main content
POST
/
namespace
/
{namespace}
/
bigPeer
/
{big_peer_name}
/
app
/
{app_name}
/
bigPeerReplication
Create Replication
curl --request POST \
  --url http://localhost:{port}/namespace/{namespace}/bigPeer/{big_peer_name}/app/{app_name}/bigPeerReplication \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "<string>",
  "connections": [
    "big-peer-2.ditto.svc.cluster.local:4040"
  ],
  "queriesByCollection": {
    "cars": [
      "true"
    ]
  }
}
'
{
  "name": "<string>",
  "connections": [
    "big-peer-2.ditto.svc.cluster.local:4040"
  ],
  "queriesByCollection": {
    "cars": [
      "true"
    ]
  }
}

Body

application/json
name
string
required

RFC 1123 DNS labels used for most Kubernetes resource names. Some resource types require their names to follow the DNS label standard as defined in [RFC 1123][rfc1123]. This means the name must: * contain at most 63 characters * contain only lowercase alphanumeric characters or '-' * start with an alphanumeric character * end with an alphanumeric character [rfc1123]: https://tools.ietf.org/html/rfc1123

Required string length: 1 - 63
connections
string<uri>[] | null

A set of connection addresses of other Big Peer instances.

Each connection address should point to the Big Peer replication server dedicated to the same app ID.

The set is allowed to be empty. In this case, it's the remote Big Peer's responsibility to initiate the connection.

Example:
["big-peer-2.ditto.svc.cluster.local:4040"]
queriesByCollection
object

Mapping from collection name to a list of DQL subscriptions queries. This contains the data that the Big Peer instance will subscribe to, for the given app, in the context of Big Peer replication. If empty, this Big Peer instance will not subscribe to any data so no data will be replicated to it.

Example:
{ "cars": ["true"] }

Response

Big Peer replication successfully created for app

name
string
required

RFC 1123 DNS labels used for most Kubernetes resource names. Some resource types require their names to follow the DNS label standard as defined in [RFC 1123][rfc1123]. This means the name must: * contain at most 63 characters * contain only lowercase alphanumeric characters or '-' * start with an alphanumeric character * end with an alphanumeric character [rfc1123]: https://tools.ietf.org/html/rfc1123

Required string length: 1 - 63
connections
string<uri>[] | null

A set of connection addresses of other Big Peer instances.

Each connection address should point to the Big Peer replication server dedicated to the same app ID.

The set is allowed to be empty. In this case, it's the remote Big Peer's responsibility to initiate the connection.

Example:
["big-peer-2.ditto.svc.cluster.local:4040"]
queriesByCollection
object

Mapping from collection name to a list of DQL subscriptions queries. This contains the data that the Big Peer instance will subscribe to, for the given app, in the context of Big Peer replication. If empty, this Big Peer instance will not subscribe to any data so no data will be replicated to it.

Example:
{ "cars": ["true"] }