Skip to content
CCPEDIAby Unity Nodes
Discussions/App Development/How to Get list of choices Json APIForum ↗

How to Get list of choices Json API

App Development2 posts238 viewsLast activity Jun 2023
TE
Teja_SatyaOP
Jun 2023

Hi Team,

I am able to get all the active contracts from v1/query

I also want name of choices associated with that particular template

how do i get get that ?

Thanks in advance :slight_smile:

ST
Stephen
Jun 2023

Choices are associated with templates and are listed in daml-lf packages. So your path of research is similar to this one, except you might use the JSON API’s version of the package endpoints:

For ledger metaprogramming like this, you have basically two steps: Use the package service to retrieve all uploaded packages (dalfs). Parse and extract the information you want from the dalfs you get back from that service. There are several prior topics discussing this; here is a good starting point. There are some shortcuts that are possible depending on how much information about the templates you really need. Ledger metaprogramming isn’t really officially supported, but interest on this …
← Back to Discussions