1. Introduction
RESTful wrapper for si_assessment library
2. Endpoints
2.1. Assess SI
Performs the assessment of one Strategic Indicator using a Bayesian Network, based on its factors and their categories.
Request parameters
Parameter | Description |
---|---|
|
ID of the Strategic Indicator to be assessed. Has to coincide with its corresponding node’s name in the BN file to use (network). |
|
List containing the names (IDs) of the Strategic Indicator parent nodes. IDs need to be consistent with the BN file in use (network). |
|
List containing the states for the Strategic Indicator parent nodes. States need to be consistent with the BN file in use (network) and be defined in the same order as in factorNames. |
Request parts
Part | Description |
---|---|
|
File containing the BN to use for the assessment, in DNE format. |
Curl request
$ curl 'http://localhost:8080/api/si/assessment' -i -X POST \
-H 'Content-Type: multipart/form-data' \
-F 'network=@network.dne;type=text/plain' \
-F 'SIid=productquality' \
-F 'factorNames=softwarestability' \
-F 'factorNames=codequality' \
-F 'factorNames=testingstatus' \
-F 'factorValues=Medium' \
-F 'factorValues=High' \
-F 'factorValues=High'
Response fields
Path | Type | Description |
---|---|---|
|
|
Array containing objects representing the probability for each category. |
|
|
The category probability, normalized from 0 to 1. |
|
|
The category name. |
HTTP response
HTTP/1.1 200 OK
Content-Length: 227
Content-Type: application/json;charset=UTF-8
{
"probsSICategories" : [ {
"idSICategory" : "Low",
"probSICategory" : 0.18
}, {
"idSICategory" : "Medium",
"probSICategory" : 0.4725
}, {
"idSICategory" : "High",
"probSICategory" : 0.3475
} ]
}