What is the interface identifier?

I want to query the JSON API using interface identifier, and I want to make sure that I understand correctly what it actually is.

The Daml docs say about the /v1/query API call:

{
    "templateIds": ["11c8f3ace75868d28136adc5cfc1de265a9ee5ad73fe8f2db97510e3631096a2:Iou:Iou"],
    "query": {"amount": 999.99},
    "readers": ["Alice"]
}

In the above JSON, the templateIds field contains “either an array of contract template identifiers or an array containing a single interface identifier to search through. Mixing of template ID’s and interface ID’s, or specifying more than one interface ID is not allowed.”

What is interface identifier here?

Is it true that interface identifier = package id of the package containing the interface + module name containing the interface + interface name?

Is it true that interface identifier = package id of the package containing the interface + module name containing the interface + interface name?

Yes, generally “Identifier” in daml/daml-lf always refers to the trip (package id, module name, entity name). The entity name can then be a template (a template identifier), an interface (interface identifier) or really anything else, e.g., other data types (those usually don’t have a more specific name than identifier).

In the JSON API those identifiers are represented as a string of the form "packageid:modulename:entityname"

1 Like

Thank you Moritz!