Using Postman to Explore the Ledger API
Background
This page documents how to setup Postman to explore the Ledger API. You may already be familiar with using Postman to query JSON API endpoints. In 2022, Postman added support for gRPC endpoints. The Ledger API is a collection of gRPC endpoints.
You might consider additionally Using gRPC UI to Explore the Ledger API. Both Postman and gRPC UI have their advantages.
These notes are based on:
- macOS
- Daml SDK 2.4
- Postman Version 10.6.7 (updated Dec 14, 2022)
API Setup
-
Start the Sandbox ledger.
daml sandbox -
In Postman, use File → New… to create a new “gRPC Request”.
-
For “Enter Server URL” use
localhost:6865. Postman’s service reflection will automatically list the available methods.
-
For “Select a Method” select “GetLedgerApiVersion” and press “Invoke.”
-
View the response from the service, in JSON format.
-
Repeat these steps for the other service endpoints that you would like to use. See the Ledger API documentation for the expected message bodies for the various service endpoints.
Hi Wallace, that’s a great write-up.
Was this written and tested solely on MacOS?
@Ben_M Yes, I did this on a macOS. Great question. I updated the post to include that note.
You don’t happen to use a Windows machine do you?
No, I am one of the lucky company minority using GNU/Linux ![]()
Nice, thanks for sharing.
The “server reflection” feature does not work. This is the feature that queries for the endpoints and types. Instead, you will need to point Postman to proto files for that information.
To clarify, “server reflection” in general should work but unfortunately breaks for the Ledger API due to a bug that is open at the time of writing. Hopefully it will be fixed in the future.
You don’t happen to use a Windows machine do you?
I have done something similar on Windows and it worked. In general I would expect it to be working regardless of the underlying OS (but of course OS-specific bugs might always arise).
To clarify, “server reflection” in general should work but unfortunately breaks for the Ledger API due to a bug that is open at the time of writing. Hopefully it will be fixed in the future.
Looks like the bug has been fixed in Postman v10.6.0, according to this comment, could be worth having another try.
@stefanobaghino-da Thank you for noticing that! I have updated this guide. It is much simpler now.


