Postman Now Supports gRPC
Those who have been following Postman’s latest releases will know that we’ve been branching out from our roots in HTTP. Already, Postman users enjoy the interoperability of using an API platform that also understands WebSockets, Socket.IO, and GraphQL. But we’re not stopping there! The world’s gRPC developers can celebrate: we are excited to announce first-class support for gRPC in Postman is currently in open beta. You can now test your gRPC APIs with Postman v9.7.1 and above.
Upon loading your API’s Protobuf definition (.proto file), Postman will automatically gain an understanding of all services and methods available and generate example payloads for each method, which means you can get testing as quickly as possible. In addition, you can save your Protobuf definitions to the Postman cloud, allowing you to share them with your organization, collaborate, and manage them as part of your API lifecycle.
- Call unary, client-streaming, server-streaming, and bidirectional-streaming gRPC methods
- Enjoy autocomplete while composing messages (powered by the Protobuf definition being used)
- Client-side type-checking and type annotations (Pro tip: while composing your message, hover over a field name to see its Protobuf type)
- Load services using gRPC server reflection
- Automatically generate example messages with a single click
- Send metadata, and view incoming metadata
- Cancel a gRPC method at any time
- Variable interpolation using environments
- Advanced streaming features, such as searching and filtering streamed messages
- Import, author, share, and inspect Protobuf definitions with syntax highlighting and autocomplete
- Synchronize the proto files in your API with your repository on Github, Bitbucket, Gitlab, or Azure Repos
How to get started
Postman supports some pretty advanced workflows, but you can still get started in just a few steps:
In the left-hand sidebar, click New.
Select gRPC Request.
Type the address of your gRPC server into the URL bar.
Click on the Protobuf definition selector to upload your proto file.
Select your desired service and method.
In the near future, you’ll be able to save gRPC requests, so you won’t need to repeat these steps often. All of the servers you care about will be just a click away! Stay tuned for this update.
Postman understands Protobuf
While composing gRPC messages, Postman will provide autocomplete hints, powered by the Protobuf definition that you’re using. This will speed up your testing and help prevent typos, as if you’re coding in your own IDE. You can even hover over a JSON field to discover its Protobuf type (e.g., sint32, bytes, etc.). But it doesn’t stop there: Postman can generate an entire example message with a single click!
As you can see, Postman becomes pretty smart when armed with a Protobuf definition. This is all possible because Protobuf definitions are API schemas. In the future, we hope to provide these same features for other API schemas, like OpenAPI and AsyncAPI.
Some methods in gRPC allow you to stream multiple payloads to the server, or allow the server to send multiple payloads in response. When using a method like this, Postman will automatically show a unified timeline of all events occurring on the connection. This gives you a complete view of what’s happening, which makes debugging a breeze.
At Postman, we really care about making the developer experience seamless (after all, so many of us are developers ourselves!), so the event timeline is packed with functionality. We’ve added some powerful search and filtering options, so you can eliminate noise and hone in on exactly what you’re looking for.
What’s next for gRPC?
gRPC is a powerful new improvement for the Postman API Platform, but there is still much more ahead. Firstly, gRPC support is still in beta, so we’ll be making constant improvements towards integrating gRPC into the rest of the Postman ecosystem. This includes adding documentation, scripting, testing, and every other feature that you love in Postman. Secondly, we know that managing proto files within the API lifecycle is a huge part of using gRPC. Therefore, we’re already hard at work implementing new ways of developing, sharing, and collaborating on them. You can expect things like automatic documentation generation and code generation down the road.
Related: gRPC vs. REST
This powerful addition in Postman would not have been possible without the thousands of upvotes, ideas, and feedback that we received from you—our community. We would love to hear your continued feedback so that we can keep creating and evolving what helps you to build faster and better. We invite you to participate in our GitHub issue tracker link in order to talk to us about ideas and improvements you would like to see.
If you like what we are building here at Postman and want to join our team, we encourage you to explore our open positions.