createScenarioFromTemplate

createScenarioFromTemplate

This method creates a scenario using a given scenario template ID.

Parameters

  • scenarioTemplateId (string, required): The unique identifier of the scenario template.
  • projectId (string, required): The unique identifier of the project.

Returns

  • A JSON object containing the ID of the created scenario:
    • id (string, required): The unique identifier of the created scenario.

Usage Example

const axios = require('axios');
let data = JSON.stringify({
  "scenarioTemplateId": "string",
  "projectId": "string"
});

let config = {
  method: 'post',
  maxBodyLength: Infinity,
  url: 'https://api.nexera.id/compliance/scenarios/createFromTemplate',
  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);
});