Ledger api vs json http api

Hi
I understand daml provides both ledger api and http json server for client interaction with ledger; I am wondering what are the pros and cons of each and ideal use case for using each.
I want to build a service that can be used by back end application for fast interaction with daml ledgers

Hi @bbgg and welcome to the Daml developers forum :clap:

Both APIs can be used by a backend app. One of the main diffs between the two is that

The JSON API provides a significantly simpler way to interact with a ledger than the Ledger API by providing basic active contract set functionality :

  • creating contracts,
  • exercising choices on contracts,
  • querying the current active contract set, and
  • retrieving all known parties.
2 Likes