|
|
# Trade-off Manager
|
|
|
As stated in the [Installation](Decision-Support-Toolbox-Installation) page, the Decision Support Toolbox integrates all the separate analysis toolboxes of the platform. This integration has been rigorously tested for the [online][sdk] version of the tool and thus the recommended way of usage is via the tool's [Front-end](Decision-Support-Toolbox-Front-end).
|
|
|
|
|
|
Apart from the front-end, however, the user may use HTTP requests to directly interact with the tool's Look-Up Table (LUT). Directions and examples of such interaction are provided below.
|
|
|
|
|
|
## LUT API's
|
|
|
The database endpoint is currently hosted in [http://147.102.37.20:8062/][EP]. The current authentication scheme employed is [HTTP Basic][HBA]. Upon first interaction with the database, the following credentials should be provided:
|
|
|
|
... | ... | @@ -20,5 +25,120 @@ Below you may find some examples showcasing the usage of and expected responses |
|
|
|```http://147.102.37.20:8062/query?name=Loop Unrolling``` | Retrieve the Loop Unrolling entry. Entry does exist. | Entry in JSON form. |
|
|
|
|```http://147.102.37.20:8062/inspect``` | Retrieve all existing entries. | All entries in JSON form. |
|
|
|
|
|
|
### Individual entry
|
|
|
Below the user may find an example of the response payload to be retrieved upon using the ```/query``` API.
|
|
|
> ***ATTENTION:*** Please note that the entry has to exist.
|
|
|
|
|
|
```
|
|
|
{
|
|
|
"name": "Dead_Code",
|
|
|
"impacts": {
|
|
|
"Energy": "No impact",
|
|
|
"Technical Debt": "Worsen",
|
|
|
"Security": "Greatly Improve"
|
|
|
},
|
|
|
"vectors": {
|
|
|
"1v2": {
|
|
|
"x": 0,
|
|
|
"y": 0,
|
|
|
"len": 1,
|
|
|
"ang": 180
|
|
|
},
|
|
|
"2v3": {
|
|
|
"x": 0,
|
|
|
"y": 0,
|
|
|
"len": 2.23606797749979,
|
|
|
"ang": 334
|
|
|
},
|
|
|
"1v3": {
|
|
|
"x": 0,
|
|
|
"y": 0,
|
|
|
"len": 2,
|
|
|
"ang": 0
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
```
|
|
|
|
|
|
### Inspection entry
|
|
|
Below the user may find an example of the response payload to be retrieved upon using the ```/inspect``` API.
|
|
|
```
|
|
|
{
|
|
|
"1": {
|
|
|
"name": "Dead_Code",
|
|
|
"impacts": {
|
|
|
"Energy": "No impact",
|
|
|
"Technical Debt": "Worsen",
|
|
|
"Security": "Greatly Improve"
|
|
|
}
|
|
|
},
|
|
|
"2": {
|
|
|
"name": "Null_Pointer",
|
|
|
"impacts": {
|
|
|
"Energy": "No impact",
|
|
|
"Technical Debt": "Greatly Improve",
|
|
|
"Security": "Greatly Improve"
|
|
|
}
|
|
|
},
|
|
|
"3": {
|
|
|
"name": "Assignment",
|
|
|
"impacts": {
|
|
|
"Energy": "No impact",
|
|
|
"Technical Debt": "Improve",
|
|
|
"Security": "Improve"
|
|
|
}
|
|
|
},
|
|
|
"4": {
|
|
|
"name": "Exception_Handling",
|
|
|
"impacts": {
|
|
|
"Energy": "No impact",
|
|
|
"Technical Debt": "Improve",
|
|
|
"Security": "Improve"
|
|
|
}
|
|
|
},
|
|
|
"5": {
|
|
|
"name": "Resource_Handling",
|
|
|
"impacts": {
|
|
|
"Energy": "Improve",
|
|
|
"Technical Debt": "No impact",
|
|
|
"Security": "Greatly Improve"
|
|
|
}
|
|
|
},
|
|
|
"6": {
|
|
|
"name": "Logging",
|
|
|
"impacts": {
|
|
|
"Energy": "Worsen",
|
|
|
"Technical Debt": "Worsen",
|
|
|
"Security": "Greatly Improve"
|
|
|
}
|
|
|
},
|
|
|
"7": {
|
|
|
"name": "Misused_Functionality",
|
|
|
"impacts": {
|
|
|
"Energy": "No impact",
|
|
|
"Technical Debt": "Improve",
|
|
|
"Security": "Improve"
|
|
|
}
|
|
|
},
|
|
|
"8": {
|
|
|
"name": "Synchronization",
|
|
|
"impacts": {
|
|
|
"Energy": "Worsen",
|
|
|
"Technical Debt": "No impact",
|
|
|
"Security": "Improve"
|
|
|
}
|
|
|
},
|
|
|
"9": {
|
|
|
"name": "Acceleration",
|
|
|
"impacts": {
|
|
|
"Energy": "Improve",
|
|
|
"Technical Debt": "Greatly Worsen",
|
|
|
"Security": "No impact"
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
```
|
|
|
|
|
|
[EP]: <http://147.102.37.20:8062/>
|
|
|
[HBA]: <https://developer.mozilla.org/en-US/docs/Web/HTTP/Authentication> |
|
|
\ No newline at end of file |
|
|
[HBA]: <https://developer.mozilla.org/en-US/docs/Web/HTTP/Authentication>
|
|
|
[sdk]: <http://160.40.52.130:3000/> |
|
|
\ No newline at end of file |