Issue with /parties JSON API end point

I have a slightly odd problem, I wonder if someone could help. We’re calling https://login.hub.daml.com/auth/ledger/{{LedgerID}}/parties to get a list of parties after a new party is created on the ledger. We’re passing a bearer access token for the owner account - this is an access token generated for the our DAML Hub user by calling /auth/login followed by /auth/ledger/{{LedgerID}}/user_grants periodically.

My issue is that on one of my environments, every so often - perhaps once a day - the parties end point returns the users of an old ledger (one that doesn’t even exist any more). It’s like it’s ignoring the {{LedgerID}} passed. Refreshing the owner access token seems to fix the issue, but why would this fix it? Why would the ledger ID be tied to an access token? Shouldn’t the owner user be above the level of the ledger? Any ideas or clues?

1 Like

Thanks for reporting…we’ll look into this and let you know!

1 Like

Just looking again at this. I see that when we’re getting an access token for the owner account, we do specify the ledger ID, and it seems it’s this ledger ID that’s important, not the one in the /parties end point path. This doesn’t explain why every so often our owner’s access token is getting reset to one pointing to an old ledger (as we have updated it in our database), but does explain the relationship between the access token and the ledger.

1 Like