gRPC API
Overview
plumber
server can be controlled via its gRPC protobuf API.
The API enables you to tweak plumber settings at runtime, along with managing connections, relays, tunnels and more.
gRPC method documentation: https://buf.build/batchcorp/plumber-schemas/docs/main/protos
Protobuf schemas: https://github.com/batchcorp/plumber-schemas
Auth
Nearly every gRPC method will require authentication.
You can expect to have to add this to the request body:
Create a Connection
In order to create a relay or a tunnel, you will first need to create a connection.
The connection is representative of the backend you are planning on using to relay data from or tunnel data to. It will contain details such as:
Address and port of the backend/message bus/database server
Credentials for accessing the resource
TLS/SSL settings
A create request will look something like this:
The response will include a connection_id
that you will have to use when creating a relay or tunnel.
Create a Relay
To create a relay, use the CreateRelay
method and pass something like this:
The API will return a relay_id
that can then be used for further controlling the relay.
Create a Tunnel
To create a tunnel, use the CreateTunnel
method and pass something like this:
The API will return a tunnel_id
that can be used for further controlling the tunnel.
For a complete list of all available methods, request and response types, please refer to the API docs.
Last updated