Jorge Pereira
01/30/2023, 4:49 PMTom
01/30/2023, 6:32 PMJorge Pereira
01/30/2023, 6:42 PM// 20230130183849
// <http://localhost:8777/__admin/scenarios>
{
"scenarios": [
{
"id": "d9de1aa5-8f44-454d-8433-0f1d38f704e6",
"name": "my_scenario",
"state": "Started",
"possibleStates": [
"Started"
],
"mappings": [
{
"id": "72a892bb-927d-4ea1-86b7-68e6981a59e5",
"request": {
"method": "GET"
},
"response": {
"status": 200
},
"uuid": "72a892bb-927d-4ea1-86b7-68e6981a59e5",
"scenarioName": "my_scenario",
"requiredScenarioState": "Started"
}
]
}
]
}
PUT /__admin/scenarios/my_scenario/state
{
"state": "state_2"
}
curl -X PUT -H "Content-Type: application/json" -d '{"state": "state_2"}' <http://localhost:8777/__admin/scenarios/my_scenario/state>
Tom
01/30/2023, 7:36 PMstate_2
so that PUT won’t work. Try creating the stub the requires state_2
first, then do the PUT (I’ve just done this and it worked).Jorge Pereira
01/30/2023, 7:39 PM// 20230130193816
// <http://localhost:8777/__admin/scenarios>
{
"scenarios": [
{
"id": "6c53d978-9d36-416e-8837-de71845b3e51",
"name": "my_scenario",
"state": "Started",
"possibleStates": [
"state_2",
"Started"
],
"mappings": [
{
"id": "caba6671-d115-49a6-b44d-9b776315a2a4",
"request": {
"method": "GET"
},
"response": {
"status": 200
},
"uuid": "caba6671-d115-49a6-b44d-9b776315a2a4",
"scenarioName": "my_scenario",
"requiredScenarioState": "state_2"
},
{
"id": "805e541a-9499-4c1f-a2db-e4e40b9fbaf6",
"request": {
"method": "GET"
},
"response": {
"status": 200
},
"uuid": "805e541a-9499-4c1f-a2db-e4e40b9fbaf6",
"scenarioName": "my_scenario",
"requiredScenarioState": "Started"
}
]
}
]
}
Tom
01/30/2023, 8:10 PM