Postman Now Supports gRPC

Avatar

Don’t forget to register here to attend POST/CON 24, Postman’s biggest API conference ever: April 30 to May 1, 2024 in San Francisco.

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.

Feature overview

  • 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:

  1. In the left-hand sidebar, click New.

  2. Select gRPC Request.

  3. Type the address of your gRPC server into the URL bar.

  4. Click on the Protobuf definition selector to upload your proto file.

  5. Select your desired service and method.

  6. Click Invoke.

How to invoke a gRPC method using Postman

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!

Autocomplete and type annotations in gRPC

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.

Streaming methods

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.

How to use streaming methods in gRPC

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.

Try Postman now

What do you think about this feature? Tell us in a comment below. You can also give product feedback through our Community forum and GitHub repository.

Comment

Your email address will not be published. Required fields are marked *


This site uses Akismet to reduce spam. Learn how your comment data is processed.

41 thoughts on “Postman Now Supports gRPC

  • Avatar

    Grpc supports discovery endpoint (its called reflection service) and its standardized. Instead of uploading and keeping proto files in sync, it would be great to be able to provide just the URL of the grpc service that implements reflection protocol.

    • Avatar

      This is now supported in the most recent version of Postman (9.10.0)!

  • Avatar

    Running Postman 9.8.3 and don’t see gRPC features.

    • Avatar

      Hi Lance, could you explain which specific features you’re not seeing? Also, are you using the Postman app, or the Desktop Agent?

  • Avatar

    How can we use protobuf wrapper ? like I have a proto schema which uses google.protobuf.StringValue and google.protobuf.FloatValue types, so how can I set values for these fields in post mane messages, when trying to pass normal string for google.protobuf.StringValue type, I am getting “Error: There are errors in your composed message” Error. Can you help with this ? Thanks.

    • Avatar

      Hi Gaurang,

      Postman doesn’t treat these wrapper types any differently from other types. As you can see here, StringValue is just a message type with a “value” field of type “string”:

      { "value": "my string" }

  • Avatar

    Ok, I see it now. I wasn’t logged in. Apparently this feature only shows up if you’re logged in.

  • Avatar

    Hey
    Do you see Postman extending newman capabilities to test gRPC ?
    Are we able to export collections that have gRPC ?

    • Avatar

      Collection support is definitely coming soon. Extending newman with gRPC will probably happen, but I don’t have as much foresight there.

  • Avatar

    Glad to see this support, are there any plans to leverage comments in the protocol buffers themselves in the Postman UI versus having to add documentation separately in Postman? e.g. have them show up next to field names when creating a request, or show the protocol buffer service level comment as an API summary. Thanks!

  • Avatar

    Tried to use the reflection service on our service but it didn’t work, got : `13 INTERNAL: Received RST_STREAM with code 2 triggered by internal client error: Protocol error`.

    Same service works fine with reflection with Kreya.app or gRPCui tools.

    • Avatar

      This is a known issue, and we are working on a fix 🙂

  • Avatar

    Is there a way to save it, every time i have a gRPC call set up on postman and restart it disappears

    • Avatar

      This feature will be coming soon! Stay tuned!

  • Avatar

    This is exciting! I’ve tried to find support in Postman for decoding protobuf responses (for vanilla HTTP requests, not gRPC) and have not found anything. Am I just looking in the wrong places or is support for encoding request/decoding protobuf response bodies something you’d consider adding in the future? Thanks!

  • Avatar

    This feature could be really useful, however it seems to be a little buggy – I have a server hosting ~10 gRPC services; when connecting using server reflection, it seems only the last service (alphabetically) is shown in Postman.
    It also shows a service that is referenced by one of the protos, but that isn’t actually registered as a service on that server.
    I know the server is set up correctly as I am able to list all of the services using grpcurl.

    • Avatar

      This feedback is actually very helpful. Keep in mind that gRPC support is currently in beta, so issues like this are expected. We’ll get these fixes rolled out ASAP.

  • Avatar

    Discovered an issue with gRPC servers using “Http1AndHttp2” protocol endpoint default (for supporting .NET gRPC-WEB). You get an error I’ve seen listed here before:

    13 INTERNAL: Received RST_STREAM with code 2 triggered by internal client error: Protocol error

  • Avatar

    Is there support for google.protobuf.Int32Value? google.protobuf.Timestamp works just fine, but this particular type seems to fail.

    Error: no such Type or Enum ‘.google.protobuf.Int32Value’ in

  • Avatar

    I get an error when I try to use server reflection. I don’t think there is an error on the server side, because server reflection works perfectly with grpcui.

    The error is the following: “duplicate name ‘constructor’ in Type Variant”.

    The file it refers to: https://github.com/digital-asset/daml/blob/main/ledger-api/grpc-definitions/com/daml/ledger/api/v1/value.proto

    The `Variant` type doesn’t have duplicate field name `constructor`:

    message Variant {

    // Omitted from the transaction stream when verbose streaming is not enabled.
    // Optional when submitting commands.
    Identifier variant_id = 1;

    // Determines which of the Variant’s alternatives is encoded in this message.
    // Must be a valid NameString.
    // Required
    string constructor = 2;

    // The value encoded within the Variant.
    // Required
    Value value = 3;
    }

  • Avatar

    no option to edit proto file..how can i edit a proto file after i created it in post man?

  • Avatar

    After the first time I specify the local proto file to import into postman, it works fine. Bug when I change the proto file in my later dev work , for example add more parameter to a method, I want Postman auto watch the protofile and refresh the lastest version of proto defination file , but now I has to reconfigure the path again, hope to provide this feature. The Grpc Invoke feature is Awesome!

  • Avatar

    Having difficulty with this functionality.
    My service runs on:
    info: Microsoft.Hosting.Lifetime[0]
    Now listening on: https://localhost:5001

    Import proto file and created request. When I try to invoke request I get: “Error: Invalid protocol: https”

    Does anybody have any idea? Thanks in advance.

  • Avatar

    Hey you guys wanna acquire FINT instead (http://www.bytesmotion.com/fint)? It has very good gRPC support. It supports saving of requests and comparing of responses (Functional testing). It also can do Load Testing (Constant load, burst load etc.). And it’s not just for gRPC. The same set of features is also available for WCF, REST and OData services.

  • Avatar

    I can’t see streaming option and my endpoint has multiple response

  • Avatar

    Every time I try to import proto file from local system it failed with: Failed to import protobuf definition as a new API. Try again.

  • Avatar

    Seriously, I am new to Postman.

    But WHY the !@#$! can we not select multiple collections to delete?

    Imported a Postman collection. It was nicely nested under a top level name. Found out I had to use an older version. Import it, now I have 20 separate collections at the top level.

    – Can’t move them into a single collection.
    – Can’t select all delete and re-import differently.

    No, I have to select each stupid collection, right-click, select delete, wait, click okay. Repeat twenty times. And guess what, if the re-import does it separately again. I have to do it ALL over again. Good-bye afternoon worth of time wasted.

    #disappointed

  • Avatar

    Environ: Vs2022 | c# | Postman 9.21.3 (Windows)
    I followed the “How to get started” instructions and animated gif, but when I invoke, I get:
    “Error: Invalid protocol: https”
    The endpoint in the animation shows “grpcb.in:9000”, but my c# service endpoints are http and https (https://localhost:7046/Greeter/SayHello).
    I’d like to see a working sample in c#.

  • Avatar

    GrpcCurl looks my services witch i am wrote in VS 2022 on C#, but Postman cannot see my service. Please look image here my settings https://ibb.co/hFXPfmb

  • Avatar

    I have started using gRPC feature, but I am not able to get it work with `Any` type of protobuf. Do we have any example on how to convert `Any` type of structure to JSON request in postman?

  • Avatar

    How long to get the export option for gRPC collections? Thanks.

  • Avatar

    You da man.

  • Avatar

    I second Dan’s comment about “decoding protobuf responses (for vanilla HTTP requests, not gRPC)”. This would be very helpful.

  • Avatar

    I receive:

    Could not load server reflection.
    Details: 13 INTERNAL: Received RST_STREAM with code 2 triggered by internal client error: Protocol error

    grpcui working fine with the same instance

    For localhost connection both Postmane and grpcui working fine.
    Any idea?

  • Avatar

    which is the best upgrade package for GRPC. I want to add full collections with each request using a proto which converts into a API. i think the sutomation package would be most helpful long term. but require to add multiple protos on one workspace in a single collection. at present it states this account is limited to 3 APIs. please can you advise

  • Avatar

    It seems like that cannot support map field.
    My protobuf has a field which type is map, but Postman show ‘Error’ when I write this json in Message Input Box:
    {
    “map_field”: {
    “a”:”aaa”,
    “b”:”bbb”,
    }
    }

  • Avatar

    is there any way to run gRPC tests via terminal, Newman, or something?
    is it ready to be part of CI/CD and running the gRPC test cases inside a pipeline ?

  • Avatar

    How can we use protobuf wrapper ? like I have a proto schema which uses google.protobuf.Value type, so how can I set values for this field in postman messages, when trying to pass normal string for google.protobuf.Value type, I am getting “Error: There are errors in your composed message” Error. Can you help with this ? Thanks.

  • Avatar

    What about offering protobuf encoding/decoding for just regular REST traffic? It seems you’ve done all the hard work, you just need to integrate it into regular web requests.