HTTP JSON API and navigator connected to same ledger but getting different parties

Hi, I set up a network where I have the HTTP JSON API running on a process (in my case is a docker container) and connecting to a daml (daml-driver-posgre) and have the navigator on another process connecting to the same ledger.

I thought I would be able to see all the parties on the ledger both from the HTTP JSON API and from the navigator, but actually I’m seeing parties from the navigator but not from the HTTP JSON API (Indeed when I call /v1/parties i get an empty array)

How it is possibile that I can’t see the parties from the HTTP JSON API?

  1. What version of the SDK are we talking about?
  2. How are you starting the HTTP JSON API?
  3. How are you starting the Navigator?
  4. Do you have parties declared in your daml.yaml file?
  • What version of the SDK are we talking about?

The sdk is the 1.18.0

  • How are you starting the HTTP JSON API?

inside a docker container using this command:

daml json-api --ledger-host daml-postgresql-driver --ledger-port 6865 --http-port 7575 --address 0.0.0.0

  • How are you starting the Navigator?

In the HOST machine (in this case a windows 10 pro) using the following command:
daml navigator localhost 6865

  • Do you have parties declared in your daml.yaml file?

Yes, more than 10

[/quote]

UPDATE: It seems that the parties listed in the daml.yml DON’T get created but it is only used for navigator purposes (maybe only for the frontend part).

You wil need to develop a setup script to create the parties in the ledger.

This was the problem. So the solution was to create the same parties listed in the daml.yml in a setup script.

Thank you very much

1 Like