Add Test Scenarios
Add the first scenario, by running the following command:
ctx scenario add Contextal-Test-Scenario-1.json --pretty
When the scenario is properly added, you will see a confirmation output like this:
{
"action": "BLOCK",
"creator": "Contextal",
"description": "This is a test scenario for Contextal Platform Tutorial, see https://platform.contextal.com/tutorial/intro",
"id": 1,
"name": "Test-Scenario-PDF-Unsafe-Attachment",
"t": 1730922819.623288
}
It provides a summary of the scenario and its internal id
number.
Use the same command to add the second scenario:
ctx scenario add Contextal-Test-Scenario-2.json --pretty
Reload Scenarios
After adding, deleting, or updating scenarios run the following command to make platform use their latest versions:
ctx scenario reload
List Scenarios
To list all scenarios, run the following command:
ctx scenario list --pretty
You should see two entries:
[
{
"action": "ALERT",
"creator": "Contextal",
"description": "This is a test scenario for Contextal Platform Tutorial, see https://platform.contextal.com/tutorial/intro",
"id": 2,
"name": "Test-Scenario-PDF-Campaign",
"t": 1730922922.446695
},
{
"action": "BLOCK",
"creator": "Contextal",
"description": "This is a test scenario for Contextal Platform Tutorial, see https://platform.contextal.com/tutorial/intro",
"id": 1,
"name": "Test-Scenario-PDF-Unsafe-Attachment",
"t": 1730922819.623288
}
]
tip
To view scenario details, run the following command providing the scenario's id
:
ctx scenario details 1 --pretty