The following table describes the parameters used in the REST API request:
|
GET /webapp/api/simulation/results/<simulation_id> |
This REST API returns the results of the specified simulation. In the start REST API body, you can specify what output parameters should be returned. If output parameters are not specified, all output parameters are obtained. In addition, if the CSV export results are available, they are returned in JSON format.
The following table describes the parameters used in the REST API request:
| Parameter | In | Required or optional | Description |
|---|---|---|---|
| simulation_id | path | required | The ID of the running simulation. |
/webapp/api/simulation/results/ce8c8215-0515-43fd-9d34-92d1d7a95d87
{
"outputs": {
"me": 98.0,
"propulsion.me": 68.0,
"propulsion.tank.me": 38.0,
"propulsion.thruster.me": 30.0,
"telecom.me": 30.0,
"telecom.antenna.me": 10.0,
"telecom.amplifier.me": 20.0
},
"csv exports": {
"'SpaceCraftResults' csv export": "me,propulsion.me,propulsion.tank.me,propulsion.thruster.me,telecom.me,telecom.amplifier.me,telecom.antenna.me\n98.0000,68.0000,38.0000,30.0000,30.0000,20.0000,10.0000\n98.0000,68.0000,38.0000,30.0000,30.0000,20.0000,10.0000\n98.0000,68.0000,38.0000,30.0000,30.0000,20.0000,10.0000\n"
}
} |
GET /webapp/api/simulation/running |
This REST API request gets the list of all currently running simulations that you have started.
/webapp/api/simulation/running ["9bc18e3e-b544-4652-9bdb-6da1d75f7ea1"] |
GET /webapp/api/simulation/terminate/<simulation_id> |
This REST API request terminates the specified simulation.
The following table describes the parameters used in the REST API request:
| Parameter | In | Required or optional | Description |
|---|---|---|---|
| simulation_id | path | required | The ID of a specific simulation. |
/webapp/api/simulation/terminate/4e35bc60-2c66-48e8-96e2-80f5270c08cf
/webapp/api/simulation/status/4e35bc60-2c66-48e8-96e2-80f5270c08cf
{
"state": "TERMINATED",
"userId": "Administrator",
"elapsedTime": 11702
} |
GET /webapp/api/simulation/hasConfigs/project/<project>/branch/<branch> |
This REST API checks if the project has any Simulation Configurations.
The following table describes the parameters used in the REST API request:
| Parameter | In | Required or optional | Description |
|---|---|---|---|
| project | path | required | The Teamwork Cloud project name or ID. |
| branch | path | optional | The project branch name or ID. If the branch is omitted, the trunk is used instead. |
/webapp/api/simulation/hasConfigs/project/SpacecraftMassRollup
{
"hasConfigs": true
} |
GET /webapp/api/simulation/configs/project/<project>/branch/<branch>/element/<element_id> |
This REST API request retrieves element IDs, names, and descriptions of the Simulation Configurations available for the given executable element.
If the executable element is an Instance Specification, the method returns the Simulation Configurations:
The following table describes the parameters used in the REST API request:
| Parameter | In | Required or optional | Description |
|---|---|---|---|
| project | path | required | The Teamwork Cloud project name or ID. |
| branch | path | optional | The project branch name or ID. If the branch is omitted, the trunk is used instead. |
| element_id | path | optional | The server ID of the Instance Specification to be executed. |
/webapp/api/simulation/configs/project/SpacecraftMassRollup
{
"configId": "7915fcfa-fd88-4910-8560-13f4439cec3d",
"configName": "spacecraft mass analysis",
"documentation": ""
} |