Skip to content
Discussions/App Development/JSON-API Get v1/query does not return all contractForum ↗

JSON-API Get v1/query does not return all contract

App Development4 posts465 views5 likesLast activity Jul 2020
BA
bartcantOP
Jul 2020

I am experimenting with the Query JSON-API

I noticed that Get v1/query does only return a subset of my contracts currently available (3 records)

I have attached the JSON response and an extract from the participant_contract table (10 records)

I was expecting all 10 active contracts to be returned in the JSON-API

BE
bernhard
Jul 2020

Even on the JSON API you always act as a party. In the case of the JSON API, that party is taken from the JWT you submit. I see three entries in your table with create_stakeholder == Alice so my best guess is that you used a JWT for party Alice.

Reading as multiple parties is not currently supported on the JSON API.

BA
bartcant
Jul 2020

OK… That explains it…
So as a work around, I would need to add an “operator” to each contract and use the JWT in the JSON-API from that Operator

BE
bernhard
Jul 2020

Yes that works as long as you are only interested in querying via the JSON API.

← Back to Discussions