-
Notifications
You must be signed in to change notification settings - Fork 46
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
53 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
[[rest-api]] | ||
== REST API | ||
|
||
The simulator comes with an extensive REST API. | ||
Each single entity can be listed and searched through using it. | ||
The following default resources are present: | ||
|
||
* `/api/messages` | ||
* `/api/message-headers` | ||
* `/api/scenario-actions` | ||
* `/api/scenario-executions` | ||
* `/api/scenario-parameters` | ||
* `/api/test-parameters` | ||
* `/api/test-results` | ||
|
||
For each of the listed resources it is possible to: | ||
|
||
* List ALL results using a `GET /` request to the root URI | ||
* Pagination is possible | ||
* Filtering is possible | ||
* Simply count ALL results using the `GET /count` endpoint | ||
* Receive a SINGLE resource when calling the `GET /{id}` endpoint | ||
|
||
All REST resources follow this pattern, except a few listed in the following chapter. | ||
|
||
[[receive-single-test-result]] | ||
=== Receive SINGLE Test-Parameter | ||
|
||
The `TestParameter` entity is identified by a composite key, consisting of the `TestResult` ID and the `TestParameter` key. | ||
Therefore, in order to receive a SINGLE `TestParameter` use can use the `GET /{testResultId}/{key}` endpoint. | ||
|
||
[[scenario-resource]] | ||
=== Scenario Resource | ||
|
||
The `Scenario` REST resource is an exception as well. | ||
By default, the `GET /` endpoint returns a list of scenarios. | ||
The mainly consist of their unique name, although they each also have a type indicating if it is a `SimulatorScenario` (type: `MESSAGE_TRIGGERED`) or `ScenarioStarter` (type: `STARTER`). | ||
The REST resource supports pagination, but not filtering. | ||
|
||
This REST resource has no SINGLE resource endpoint, because that would not offer any more details. | ||
However, you can directly see the parameters of a scenario when calling the `GET /{scenarioName}/parameters` endpoint. | ||
|
||
Additionally, you can launch scenarios using the `POST /{scenarioName}/launch` endpoint. | ||
It accepts an array of scenario parameters in the request body. | ||
|
||
[[rest-api-pagination]] | ||
=== Pagination | ||
|
||
|
||
|
||
[[rest-api-filtering]] | ||
=== Filtering |