Skip to content

Importing gRPC (.proto or reflection)

Two routes lead to a gRPC tree in Restorm.

File ▸ Import (Ctrl+I) then the .proto file. Pasted content is recognised too (the presence of syntax = "proto…", or of a service with rpcs).

ElementWhat Restorm makes of it
Each serviceA folder
Each rpcA gRPC request
The streaming flagsThe call type (unary, server-stream, client-stream, bidirectional-stream)
The input messageA pre-filled sample message, built from the message’s shape
Descriptions and typesThe API documentation and the enumerations

From the gRPC import modal, give the host:port address of a running server. Restorm queries its reflection service and builds the same tree it would from a .proto.

The "gRPC server (reflection)" modal: the host address field, the Use TLS option and the table of optional authentication metadata

Two notable advantages:

  1. It works offline afterwards. The descriptor set obtained is stored on every request created: the calls work even if the reflection server is no longer reachable.
  2. It can be re-synced. Reconnecting to the same address is recognised as an update of the existing tree, not as a new import. A Refresh from reflection button also exists on the request tab.

If the server does not implement reflection, Restorm says so explicitly: import the .proto instead.

gRPC is one of the re-syncable formats, in both modes. See Updating from the source.