The Scenario Quality Checker API provides endpoints to analyze and evaluate scenario files. It is designed to count the number of sections in a scenario file, count sections with specific keywords, identify sections with errors, display scenarios with enumerated steps, show main steps in a scenario, and display scenarios up to a specified depth.
Endpoint to count the number of sections in a scenario file.
- URL:
/api/v2/count/sections
- HTTP Method:
POST
- Request Parameters:
file
(Multipart txt file containing the scenario text)
Request Example:
curl -X POST -F "[email protected]" http://your-api-base-url/api/v2/count/sections
Response Example:
{
"numberOfSections": 5
}
Endpoint to count the number of sections containing keywords in a scenario file.
- URL:
/api/v2/count/sections/keywords
- HTTP Method:
POST
- Request Parameters:
file
(Multipart txt file containing the scenario text)
Request Example:
curl -X POST -F "[email protected]" http://your-api-base-url/api/v2/count/sections/keywords
Response Example:
{
"numberOfSectionsWithKeywords": 3
}
Endpoint to find sections with errors in a scenario file.
- URL:
/api/v2/sections/errors
- HTTP Method:
POST
- Request Parameters:
file
(Multipart txt file containing the scenario text)
Request Example:
curl -X POST -F "[email protected]" http://your-api-base-url/api/v2/sections/errors
Response Example:
{
"sectionsWithErrors": ["Section 2", "Section 4"]
}
Endpoint to display scenario with enumerated steps.
- URL:
/api/v2/scenario/enumerated
- HTTP Method:
POST
- Request Parameters:
file
(Multipart txt file containing the scenario text)
Request Example:
curl -X POST -F "[email protected]" http://your-api-base-url/api/v2/scenario/enumerated
Response Example:
{"enumeratedScenario": "1. Bibliotekarz wybiera opcje dodania nowej pozycji książkowej
2. Wyświetla się formularz.
3. Bibliotekarz podaje dane książki.
4. IF: Bibliotekarz pragnie dodać egzemplarze książki
4. 1. Bibliotekarz wybiera opcję definiowania egzemplarzy
4. 2. System prezentuje zdefiniowane egzemplarze
4. 3. FOR EACH egzemplarz:
4. 3. 1. Bibliotekarz wybiera opcję dodania egzemplarza
4. 3. 2. System prosi o podanie danych egzemplarza
4. 3. 3. Bibliotekarz podaje dane egzemplarza i zatwierdza.
4. 3. 4. System informuje o poprawnym dodaniu egzemplarza i prezentuje zaktualizowaną listę egzemplarzy.
5. Bibliotekarz zatwierdza dodanie książki.
6. System informuje o poprawnym dodaniu książki.
"}
Endpoint to show main steps in a scenario.
- URL:
/api/v2/scenario/mainSteps
- HTTP Method:
POST
- Request Parameters:
file
(Multipart txt file containing the scenario text)
Request Example:
curl -X POST -F "[email protected]" http://your-api-base-url/api/v2/scenario/mainSteps
Response Example:
{
"mainSteps": "Dobry scenariusz"
}
Endpoint to display scenario up to a specified depth.
- URL:
/api/v2/scenario/scenarioUpToDepth
- HTTP Method:
POST
- Request Parameters:
file
(Multipart txt file containing the scenario text)depth
(Integer value specifying the depth)
Request Example:
curl -X POST -F "[email protected]" -F "depth=3" http://your-api-base-url/api/v2/scenario/scenarioUpToDepth
Response Example:
{
"scenarioUpToDepth": "Bibliotekarz wybiera opcje dodania nowej pozycji książkowej
Wyświetla się formularz.
Bibliotekarz podaje dane książki.
IF: Bibliotekarz pragnie dodać egzemplarze książki
Bibliotekarz wybiera opcję definiowania egzemplarzy
System prezentuje zdefiniowane egzemplarze
FOR EACH egzemplarz:
Bibliotekarz wybiera opcję dodania egzemplarza
System prosi o podanie danych egzemplarza
Bibliotekarz podaje dane egzemplarza i zatwierdza.
System informuje o poprawnym dodaniu egzemplarza i prezentuje zaktualizowaną listę egzemplarzy.
Bibliotekarz zatwierdza dodanie książki.
System informuje o poprawnym dodaniu książki."
}