getScenario
This method retrieves a specific scenario by its scenarioId
.
Parameters
scenarioId (string, required): The unique identifier of the scenario to retrieve.
Returns
- A JSON object representing the scenario, containing:
id
(string, required): The unique identifier of the scenario.name
(string, required): The name of the scenario.description
(string, nullable): A description of the scenario.message
(string, nullable): An optional message associated with the scenario.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. Possible values areChallengeQuery
,OnChainZKP
,OffChainZKP
.projectId
(string, nullable): The ID of the project associated with the scenario.vcsIncluded
(string[], nullable): An array of Verifiable Credentials (VCs) included in the scenario.
Usage Example
const axios = require('axios');
let config = {
method: 'get',
maxBodyLength: Infinity,
url: 'https://api.nexera.id/compliance/scenarios/:scenarioId',
headers: {
'Accept': 'application/json',
'Authorization': 'Bearer <TOKEN>'
}
};
axios.request(config)
.then((response) => {
console.log(JSON.stringify(response.data));
})
.catch((error) => {
console.log(error);
});
This JavaScript example uses the axios
library to make an HTTP GET request to the API, retrieving the details of a specific scenario by its scenarioId
. Replace <TOKEN>
with your actual authorization token and your-scenario-id
with the actual scenario ID you want to retrieve.