getScenarios
This method retrieves all scenarios associated with a specific project. You can filter the scenarios by type.
Parameters
- projectId (string, required): The unique identifier of the project for which scenarios are being retrieved.
- types (string[], optional): An array of scenario types to filter the results. Possible values are
ChallengeQuery
,OnChainZKP
,OffChainZKP
.
Returns
A JSON array of scenario objects matching the specified project and types.
Usage Example
const axios = require('axios');
let data = JSON.stringify({
"projectId": "string",
"types": [
"ChallengeQuery"
]
});
let config = {
method: 'post',
maxBodyLength: Infinity,
url: 'https://api.nexera.id/compliance/get-scenarios',
headers: {
'Content-Type': 'application/json',
'Accept': 'application/json',
'Authorization': 'Bearer <TOKEN>'
},
data : data
};
axios.request(config)
.then((response) => {
console.log(JSON.stringify(response.data));
})
.catch((error) => {
console.log(error);
});