Enabling grpc server reflection extension

Would there be a downside to enabling grpc server reflection on the ledger-api?

Given that Postman has started supporting gRPC, and as of this version, they fixed a bug that prevented our protos to be imported, it would be neat if one could easily test/explore the LedgerAPI with Postman.

One way would be to grab all the protos from the repository and then import all of them individually.
There is also the possibility of using grpc server reflection. However, when trying it, postman returns “Server Reflection Failed”. I’m assuming that the extension is not enabled as described here.

Would it be sensible to enable this extension?

1 Like

As far as I know grpc reflection is enabled. Running grpcurl against the ledger API exposed by daml sandbox works without any issues:

moritz@adjunction ~ [2]> grpcurl -plaintext localhost:6865 list
com.daml.ledger.api.v1.ActiveContractsService
com.daml.ledger.api.v1.CommandCompletionService
com.daml.ledger.api.v1.CommandService
com.daml.ledger.api.v1.CommandSubmissionService
com.daml.ledger.api.v1.LedgerConfigurationService
com.daml.ledger.api.v1.LedgerIdentityService
com.daml.ledger.api.v1.PackageService
com.daml.ledger.api.v1.TransactionService
com.daml.ledger.api.v1.VersionService
com.daml.ledger.api.v1.admin.ConfigManagementService
com.daml.ledger.api.v1.admin.MeteringReportService
com.daml.ledger.api.v1.admin.PackageManagementService
com.daml.ledger.api.v1.admin.ParticipantPruningService
com.daml.ledger.api.v1.admin.PartyManagementService
com.daml.ledger.api.v1.admin.UserManagementService
grpc.health.v1.Health
grpc.reflection.v1alpha.ServerReflection

There was a bug in some older versions so make sure that you’re testing against 2.3.2.

I’ve just realized that it must be enabled by looking here

Hmm - then I’ll have to figure out why postman doesn’t like it.

Thanks @cocreature