Templates

OpenAPI documentation for the "Templates" module

Retrieve the templates the verifier is working with

Returns a collection of templates that the client can use and send to the verifier endpoints.Claim-based access control: Verifier_Admin, Verifier_Auditor, Verifier_User

GET../private/webapp/templates
Authorization
Response
Body
definitionName*array of array
Example: "Work Experience Credential"
definitionId*string
Example: "workExperienceCredential"
definition*WebappTemplateDefinitionDetailDto (object)
Request
const response = await fetch('../private/webapp/templates', {
    method: 'GET',
    headers: {
      "Authorization": "Bearer JWT"
    },
});
const data = await response.json();
Response
[
  {
    "definitionName": "Work Experience Credential",
    "definitionId": "workExperienceCredential",
    "definition": {
      "id": "6a1b440-f15a-4464-a9fc-47669eabe9f0",
      "name": "Work Experience Credential",
      "purpose": "Provide Work Experience Credential",
      "schema": [
        {
          "uri": "WorkExperienceCredential"
        }
      ]
    }
  }
]

Create a new dynamic presentation definition

Enables the use of dynamic presentation definitions. The presentation definition is a JSON object that defines the rules the clients need to follow in order to produce a valid verifiable presentation.Claim-based access control: Verifier_Admin, Verifier_User

POST../private/webapp/presentation-definitions
Authorization
Body
definitionName*string
Example: "documentSignature"
credentials*array of WebappPresentationDefinitionCredentialBodyDto (object)
Response
Body
definitionId*string

The definitionId defines the credential to ask for, eg: emailCredential. The value should start with lowercase and continue using camelCase pattern

Example: "emailCredential"
Request
const response = await fetch('../private/webapp/presentation-definitions', {
    method: 'POST',
    headers: {
      "Authorization": "Bearer JWT",
      "Content-Type": "application/json"
    },
    body: JSON.stringify({
      "definitionName": "documentSignature",
      "credentials": [
        {
          "credentialId": "emailCredential",
          "fields": {
            "email": "john.doe@gmail.com"
          }
        }
      ]
    }),
});
const data = await response.json();
Response
{
  "definitionId": "emailCredential"
}

Returns a list of presentation definition templates and their required fields.

Returns a list of presentation definition templates and their required fields. The templates are used when creating a new presentation definition and checked against the required fields to ensure that the presentation definition is valid.Claim-based access control: Verifier_Admin, Verifier_User

GET../private/webapp/presentation-definitions/templates
Authorization
Response
Body
templates*array of TemplateDto (object)
Request
const response = await fetch('../private/webapp/presentation-definitions/templates', {
    method: 'GET',
    headers: {
      "Authorization": "Bearer JWT"
    },
});
const data = await response.json();
Response
{
  "templates": [
    {
      "definitionName": "documentSignature",
      "credentials": [
        {
          "credentialId": "string",
          "fields": {
            "type": "object",
            "properties": {
              "email": {
                "type": "string"
              }
            },
            "required": [
              "email"
            ]
          }
        }
      ]
    }
  ]
}

Last updated