listTemplates

listTemplates

This method retrieves a list of all scenario templates based on the specified type.

Parameters

type (string, required): The type of scenario templates to list. Possible values are opa-scenario and zkp-scenario.

Returns

  • A JSON array of scenario templates, each containing:
    • id (string, required): The unique identifier of the scenario template.
    • name (string, required): The name of the scenario template.
    • description (string, nullable): A description of the scenario template.
    • message (string, nullable): An optional message associated with the scenario template.
    • isIdentityWidgetScenario (boolean, nullable): Indicates if the scenario is related to an identity widget.
    • queryConfigurations (object[], required): An array of query configurations.
    • smartContractDeployments (object[], required): An array of smart contract deployments.
    • type (string, required): The type of the scenario template. Possible values are ChallengeQuery, OnChainZKP, OffChainZKP.
    • vcsIncluded (string[], nullable): An array of Verifiable Credentials (VCs) included in the scenario template.

Usage Example

const axios = require('axios');

let config = {
  method: 'get',
  maxBodyLength: Infinity,
  url: 'https://api.nexera.id/compliance/scenarios/templates',
  headers: { 
    'Accept': 'application/json', 
    'Authorization': 'Bearer <TOKEN>'
  }
};

axios.request(config)
.then((response) => {
  console.log(JSON.stringify(response.data));
})
.catch((error) => {
  console.log(error);
});