Skip to main content
Trust Sources

Preview trust source

POST/v4/config/ows/trust/sources/preview

Reads a list as Add trust source reads it, and saves nothing. Use it to choose the usedFor role of a new trust source before you add it: the answer tells how many entries the list has, the roles that the list gives its entries, and how many entries have no role. The add and the edit form of the dashboard call it when the URL field or the list signer certificate field loses the focus.

An entry is one listed certificate of a service; a service without a certificate is one entry. A trust source uses the entries that have its role, and the entries whose list names no role (but never for status_issuer). So the number of entries that a trust source with the role R would use is the entryCount of R in entryRoles, plus entryCountWithoutRole (not for status_issuer).

The request has the members of the add of a list, without usedFor. The operation refuses what the add refuses: a list that the wallet cannot download or read as a list of the kind, a list with no entries, and a list whose signature does not verify with the signerCertificates that you give. The answer is then 400 with errorId trust_source.list_not_usable (The list cannot be used: <reason>). A trust anchor has no list to read (A trust anchor has no list to download).

API key scope: trust-sources:create (the older trust-anchors:create still works for a period).

Authorizations

  • Authorizationstringheaderrequired

    Your API key with the prefix ApiKey: ApiKey <your-api-key>. Get an API key.

    Scope:trust-sources:create

Body

application/json

The list to read. A member that the operation does not declare is refused (<name>: unknown field).

  • kindenum<string>required

    Required. etsi_trusted_list: an ETSI TS 119 612 trusted list (XML). etsi_lote: an ETSI TS 119 602 list of trusted entities (XML or JSON). trust_anchor is refused: a trust anchor has no list.

    Available options:etsi_trusted_list,etsi_lote

    Example:"etsi_lote"

  • urlstring

    Required. The https URL of the list, at most 2048 characters.

    Example:"https://trustlist.nxd.foundation/trust-lists/NXD-TL-PID.xml"

  • signerCertificatesstring

    Optional. PEM text with the certificates that sign the list, at least one. The wallet then refuses a list whose signature does not verify, and list.signatureVerified is true in the answer.

    Example:"-----BEGIN CERTIFICATE----- MIIC... -----END CERTIFICATE-----"

Response

application/json

What the list gives its entries. Nothing is saved.

  • listobject

    The list, as the wallet read it.