diff --git a/build.gradle b/build.gradle index d19b7172..207c9d56 100644 --- a/build.gradle +++ b/build.gradle @@ -26,7 +26,7 @@ apply plugin: 'jacoco' apply plugin: 'org.asciidoctor.convert' group = 'com.upc.gessi.qrapids' -version = '1.3' +version = '1.4' sourceCompatibility = 1.8 war { diff --git a/docs/asciidoc/index.adoc b/docs/asciidoc/index.adoc index 3638117e..e758e55f 100644 --- a/docs/asciidoc/index.adoc +++ b/docs/asciidoc/index.adoc @@ -1,5 +1,5 @@ = Q-Rapids Dashboard API REST Documentation -v1.3, {docdate} +v1.4, {docdate} :toc: left :sectnums: @@ -57,6 +57,21 @@ include::{snippets}/si/historical-conflict/http-response.adoc[] include::{snippets}/si/historical-read-error/http-response.adoc[] :numbered: +=== Get current and historical evaluation + +operation::si/current_and_historical[snippets='request-parameters,curl-request,response-fields,http-response'] + +:numbered!: +==== HTTP response wrong project +include::{snippets}/alerts/get-all-wrong-project/http-response.adoc[] + +==== HTTP response categories error +include::{snippets}/si/historical-conflict/http-response.adoc[] + +==== HTTP response error on ElasticSearch connection +include::{snippets}/si/historical-read-error/http-response.adoc[] +:numbered: + === Get prediction evaluation @@ -279,7 +294,7 @@ include::{snippets}/alerts/add-qr-from-alert-backlog-error/http-response.adoc[] === Get historical evaluation -operation::qf/current[snippets='request-parameters,curl-request,response-fields,http-response'] +operation::qf/historical[snippets='request-parameters,curl-request,response-fields,http-response'] :numbered!: @@ -294,7 +309,7 @@ include::{snippets}/alerts/add-qr-from-alert-backlog-error/http-response.adoc[] === Get historical evaluation for strategic indicator -operation::qf/current-si[snippets='path-parameters,request-parameters,curl-request,response-fields,http-response'] +operation::qf/historical-si[snippets='path-parameters,request-parameters,curl-request,response-fields,http-response'] :numbered!: diff --git a/docs/asciidoc/index.html b/docs/asciidoc/index.html index a77c8c76..9a6722b2 100644 --- a/docs/asciidoc/index.html +++ b/docs/asciidoc/index.html @@ -5,7 +5,7 @@ - + Q-Rapids Dashboard API REST Documentation + + + + + +Q-Rapids Dashboard API REST Documentation + + - -
- - -
+ + +
+
+

1. Introduction

+
+
+

Q-Rapids dashboard RESTful services

+
+
+
+
+

2. Strategic Indicators

+
+
+

2.1. Get current evaluation

+
+

Request parameters

+ ++++ + + + + + + + + + + + + +
ParameterDescription

prj

Project external identifier

+
+
+

Curl request

+
+
+
$ curl 'http://localhost:8080/api/strategicIndicators/current?prj=test' -i -X GET
+
+
+
+
+

Response fields

+ +++++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
PathTypeDescription

[].id

String

Strategic indicator identifier

[].dbId

Number

Strategic indicator database identifier

[].name

String

Strategic indicator name

[].description

String

Strategic indicator description

[].value.first

Number

Strategic indicator numerical value

[].value.second

String

Strategic indicator category

[].confidence80

Null

Strategic indicator forecasting 80% confidence interval

[].confidence95

Null

Strategic indicator forecasting 95% confidence interval

[].value_description

String

Readable strategic indicator value and category

[].rationale

String

Strategic indicator evaluation rationale

[].probabilities

Array

Strategic indicator categories list

[].probabilities[].id

Number

Strategic indicator category identifier

[].probabilities[].label

String

Strategic indicator category label

[].probabilities[].value

Null

Strategic indicator category probability

[].probabilities[].color

String

Strategic indicator category hexadecimal color

[].probabilities[].upperThreshold

Number

Strategic indicator category upper threshold

[].date

Array

Strategic indicator assessment date

[].datasource

String

Strategic indicator source of data

[].categories_description

String

Array with the strategic indicator categories and thresholds

[].hasBN

Boolean

Does the strategic indicator have a Bayesian Network?

[].hasFeedback

Boolean

Does the strategic indicator have any feedback

[].forecastingError

Null

Errors in the forecasting

[].mismatchDays

Number

Maximum difference (in days) when there is difference in the evaluation dates between the strategic indicator and some quality factors

[].missingFactors

Null

Factors without assessment

+
+
+

HTTP response

+
+
+
HTTP/1.1 200 OK
+Content-Length: 1065
+Content-Type: application/json;charset=UTF-8
+
+[ {
+  "id" : "processperformance",
+  "dbId" : 1,
+  "name" : "Process Performance",
+  "description" : "Performance of the processes involved in the development",
+  "value" : {
+    "first" : 0.8,
+    "second" : "Good"
+  },
+  "value_description" : "Good (0.80)",
+  "rationale" : "factors: {...}, formula: ..., value: ..., category: ...",
+  "probabilities" : [ {
+    "id" : 10,
+    "label" : "Good",
+    "value" : null,
+    "color" : "#00ff00",
+    "upperThreshold" : 0.66
+  }, {
+    "id" : 11,
+    "label" : "Neutral",
+    "value" : null,
+    "color" : "#ff8000",
+    "upperThreshold" : 0.33
+  }, {
+    "id" : 11,
+    "label" : "Bad",
+    "value" : null,
+    "color" : "#ff0000",
+    "upperThreshold" : 0.0
+  } ],
+  "date" : [ 2019, 7, 7 ],
+  "datasource" : "Q-Rapdis Dashboard",
+  "categories_description" : "[Good (0,67), Neutral (0,33), Bad (0,00)]",
+  "hasBN" : false,
+  "hasFeedback" : false,
+  "confidence80" : null,
+  "confidence95" : null,
+  "forecastingError" : null,
+  "mismatchDays" : 0,
+  "missingFactors" : null
+} ]
+
+
+
+
+

HTTP response wrong project

+
+
+
HTTP/1.1 400 Bad Request
+
+
+
+
+

HTTP response categories error

+
+
+
HTTP/1.1 409 Conflict
+
+
+
+
+

HTTP response error on ElasticSearch connection

+
+
+
HTTP/1.1 500 Internal Server Error
+
+
+
+
+
+

2.2. Get one current evaluation

+
+

Path parameters

+ + ++++ + + + + + + + + + + + + +
Table 1. /api/strategicIndicators/{id}/current
ParameterDescription

id

Strategic Indicator identifier

+
+
+

Request parameters

+ ++++ + + + + + + + + + + + + +
ParameterDescription

prj

Project external identifier

+
+
+

Curl request

+
+
+
$ curl 'http://localhost:8080/api/strategicIndicators/processperformance/current?prj=test' -i -X GET
+
+
+
+
+

Response fields

+ +++++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
PathTypeDescription

id

String

Strategic indicator identifier

dbId

Number

Strategic indicator database identifier

name

String

Strategic indicator name

description

String

Strategic indicator description

value.first

Number

Strategic indicator numerical value

value.second

String

Strategic indicator category

confidence80

Null

Strategic indicator forecasting 80% confidence interval

confidence95

Null

Strategic indicator forecasting 95% confidence interval

value_description

String

Readable strategic indicator value and category

rationale

String

Strategic indicator evaluation rationale

probabilities

Array

Strategic indicator categories list

probabilities[].id

Number

Strategic indicator category identifier

probabilities[].label

String

Strategic indicator category label

probabilities[].value

Null

Strategic indicator category probability

probabilities[].color

String

Strategic indicator category hexadecimal color

probabilities[].upperThreshold

Number

Strategic indicator category upper threshold

date

Array

Strategic indicator assessment date

datasource

String

Strategic indicator source of data

categories_description

String

Array with the strategic indicator categories and thresholds

hasBN

Boolean

Does the strategic indicator have a Bayesian Network?

hasFeedback

Boolean

Does the strategic indicator have any feedback

forecastingError

Null

Errors in the forecasting

mismatchDays

Number

Maximum difference (in days) when there is difference in the evaluation dates between the strategic indicator and some quality factors

missingFactors

Null

Factors without assessment

+
+
+

HTTP response

+
+
+
HTTP/1.1 200 OK
+Content-Length: 1061
+Content-Type: application/json;charset=UTF-8
+
+{
+  "id" : "processperformance",
+  "dbId" : 1,
+  "name" : "Process Performance",
+  "description" : "Performance of the processes involved in the development",
+  "value" : {
+    "first" : 0.8,
+    "second" : "Good"
+  },
+  "value_description" : "Good (0.80)",
+  "rationale" : "factors: {...}, formula: ..., value: ..., category: ...",
+  "probabilities" : [ {
+    "id" : 10,
+    "label" : "Good",
+    "value" : null,
+    "color" : "#00ff00",
+    "upperThreshold" : 0.66
+  }, {
+    "id" : 11,
+    "label" : "Neutral",
+    "value" : null,
+    "color" : "#ff8000",
+    "upperThreshold" : 0.33
+  }, {
+    "id" : 11,
+    "label" : "Bad",
+    "value" : null,
+    "color" : "#ff0000",
+    "upperThreshold" : 0.0
+  } ],
+  "date" : [ 2019, 7, 7 ],
+  "datasource" : "Q-Rapdis Dashboard",
+  "categories_description" : "[Good (0,67), Neutral (0,33), Bad (0,00)]",
+  "hasBN" : false,
+  "hasFeedback" : false,
+  "confidence80" : null,
+  "confidence95" : null,
+  "forecastingError" : null,
+  "mismatchDays" : 0,
+  "missingFactors" : null
+}
+
+
+
+
+

HTTP response wrong project

+
+
+
HTTP/1.1 400 Bad Request
+
+
+
+
+

HTTP response categories error

+
+
+
HTTP/1.1 409 Conflict
+
+
+
+
+

HTTP response error on ElasticSearch connection

+
+
+
HTTP/1.1 500 Internal Server Error
+
+
+
+
+
+

2.3. Get historical evaluation

+
+

Request parameters

+ ++++ + + + + + + + + + + + + + + + + + + + + +
ParameterDescription

prj

Project external identifier

from

Starting date (yyyy-mm-dd) for the requested the period

to

Ending date (yyyy-mm-dd) for the requested the period

+
+
+

Curl request

+
+
+
$ curl 'http://localhost:8080/api/strategicIndicators/historical?prj=test&from=2019-07-07&to=2019-07-15' -i -X GET
+
+
+
+
+

Response fields

+ +++++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
PathTypeDescription

[].id

String

Strategic indicator identifier

[].dbId

Number

Strategic indicator database identifier

[].name

String

Strategic indicator name

[].description

String

Strategic indicator description

[].value.first

Number

Strategic indicator numerical value

[].value.second

String

Strategic indicator category

[].confidence80

Null

Strategic indicator forecasting 80% confidence interval

[].confidence95

Null

Strategic indicator forecasting 95% confidence interval

[].value_description

String

Readable strategic indicator value and category

[].rationale

String

Strategic indicator evaluation rationale

[].probabilities

Array

Strategic indicator categories list

[].probabilities[].id

Number

Strategic indicator category identifier

[].probabilities[].label

String

Strategic indicator category label

[].probabilities[].value

Null

Strategic indicator category probability

[].probabilities[].color

String

Strategic indicator category hexadecimal color

[].probabilities[].upperThreshold

Number

Strategic indicator category upper threshold

[].date

Array

Strategic indicator assessment date

[].datasource

String

Strategic indicator source of data

[].categories_description

String

Array with the strategic indicator categories and thresholds

[].hasBN

Boolean

Does the strategic indicator have a Bayesian Network?

[].hasFeedback

Boolean

Does the strategic indicator have any feedback

[].forecastingError

Null

Errors in the forecasting

[].mismatchDays

Number

Maximum difference (in days) when there is difference in the evaluation dates between the strategic indicator and some quality factors

[].missingFactors

Null

Factors without assessment

+
+
+

HTTP response

+
+
+
HTTP/1.1 200 OK
+Content-Length: 1065
+Content-Type: application/json;charset=UTF-8
+
+[ {
+  "id" : "processperformance",
+  "dbId" : 1,
+  "name" : "Process Performance",
+  "description" : "Performance of the processes involved in the development",
+  "value" : {
+    "first" : 0.8,
+    "second" : "Good"
+  },
+  "value_description" : "Good (0.80)",
+  "rationale" : "factors: {...}, formula: ..., value: ..., category: ...",
+  "probabilities" : [ {
+    "id" : 10,
+    "label" : "Good",
+    "value" : null,
+    "color" : "#00ff00",
+    "upperThreshold" : 0.66
+  }, {
+    "id" : 11,
+    "label" : "Neutral",
+    "value" : null,
+    "color" : "#ff8000",
+    "upperThreshold" : 0.33
+  }, {
+    "id" : 11,
+    "label" : "Bad",
+    "value" : null,
+    "color" : "#ff0000",
+    "upperThreshold" : 0.0
+  } ],
+  "date" : [ 2019, 7, 7 ],
+  "datasource" : "Q-Rapdis Dashboard",
+  "categories_description" : "[Good (0,67), Neutral (0,33), Bad (0,00)]",
+  "hasBN" : false,
+  "hasFeedback" : false,
+  "confidence80" : null,
+  "confidence95" : null,
+  "forecastingError" : null,
+  "mismatchDays" : 0,
+  "missingFactors" : null
+} ]
+
+
+
+
+

HTTP response wrong project

+
+
+
HTTP/1.1 400 Bad Request
+
+
+
+
+

HTTP response categories error

+
+
+
HTTP/1.1 409 Conflict
+
+
+
+
+

HTTP response error on ElasticSearch connection

+
+
+
HTTP/1.1 500 Internal Server Error
+
+
+
+
+
+

2.4. Get current and historical evaluation

+
+

Request parameters

+ ++++ + + + + + + + + + + + + + + + + + + + + +
ParameterDescription

prj

Project external identifier

from

Starting date (yyyy-mm-dd) for the requested the period

to

Ending date (yyyy-mm-dd) for the requested the period

+
+
+

Curl request

+
+
+
$ curl 'http://localhost:8080/api/strategicIndicators/current_and_historical?prj=test&from=2019-07-07&to=2019-07-15' -i -X GET
+
+
+
+
+

Response fields

+ +++++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
PathTypeDescription

[].id

String

Strategic indicator identifier

[].dbId

Number

Strategic indicator database identifier

[].prjName

String

Strategic indicator project name

[].name

String

Strategic indicator name

[].description

String

Strategic indicator description

[].currentValue.first

Number

Strategic indicator numerical current value

[].currentValue.second

String

Strategic indicator current value category

[].currentValueDescription

String

Readable strategic indicator current value and category

[].currentRationale

String

Strategic indicator current evaluation rationale

[].probabilities

Array

Strategic indicator categories list

[].probabilities[].id

Number

Strategic indicator category identifier

[].probabilities[].label

String

Strategic indicator category label

[].probabilities[].value

Null

Strategic indicator category probability

[].probabilities[].color

String

Strategic indicator category hexadecimal color

[].probabilities[].upperThreshold

Number

Strategic indicator category upper threshold

[].currentDate

Array

Strategic indicator current assessment date

[].historicalDataList

Array

List with all strategic indicator historical evaluations

[].historicalDataList[].value.first

Number

Strategic indicator numerical historical value

[].historicalDataList[].value.second

String

Strategic indicator historical value category

[].historicalDataList[].valueDescription

String

Readable strategic indicator historical value and category

[].historicalDataList[].rationale

String

Strategic indicator historical evaluation rationale

[].historicalDataList[].date

Array

Strategic indicator historical assessment date

+
+
+

HTTP response

+
+
+
HTTP/1.1 200 OK
+Content-Length: 1079
+Content-Type: application/json;charset=UTF-8
+
+[ {
+  "id" : "processperformance",
+  "dbId" : 1,
+  "prjName" : "Test",
+  "name" : "Process Performance",
+  "description" : "Performance of the processes involved in the development",
+  "currentValue" : {
+    "first" : 0.8,
+    "second" : "Good"
+  },
+  "currentValueDescription" : "Good (0.80)",
+  "currentRationale" : "factors: {...}, formula: ..., value: ..., category: ...",
+  "currentDate" : [ 2019, 7, 7 ],
+  "probabilities" : [ {
+    "id" : 10,
+    "label" : "Good",
+    "value" : null,
+    "color" : "#00ff00",
+    "upperThreshold" : 0.66
+  }, {
+    "id" : 11,
+    "label" : "Neutral",
+    "value" : null,
+    "color" : "#ff8000",
+    "upperThreshold" : 0.33
+  }, {
+    "id" : 11,
+    "label" : "Bad",
+    "value" : null,
+    "color" : "#ff0000",
+    "upperThreshold" : 0.0
+  } ],
+  "historicalDataList" : [ {
+    "value" : {
+      "first" : 0.8,
+      "second" : "Good"
+    },
+    "valueDescription" : "Good (0.80)",
+    "rationale" : "factors: {...}, formula: ..., value: ..., category: ...",
+    "date" : [ 2019, 7, 7 ]
+  } ]
+} ]
+
+
+
+
+

HTTP response wrong project

+
+
+
HTTP/1.1 400 Bad Request
+
+
+
+
+

HTTP response categories error

+
+
+
HTTP/1.1 409 Conflict
+
+
+
+
+

HTTP response error on ElasticSearch connection

+
+
+
HTTP/1.1 500 Internal Server Error
+
+
+
+
+
+

2.5. Get prediction evaluation

+
+

Request parameters

+ ++++ + + + + + + + + + + + + + + + + + + + + +
ParameterDescription

prj

Project external identifier

technique

Forecasting technique

horizon

Amount of days that the prediction will cover

+
+
+

Curl request

+
+
+
$ curl 'http://localhost:8080/api/strategicIndicators/prediction?prj=test&technique=PROPHET&horizon=7' -i -X GET
+
+
+
+
+

Response fields

+ +++++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
PathTypeDescription

[].id

String

Strategic indicator identifier

[].dbId

Number

Strategic indicator database identifier

[].name

String

Strategic indicator name

[].description

String

Strategic indicator description

[].value.first

Number

Strategic indicator numerical value

[].value.second

String

Strategic indicator category

[].confidence80

Object

Strategic indicator forecasting 80% confidence interval

[].confidence80.first

Number

Strategic indicator forecasting 80% confidence interval higher values

[].confidence80.second

Number

Strategic indicator forecasting 80% confidence interval lower values

[].confidence95

Object

Strategic indicator forecasting 95% confidence interval

[].confidence95.first

Number

Strategic indicator forecasting 95% confidence interval higher values

[].confidence95.second

Number

Strategic indicator forecasting 95% confidence interval lower values

[].value_description

String

Readable strategic indicator value and category

[].rationale

String

Strategic indicator evaluation rationale

[].probabilities

Array

Strategic indicator categories list

[].probabilities[].id

Number

Strategic indicator category identifier

[].probabilities[].label

String

Strategic indicator category label

[].probabilities[].value

Number

Strategic indicator category probability

[].probabilities[].color

String

Strategic indicator category hexadecimal color

[].probabilities[].upperThreshold

Number

Strategic indicator category upper threshold

[].date

Array

Strategic indicator assessment date

[].datasource

String

Strategic indicator source of data

[].categories_description

String

Array with the strategic indicator categories and thresholds

[].hasBN

Boolean

Does the strategic indicator have a Bayesian Network?

[].hasFeedback

Boolean

Does the strategic indicator have any feedback

[].forecastingError

Null

Errors in the forecasting

[].mismatchDays

Number

Maximum difference (in days) when there is difference in the evaluation dates between the strategic indicator and some quality factors

[].missingFactors

Null

Factors without assessment

+
+
+

HTTP response

+
+
+
HTTP/1.1 200 OK
+Content-Length: 1115
+Content-Type: application/json;charset=UTF-8
+
+[ {
+  "id" : "processperformance",
+  "dbId" : 1,
+  "name" : "Process Performance",
+  "description" : "Performance of the processes involved in the development",
+  "value" : {
+    "first" : 0.8,
+    "second" : "Good"
+  },
+  "value_description" : "Good (0.80)",
+  "rationale" : "Forecast",
+  "probabilities" : [ {
+    "id" : 10,
+    "label" : "Good",
+    "value" : 0.8,
+    "color" : "#00ff00",
+    "upperThreshold" : 0.66
+  }, {
+    "id" : 11,
+    "label" : "Neutral",
+    "value" : 0.2,
+    "color" : "#ff8000",
+    "upperThreshold" : 0.33
+  }, {
+    "id" : 11,
+    "label" : "Bad",
+    "value" : 0.0,
+    "color" : "#ff0000",
+    "upperThreshold" : 0.0
+  } ],
+  "date" : [ 2019, 7, 7 ],
+  "datasource" : "Forecast",
+  "categories_description" : "[Good (0,67), Neutral (0,33), Bad (0,00)]",
+  "hasBN" : false,
+  "hasFeedback" : false,
+  "confidence80" : {
+    "first" : 0.97473043,
+    "second" : 0.9745246
+  },
+  "confidence95" : {
+    "first" : 0.9747849,
+    "second" : 0.97447014
+  },
+  "forecastingError" : null,
+  "mismatchDays" : 0,
+  "missingFactors" : null
+} ]
+
+
+
+
+

HTTP response wrong project

+
+
+
HTTP/1.1 400 Bad Request
+
+
+
+
+
+

2.6. Get detailed current evaluation

+
+

Request parameters

+ ++++ + + + + + + + + + + + + +
ParameterDescription

prj

Project external identifier

+
+
+

Curl request

+
+
+
$ curl 'http://localhost:8080/api/strategicIndicators/qualityFactors/current?prj=test' -i -X GET
+
+
+
+
+

Response fields

+ +++++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
PathTypeDescription

[].id

String

Strategic indicator identifier

[].name

String

Strategic indicator name

[].date

Array

Strategic indicator assessment date

[].value.first

Number

Strategic indicator numerical value

[].value.second

String

Strategic indicator category

[].value_description

String

Readable strategic indicator value and category

[].mismatchDays

Number

Maximum difference (in days) when there is difference in the evaluation dates between the strategic indicator and some quality factors

[].missingFactors

Null

Factors without assessment

[].factors

Array

Quality factors that compose the strategic indicator

[].factors[].id

String

Quality factor identifier

[].factors[].name

String

Quality factor name

[].factors[].description

String

Quality factor description

[].factors[].value

Number

Quality factor value

[].factors[].value_description

String

Readable quality factor value

[].factors[].date

Array

Quality factor evaluation date

[].factors[].datasource

Null

Quality factor source of data

[].factors[].rationale

String

Quality factor evaluation rationale

[].factors[].forecastingError

Null

Description of forecasting errors

[].factors[].strategicIndicators

Array

List of the strategic indicators that use this quality factor

[].factors[].formattedDate

String

Readable quality factor evaluation date

+
+
+

HTTP response

+
+
+
HTTP/1.1 200 OK
+Content-Length: 693
+Content-Type: application/json;charset=UTF-8
+
+[ {
+  "id" : "processperformance",
+  "name" : "Process Performance",
+  "date" : [ 2019, 7, 7 ],
+  "value" : {
+    "first" : 0.8,
+    "second" : "Good"
+  },
+  "value_description" : "Good (0.80)",
+  "mismatchDays" : 0,
+  "missingFactors" : null,
+  "factors" : [ {
+    "id" : "testingperformance",
+    "name" : "Testing Performance",
+    "description" : "Performance of the tests",
+    "value" : 0.8,
+    "value_description" : "0,80",
+    "date" : [ 2020, 6, 16 ],
+    "datasource" : null,
+    "rationale" : "parameters: {...}, formula: ...",
+    "forecastingError" : null,
+    "formattedDate" : "2020-06-16",
+    "strategicIndicators" : [ "processperformance" ]
+  } ]
+} ]
+
+
+
+
+

HTTP response wrong project

+
+
+
HTTP/1.1 400 Bad Request
+
+
+
+
+

HTTP response error on ElasticSearch connection

+
+
+
HTTP/1.1 500 Internal Server Error
+
+
+
+
+
+

2.7. Get one detailed current evaluation

+
+

Path parameters

+ + ++++ + + + + + + + + + + + + +
Table 1. /api/strategicIndicators/{id}/qualityFactors/current
ParameterDescription

id

Strategic indicator identifier

+
+
+

Request parameters

+ ++++ + + + + + + + + + + + + +
ParameterDescription

prj

Project external identifier

+
+
+

Curl request

+
+
+
$ curl 'http://localhost:8080/api/strategicIndicators/processperformance/qualityFactors/current?prj=test' -i -X GET
+
+
+
+
+

Response fields

+ +++++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
PathTypeDescription

[].id

String

Strategic indicator identifier

[].name

String

Strategic indicator name

[].date

Array

Strategic indicator assessment date

[].value.first

Number

Strategic indicator numerical value

[].value.second

String

Strategic indicator category

[].value_description

String

Readable strategic indicator value and category

[].mismatchDays

Number

Maximum difference (in days) when there is difference in the evaluation dates between the strategic indicator and some quality factors

[].missingFactors

Null

Factors without assessment

[].factors

Array

Quality factors that compose the strategic indicator

[].factors[].id

String

Quality factor identifier

[].factors[].name

String

Quality factor name

[].factors[].description

String

Quality factor description

[].factors[].value

Number

Quality factor value

[].factors[].value_description

String

Readable quality factor value

[].factors[].date

Array

Quality factor evaluation date

[].factors[].datasource

Null

Quality factor source of data

[].factors[].rationale

String

Quality factor evaluation rationale

[].factors[].forecastingError

Null

Description of forecasting errors

[].factors[].strategicIndicators

Array

List of the strategic indicators that use this quality factor

[].factors[].formattedDate

String

Readable quality factor evaluation date

+
+
+

HTTP response

+
+
+
HTTP/1.1 200 OK
+Content-Length: 693
+Content-Type: application/json;charset=UTF-8
+
+[ {
+  "id" : "processperformance",
+  "name" : "Process Performance",
+  "date" : [ 2019, 7, 7 ],
+  "value" : {
+    "first" : 0.8,
+    "second" : "Good"
+  },
+  "value_description" : "Good (0.80)",
+  "mismatchDays" : 0,
+  "missingFactors" : null,
+  "factors" : [ {
+    "id" : "testingperformance",
+    "name" : "Testing Performance",
+    "description" : "Performance of the tests",
+    "value" : 0.8,
+    "value_description" : "0,80",
+    "date" : [ 2020, 6, 16 ],
+    "datasource" : null,
+    "rationale" : "parameters: {...}, formula: ...",
+    "forecastingError" : null,
+    "formattedDate" : "2020-06-16",
+    "strategicIndicators" : [ "processperformance" ]
+  } ]
+} ]
+
+
+
+
+

HTTP response wrong project

+
+
+
HTTP/1.1 400 Bad Request
+
+
+
+
+

HTTP response error on ElasticSearch connection

+
+
+
HTTP/1.1 500 Internal Server Error
+
+
+
+
+
+

2.8. Get detailed historical evaluation

+
+

Request parameters

+ ++++ + + + + + + + + + + + + + + + + + + + + +
ParameterDescription

prj

Project external identifier

from

Starting date (yyyy-mm-dd) for the requested the period

to

Ending date (yyyy-mm-dd) for the requested the period

+
+
+

Curl request

+
+
+
$ curl 'http://localhost:8080/api/strategicIndicators/qualityFactors/historical?prj=test&from=2019-07-07&to=2019-07-15' -i -X GET
+
+
+
+
+

Response fields

+ +++++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
PathTypeDescription

[].id

String

Strategic indicator identifier

[].name

String

Strategic indicator name

[].date

Array

Strategic indicator assessment date

[].value.first

Number

Strategic indicator numerical value

[].value.second

String

Strategic indicator category

[].value_description

String

Readable strategic indicator value and category

[].mismatchDays

Number

Maximum difference (in days) when there is difference in the evaluation dates between the strategic indicator and some quality factors

[].missingFactors

Null

Factors without assessment

[].factors

Array

Quality factors that compose the strategic indicator

[].factors[].id

String

Quality factor identifier

[].factors[].name

String

Quality factor name

[].factors[].description

String

Quality factor description

[].factors[].value

Number

Quality factor value

[].factors[].value_description

String

Readable quality factor value

[].factors[].date

Array

Quality factor evaluation date

[].factors[].datasource

Null

Quality factor source of data

[].factors[].rationale

String

Quality factor evaluation rationale

[].factors[].forecastingError

Null

Description of forecasting errors

[].factors[].strategicIndicators

Array

List of the strategic indicators that use this quality factor

[].factors[].formattedDate

String

Readable quality factor evaluation date

+
+
+

HTTP response

+
+
+
HTTP/1.1 200 OK
+Content-Length: 693
+Content-Type: application/json;charset=UTF-8
+
+[ {
+  "id" : "processperformance",
+  "name" : "Process Performance",
+  "date" : [ 2019, 7, 7 ],
+  "value" : {
+    "first" : 0.8,
+    "second" : "Good"
+  },
+  "value_description" : "Good (0.80)",
+  "mismatchDays" : 0,
+  "missingFactors" : null,
+  "factors" : [ {
+    "id" : "testingperformance",
+    "name" : "Testing Performance",
+    "description" : "Performance of the tests",
+    "value" : 0.8,
+    "value_description" : "0,80",
+    "date" : [ 2020, 6, 16 ],
+    "datasource" : null,
+    "rationale" : "parameters: {...}, formula: ...",
+    "forecastingError" : null,
+    "formattedDate" : "2020-06-16",
+    "strategicIndicators" : [ "processperformance" ]
+  } ]
+} ]
+
+
+
+
+

HTTP response wrong project

+
+
+
HTTP/1.1 400 Bad Request
+
+
+
+
+

HTTP response error on ElasticSearch connection

+
+
+
HTTP/1.1 500 Internal Server Error
+
+
+
+
+
+

2.9. Get one detailed historical evaluation

+
+

Path parameters

+ + ++++ + + + + + + + + + + + + +
Table 1. /api/strategicIndicators/{id}/qualityFactors/historical
ParameterDescription

id

Strategic indicator identifier

+
+
+

Request parameters

+ ++++ + + + + + + + + + + + + + + + + + + + + +
ParameterDescription

prj

Project external identifier

from

Starting date (yyyy-mm-dd) for the requested the period

to

Ending date (yyyy-mm-dd) for the requested the period

+
+
+

Curl request

+
+
+
$ curl 'http://localhost:8080/api/strategicIndicators/processperformance/qualityFactors/historical?prj=test&from=2019-07-07&to=2019-07-15' -i -X GET
+
+
+
+
+

Response fields

+ +++++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
PathTypeDescription

[].id

String

Strategic indicator identifier

[].name

String

Strategic indicator name

[].date

Array

Strategic indicator assessment date

[].value.first

Number

Strategic indicator numerical value

[].value.second

String

Strategic indicator category

[].value_description

String

Readable strategic indicator value and category

[].mismatchDays

Number

Maximum difference (in days) when there is difference in the evaluation dates between the strategic indicator and some quality factors

[].missingFactors

Null

Factors without assessment

[].factors

Array

Quality factors that compose the strategic indicator

[].factors[].id

String

Quality factor identifier

[].factors[].name

String

Quality factor name

[].factors[].description

String

Quality factor description

[].factors[].value

Number

Quality factor value

[].factors[].value_description

String

Readable quality factor value

[].factors[].date

Array

Quality factor evaluation date

[].factors[].datasource

Null

Quality factor source of data

[].factors[].rationale

String

Quality factor evaluation rationale

[].factors[].forecastingError

Null

Description of forecasting errors

[].factors[].strategicIndicators

Array

List of the strategic indicators that use this quality factor

[].factors[].formattedDate

String

Readable quality factor evaluation date

+
+
+

HTTP response

+
+
+
HTTP/1.1 200 OK
+Content-Length: 693
+Content-Type: application/json;charset=UTF-8
+
+[ {
+  "id" : "processperformance",
+  "name" : "Process Performance",
+  "date" : [ 2019, 7, 7 ],
+  "value" : {
+    "first" : 0.8,
+    "second" : "Good"
+  },
+  "value_description" : "Good (0.80)",
+  "mismatchDays" : 0,
+  "missingFactors" : null,
+  "factors" : [ {
+    "id" : "testingperformance",
+    "name" : "Testing Performance",
+    "description" : "Performance of the tests",
+    "value" : 0.8,
+    "value_description" : "0,80",
+    "date" : [ 2020, 6, 16 ],
+    "datasource" : null,
+    "rationale" : "parameters: {...}, formula: ...",
+    "forecastingError" : null,
+    "formattedDate" : "2020-06-16",
+    "strategicIndicators" : [ "processperformance" ]
+  } ]
+} ]
+
+
+
+
+

HTTP response wrong project

+
+
+
HTTP/1.1 400 Bad Request
+
+
+
+
+

HTTP response error on ElasticSearch connection

+
+
+
HTTP/1.1 500 Internal Server Error
+
+
+
+
+
+

2.10. Get detailed prediction evaluation

+
+

Request parameters

+ ++++ + + + + + + + + + + + + + + + + + + + + +
ParameterDescription

prj

Project external identifier

technique

Forecasting technique

horizon

Amount of days that the prediction will cover

+
+
+

Curl request

+
+
+
$ curl 'http://localhost:8080/api/strategicIndicators/qualityFactors/prediction?prj=test&technique=PROPHET&horizon=7' -i -X GET
+
+
+
+
+

Response fields

+ +++++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
PathTypeDescription

[].id

String

Strategic indicator identifier

[].name

String

Strategic indicator name

[].date

Array

Strategic indicator assessment date

[].value.first

Number

Strategic indicator numerical value

[].value.second

String

Strategic indicator category

[].value_description

String

Readable strategic indicator value and category

[].mismatchDays

Number

Maximum difference (in days) when there is difference in the evaluation dates between the strategic indicator and some quality factors

[].missingFactors

Null

Factors without assessment

[].factors

Array

Quality factors that compose the strategic indicator

[].factors[].id

String

Quality factor identifier

[].factors[].name

String

Quality factor name

[].factors[].description

String

Quality factor description

[].factors[].value

Number

Quality factor value

[].factors[].value_description

String

Readable quality factor value

[].factors[].date

Array

Quality factor evaluation date

[].factors[].datasource

String

Quality factor source of data

[].factors[].rationale

String

Quality factor evaluation rationale

[].factors[].forecastingError

Null

Description of forecasting errors

[].factors[].strategicIndicators

Array

List of the strategic indicators that use this quality factor

[].factors[].formattedDate

String

Readable quality factor evaluation date

+
+
+

HTTP response

+
+
+
HTTP/1.1 200 OK
+Content-Length: 676
+Content-Type: application/json;charset=UTF-8
+
+[ {
+  "id" : "processperformance",
+  "name" : "Process Performance",
+  "date" : [ 2019, 7, 7 ],
+  "value" : {
+    "first" : 0.8,
+    "second" : "Good"
+  },
+  "value_description" : "Good (0.80)",
+  "mismatchDays" : 0,
+  "missingFactors" : null,
+  "factors" : [ {
+    "id" : "testingperformance",
+    "name" : "Testing Performance",
+    "description" : "Performance of the tests",
+    "value" : 0.8,
+    "value_description" : "0,80",
+    "date" : [ 2020, 6, 16 ],
+    "datasource" : "Forecast",
+    "rationale" : "Forecast",
+    "forecastingError" : null,
+    "formattedDate" : "2020-06-16",
+    "strategicIndicators" : [ "processperformance" ]
+  } ]
+} ]
+
+
+
+
+

HTTP response wrong project

+
+
+
HTTP/1.1 400 Bad Request
+
+
+
+
+
+

2.11. Get one detailed prediction evaluation

+
+

Path parameters

+ + ++++ + + + + + + + + + + + + +
Table 1. /api/strategicIndicators/{id}/qualityFactors/prediction
ParameterDescription

id

Strategic indicator identifier

+
+
+

Request parameters

+ ++++ + + + + + + + + + + + + + + + + + + + + +
ParameterDescription

prj

Project external identifier

technique

Forecasting technique

horizon

Amount of days that the prediction will cover

+
+
+

Curl request

+
+
+
$ curl 'http://localhost:8080/api/strategicIndicators/processperformance/qualityFactors/prediction?prj=test&technique=PROPHET&horizon=7' -i -X GET
+
+
+
+
+

Response fields

+ +++++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
PathTypeDescription

[].id

String

Strategic indicator identifier

[].name

String

Strategic indicator name

[].date

Array

Strategic indicator assessment date

[].value.first

Number

Strategic indicator numerical value

[].value.second

String

Strategic indicator category

[].value_description

String

Readable strategic indicator value and category

[].mismatchDays

Number

Maximum difference (in days) when there is difference in the evaluation dates between the strategic indicator and some quality factors

[].missingFactors

Null

Factors without assessment

[].factors

Array

Quality factors that compose the strategic indicator

[].factors[].id

String

Quality factor identifier

[].factors[].name

String

Quality factor name

[].factors[].description

String

Quality factor description

[].factors[].value

Number

Quality factor value

[].factors[].value_description

String

Readable quality factor value

[].factors[].date

Array

Quality factor evaluation date

[].factors[].datasource

String

Quality factor source of data

[].factors[].rationale

String

Quality factor evaluation rationale

[].factors[].forecastingError

Null

Description of forecasting errors

[].factors[].strategicIndicators

Array

List of the strategic indicators that use this quality factor

[].factors[].formattedDate

String

Readable quality factor evaluation date

+
+
+

HTTP response

+
+
+
HTTP/1.1 200 OK
+Content-Length: 676
+Content-Type: application/json;charset=UTF-8
+
+[ {
+  "id" : "processperformance",
+  "name" : "Process Performance",
+  "date" : [ 2019, 7, 7 ],
+  "value" : {
+    "first" : 0.8,
+    "second" : "Good"
+  },
+  "value_description" : "Good (0.80)",
+  "mismatchDays" : 0,
+  "missingFactors" : null,
+  "factors" : [ {
+    "id" : "testingperformance",
+    "name" : "Testing Performance",
+    "description" : "Performance of the tests",
+    "value" : 0.8,
+    "value_description" : "0,80",
+    "date" : [ 2020, 6, 16 ],
+    "datasource" : "Forecast",
+    "rationale" : "Forecast",
+    "forecastingError" : null,
+    "formattedDate" : "2020-06-16",
+    "strategicIndicators" : [ "processperformance" ]
+  } ]
+} ]
+
+
+
+
+

HTTP response wrong project

+
+
+
HTTP/1.1 400 Bad Request
+
+
+
+
+
+

2.12. Get all strategic indicators

+
+

Request parameters

+ ++++ + + + + + + + + + + + + +
ParameterDescription

prj

Project external identifier

+
+
+

Curl request

+
+
+
$ curl 'http://localhost:8080/api/strategicIndicators?prj=test' -i -X GET
+
+
+
+
+

Response fields

+ +++++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
PathTypeDescription

[].id

Number

Strategic indicator identifier

[].externalId

String

Strategic indicator external identifier

[].name

String

Strategic indicator name

[].description

String

Strategic indicator description

[].network

Null

Strategic indicator bayesian network

[].qualityFactors

Array

List of the quality factors composing the strategic indicator

[].qualityFactors[]

Array

Quality factor name

[].weighted

Boolean

Strategic indicator is weighted or not

[].qualityFactorsWeights

Array

List of the quality factors composing the strategic indicator with their corresponding weights

+
+
+

HTTP response

+
+
+
HTTP/1.1 200 OK
+Content-Length: 371
+Content-Type: application/json;charset=UTF-8
+
+[ {
+  "id" : 1,
+  "externalId" : "productquality",
+  "name" : "Product Quality",
+  "description" : "Quality of the product built",
+  "network" : null,
+  "qualityFactors" : [ "codequality", "softwarestability", "testingstatus" ],
+  "weighted" : false,
+  "qualityFactorsWeights" : [ "codequality", "-1.0", "softwarestability", "-1.0", "testingstatus", "-1.0" ]
+} ]
+
+
+
+
+
+

2.13. Get one strategic indicator

+
+

Path parameters

+ + ++++ + + + + + + + + + + + + +
Table 1. /api/strategicIndicators/{id}
ParameterDescription

id

Strategic indicator identifier

+
+
+

Curl request

+
+
+
$ curl 'http://localhost:8080/api/strategicIndicators/1' -i -X GET
+
+
+
+
+

Response fields

+ +++++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
PathTypeDescription

id

Number

Strategic indicator identifier

externalId

String

Strategic indicator external identifier

name

String

Strategic indicator name

description

String

Strategic indicator description

network

String

Strategic indicator bayesian network

qualityFactors

Array

Strategic indicator quality factors identifiers list

weighted

Boolean

Strategic indicator’s boolean field which identify if it is weighted or not

qualityFactorsWeights

Array

Strategic indicator quality factors identifiers and weights list (-1.0 represent non weighted Strategic indicator)

+
+
+

HTTP response

+
+
+
HTTP/1.1 200 OK
+Content-Length: 9317
+Content-Type: application/json;charset=UTF-8
+
+{
+  "id" : 1,
+  "externalId" : "productquality",
+  "name" : "Product Quality",
+  "description" : "Quality of the product built",
+  "network" : "Ly8gfi0+W0RORVQtMV0tPn4NCg0KLy8gRmlsZSBjcmVhdGVkIGJ5IGFuIHVubGljZW5zZWQgdXNlciB1c2luZyBOZXRpY2EgNi4wNCBvbiBNYXIgMjAsIDIwMTggYXQgMTA6NDU6MTEgVVRDLg0KDQpibmV0IHByb2R1Y3RxdWFsaXR5IHsNCkF1dG9Db21waWxlID0gVFJVRTsNCmF1dG91cGRhdGUgPSBUUlVFOw0Kd2hlbmNoYW5nZWQgPSAxNTIxNTQxMTc5Ow0KDQp2aXN1YWwgVjEgew0KCWRlZmRpc3Bmb3JtID0gQkVMSUVGQkFSUzsNCglub2RlbGFiZWxpbmcgPSBUSVRMRTsNCglOb2RlTWF4TnVtRW50cmllcyA9IDUwOw0KCW5vZGVmb250ID0gZm9udCB7c2hhcGU9ICJBcmlhbCI7IHNpemU9IDk7fTsNCglsaW5rZm9udCA9IGZvbnQge3NoYXBlPSAiQXJpYWwiOyBzaXplPSA5O307DQoJU2hvd0xpbmtTdHJlbmd0aHMgPSAxOw0KCXdpbmRvd3Bvc24gPSAoMiwgNSwgOTMyLCA2MzcpOw0KCXJlc29sdXRpb24gPSA3MjsNCglkcmF3aW5nYm91bmRzID0gKDEwODAsIDcyMCk7DQoJc2hvd3BhZ2VicmVha3MgPSBGQUxTRTsNCgl1c2VncmlkID0gVFJVRTsNCglncmlkc3BhY2UgPSAoNiwgNik7DQoJTm9kZVNldCBOb2RlIHtCdWlsdEluID0gMTsgQ29sb3IgPSAweDAwZTFlMWUxO307DQoJTm9kZVNldCBOYXR1cmUge0J1aWx0SW4gPSAxOyBDb2xvciA9IDB4MDBmOGVlZDI7fTsNCglOb2RlU2V0IERldGVybWluaXN0aWMge0J1aWx0SW4gPSAxOyBDb2xvciA9IDB4MDBkM2NhYTY7fTsNCglOb2RlU2V0IEZpbmRpbmcge0J1aWx0SW4gPSAxOyBDb2xvciA9IDB4MDBjOGM4Yzg7fTsNCglOb2RlU2V0IENvbnN0YW50IHtCdWlsdEluID0gMTsgQ29sb3IgPSAweDAwZmZmZmZmO307DQoJTm9kZVNldCBDb25zdGFudFZhbHVlIHtCdWlsdEluID0gMTsgQ29sb3IgPSAweDAwZmZmZmI0O307DQoJTm9kZVNldCBVdGlsaXR5IHtCdWlsdEluID0gMTsgQ29sb3IgPSAweDAwZmZiZGJkO307DQoJTm9kZVNldCBEZWNpc2lvbiB7QnVpbHRJbiA9IDE7IENvbG9yID0gMHgwMGRlZThmZjt9Ow0KCU5vZGVTZXQgRG9jdW1lbnRhdGlvbiB7QnVpbHRJbiA9IDE7IENvbG9yID0gMHgwMGYwZmFmYTt9Ow0KCU5vZGVTZXQgVGl0bGUge0J1aWx0SW4gPSAxOyBDb2xvciA9IDB4MDBmZmZmZmY7fTsNCglQcmludGVyU2V0dGluZyBBIHsNCgkJbWFyZ2lucyA9ICgxMjcwLCAxMjcwLCAxMjcwLCAxMjcwKTsNCgkJfTsNCgl9Ow0KDQpub2RlIGNvZGVxdWFsaXR5IHsNCglkaXNjcmV0ZSA9IFRSVUU7DQoJc3RhdGVzID0gKExvdywgTWVkaXVtLCBIaWdoKTsNCglraW5kID0gTkFUVVJFOw0KCWNoYW5jZSA9IENIQU5DRTsNCglwYXJlbnRzID0gKCk7DQoJcHJvYnMgPSANCgkJLy8gTG93ICAgICAgICAgIE1lZGl1bSAgICAgICBIaWdoICAgICAgICAgDQoJCSAgKDAuMjUsICAgICAgICAwLjQsICAgICAgICAgMC4zNSk7DQoJd2hlbmNoYW5nZWQgPSAxNTIxNTQxMTUxOw0KCWJlbGllZiA9ICgwLjI1LCAwLjQsIDAuMzUpOw0KCXZpc3VhbCBWMSB7DQoJCWNlbnRlciA9ICg5NiwgNDIpOw0KCQloZWlnaHQgPSAxOw0KCQl9Ow0KCX07DQoNCm5vZGUgc29mdHdhcmVzdGFiaWxpdHkgew0KCWRpc2NyZXRlID0gVFJVRTsNCglzdGF0ZXMgPSAoTG93LCBNZWRpdW0sIEhpZ2gpOw0KCWtpbmQgPSBOQVRVUkU7DQoJY2hhbmNlID0gQ0hBTkNFOw0KCXBhcmVudHMgPSAoKTsNCglwcm9icyA9IA0KCQkvLyBMb3cgICAgICAgICAgTWVkaXVtICAgICAgIEhpZ2ggICAgICAgICANCgkJICAoMC4xLCAgICAgICAgIDAuMywgICAgICAgICAwLjYpOw0KCXdoZW5jaGFuZ2VkID0gMTUyMTU0MTE2NjsNCgliZWxpZWYgPSAoMC4xLCAwLjMsIDAuNik7DQoJdmlzdWFsIFYxIHsNCgkJY2VudGVyID0gKDM2NiwgNDIpOw0KCQloZWlnaHQgPSA0Ow0KCQl9Ow0KCX07DQoNCm5vZGUgdGVzdGluZ3N0YXR1cyB7DQoJZGlzY3JldGUgPSBUUlVFOw0KCXN0YXRlcyA9IChMb3csIE1lZGl1bSwgSGlnaCk7DQoJa2luZCA9IE5BVFVSRTsNCgljaGFuY2UgPSBDSEFOQ0U7DQoJcGFyZW50cyA9ICgpOw0KCXByb2JzID0gDQoJCS8vIExvdyAgICAgICAgICBNZWRpdW0gICAgICAgSGlnaCAgICAgICAgIA0KCQkgICgwLjIsICAgICAgICAgMC42LCAgICAgICAgIDAuMik7DQoJd2hlbmNoYW5nZWQgPSAxNTIxNTQxMTc5Ow0KCWJlbGllZiA9ICgwLjIsIDAuNiwgMC4yKTsNCgl2aXN1YWwgVjEgew0KCQljZW50ZXIgPSAoNjE4LCA0Mik7DQoJCWhlaWdodCA9IDI7DQoJCX07DQoJfTsNCg0Kbm9kZSBwcm9kdWN0cXVhbGl0eSB7DQoJZGlzY3JldGUgPSBUUlVFOw0KCXN0YXRlcyA9IChMb3csIE1lZGl1bSwgSGlnaCk7DQoJa2luZCA9IE5BVFVSRTsNCgljaGFuY2UgPSBDSEFOQ0U7DQoJcGFyZW50cyA9IChjb2RlcXVhbGl0eSwgc29mdHdhcmVzdGFiaWxpdHksIHRlc3RpbmdzdGF0dXMpOw0KCXByb2JzID0gDQoJCS8vIExvdyAgICAgICAgICBNZWRpdW0gICAgICAgSGlnaCAgICAgICAgICAvLyBDb2RlUXVhbGl0eSBTdGFiaWxpdHkgVGVzdGluZ1N0YXR1cyANCgkJICAoMSwgICAgICAgICAgIDAsICAgICAgICAgICAwLCAgICAgICAgICAgIC8vIExvdyAgICAgICAgIExvdyAgICAgICBMb3cgICAgICAgICAgIA0KCQkgICAwLjk1LCAgICAgICAgMC4wNSwgICAgICAgIDAsICAgICAgICAgICAgLy8gTG93ICAgICAgICAgTG93ICAgICAgIE1lZGl1bSAgICAgICAgDQoJCSAgIDAuNzEsICAgICAgICAwLjA5LCAgICAgICAgMC4yLCAgICAgICAgICAvLyBMb3cgICAgICAgICBMb3cgICAgICAgSGlnaCAgICAgICAgICANCgkJICAgMC44LCAgICAgICAgIDAuMiwgICAgICAgICAwLCAgICAgICAgICAgIC8vIExvdyAgICAgICAgIE1lZGl1bSAgICBMb3cgICAgICAgICAgIA0KCQkgICAwLjU3Mzc1LCAgICAgMC4zMzM3NSwgICAgIDAuMDkyNSwgICAgICAgLy8gTG93ICAgICAgICAgTWVkaXVtICAgIE1lZGl1bSAgICAgICAgDQoJCSAgIDAuNDU1LCAgICAgICAwLjI3NzUsICAgICAgMC4yNjc1LCAgICAgICAvLyBMb3cgICAgICAgICBNZWRpdW0gICAgSGlnaCAgICAgICAgICANCgkJICAgMC4zOTYyNSwgICAgIDAuNDE1LCAgICAgICAwLjE4ODc1LCAgICAgIC8vIExvdyAgICAgICAgIEhpZ2ggICAgICBMb3cgICAgICAgICAgIA0KCQkgICAwLjM5OTM3NSwgICAgMC40MTgxMjUsICAgIDAuMTgyNSwgICAgICAgLy8gTG93ICAgICAgICAgSGlnaCAgICAgIE1lZGl1bSAgICAgICAgDQoJCSAgIDAuMjgwNjI1LCAgICAwLjM2MTg3NSwgICAgMC4zNTc1LCAgICAgICAvLyBMb3cgICAgICAgICBIaWdoICAgICAgSGlnaCAgICAgICAgICANCgkJICAgMC42NTA2MjUsICAgIDAuMjI4MTI1LCAgICAwLjEyMTI1LCAgICAgIC8vIE1lZGl1bSAgICAgIExvdyAgICAgICBMb3cgICAgICAgICAgIA0KCQkgICAwLjk1LCAgICAgICAgMC4wNSwgICAgICAgIDAsICAgICAgICAgICAgLy8gTWVkaXVtICAgICAgTG93ICAgICAgIE1lZGl1bSAgICAgICAgDQoJCSAgIDAuNTM1LCAgICAgICAwLjE3NSwgICAgICAgMC4yOSwgICAgICAgICAvLyBNZWRpdW0gICAgICBMb3cgICAgICAgSGlnaCAgICAgICAgICANCgkJICAgMC4zOTU2MjUsICAgIDAuNDE1NjI1LCAgICAwLjE4ODc1LCAgICAgIC8vIE1lZGl1bSAgICAgIE1lZGl1bSAgICBMb3cgICAgICAgICAgIA0KCQkgICAwLjM5ODc1LCAgICAgMC40MTg3NSwgICAgIDAuMTgyNSwgICAgICAgLy8gTWVkaXVtICAgICAgTWVkaXVtICAgIE1lZGl1bSAgICAgICAgDQoJCSAgIDAuMjgsICAgICAgICAwLjM2MjUsICAgICAgMC4zNTc1LCAgICAgICAvLyBNZWRpdW0gICAgICBNZWRpdW0gICAgSGlnaCAgICAgICAgICANCgkJICAgMC4wNSwgICAgICAgIDAuODUsICAgICAgICAwLjEsICAgICAgICAgIC8vIE1lZGl1bSAgICAgIEhpZ2ggICAgICBMb3cgICAgICAgICAgIA0KCQkgICAwLjIyNDM3NSwgICAgMC41MDMxMjUsICAgIDAuMjcyNSwgICAgICAgLy8gTWVkaXVtICAgICAgSGlnaCAgICAgIE1lZGl1bSAgICAgICAgDQoJCSAgIDAsICAgICAgICAgICAwLjIsICAgICAgICAgMC44LCAgICAgICAgICAvLyBNZWRpdW0gICAgICBIaWdoICAgICAgSGlnaCAgICAgICAgICANCgkJICAgMC41NTA2MjUsICAgIDAuMzM4MTI1LCAgICAwLjExMTI1LCAgICAgIC8vIEhpZ2ggICAgICAgIExvdyAgICAgICBMb3cgICAgICAgICAgIA0KCQkgICAwLjU1Mzc1LCAgICAgMC4zNDEyNSwgICAgIDAuMTA1LCAgICAgICAgLy8gSGlnaCAgICAgICAgTG93ICAgICAgIE1lZGl1bSAgICAgICAgDQoJCSAgIDAuNDM1LCAgICAgICAwLjI4NSwgICAgICAgMC4yOCwgICAgICAgICAvLyBIaWdoICAgICAgICBMb3cgICAgICAgSGlnaCAgICAgICAgICANCgkJICAgMC4yOTU2MjUsICAgIDAuNTI1NjI1LCAgICAwLjE3ODc1LCAgICAgIC8vIEhpZ2ggICAgICAgIE1lZGl1bSAgICBMb3cgICAgICAgICAgIA0KCQkgICAwLCAgICAgICAgICAgMC43LCAgICAgICAgIDAuMywgICAgICAgICAgLy8gSGlnaCAgICAgICAgTWVkaXVtICAgIE1lZGl1bSAgICAgICAgDQoJCSAgIDAuMTgsICAgICAgICAwLjQ3MjUsICAgICAgMC4zNDc1LCAgICAgICAvLyBIaWdoICAgICAgICBNZWRpdW0gICAgSGlnaCAgICAgICAgICANCgkJICAgMCwgICAgICAgICAgIDAuNiwgICAgICAgICAwLjQsICAgICAgICAgIC8vIEhpZ2ggICAgICAgIEhpZ2ggICAgICBMb3cgICAgICAgICAgIA0KCQkgICAwLCAgICAgICAgICAgMC45LCAgICAgICAgIDAuMSwgICAgICAgICAgLy8gSGlnaCAgICAgICAgSGlnaCAgICAgIE1lZGl1bSAgICAgICAgDQoJCSAgIDAuMDA1NjI1LCAgICAwLjU1Njg3NTEsICAgMC40Mzc1KTsgICAgICAvLyBIaWdoICAgICAgICBIaWdoICAgICAgSGlnaCAgICAgICAgICA7DQoJbnVtY2FzZXMgPSANCgkJICAgICAgICAgICAgICAgICAvLyBDb2RlUXVhbGl0eSBTdGFiaWxpdHkgVGVzdGluZ1N0YXR1cyANCgkJICAoMCwgICAgICAgICAgICAvLyBMb3cgICAgICAgICBMb3cgICAgICAgTG93ICAgICAgICAgICANCgkJICAgMCwgICAgICAgICAgICAvLyBMb3cgICAgICAgICBMb3cgICAgICAgTWVkaXVtICAgICAgICANCgkJICAgMCwgICAgICAgICAgICAvLyBMb3cgICAgICAgICBMb3cgICAgICAgSGlnaCAgICAgICAgICANCgkJICAgMCwgICAgICAgICAgICAvLyBMb3cgICAgICAgICBNZWRpdW0gICAgTG93ICAgICAgICAgICANCgkJICAgMCwgICAgICAgICAgICAvLyBMb3cgICAgICAgICBNZWRpdW0gICAgTWVkaXVtICAgICAgICANCgkJICAgMCwgICAgICAgICAgICAvLyBMb3cgICAgICAgICBNZWRpdW0gICAgSGlnaCAgICAgICAgICANCgkJICAgMCwgICAgICAgICAgICAvLyBMb3cgICAgICAgICBIaWdoICAgICAgTG93ICAgICAgICAgICANCgkJICAgMCwgICAgICAgICAgICAvLyBMb3cgICAgICAgICBIaWdoICAgICAgTWVkaXVtICAgICAgICANCgkJICAgMCwgICAgICAgICAgICAvLyBMb3cgICAgICAgICBIaWdoICAgICAgSGlnaCAgICAgICAgICANCgkJICAgLTEsICAgICAgICAgICAvLyBNZWRpdW0gICAgICBMb3cgICAgICAgTG93ICAgICAgICAgICANCgkJICAgMCwgICAgICAgICAgICAvLyBNZWRpdW0gICAgICBMb3cgICAgICAgTWVkaXVtICAgICAgICANCgkJICAgMCwgICAgICAgICAgICAvLyBNZWRpdW0gICAgICBMb3cgICAgICAgSGlnaCAgICAgICAgICANCgkJICAgMCwgICAgICAgICAgICAvLyBNZWRpdW0gICAgICBNZWRpdW0gICAgTG93ICAgICAgICAgICANCgkJICAgLTEsICAgICAgICAgICAvLyBNZWRpdW0gICAgICBNZWRpdW0gICAgTWVkaXVtICAgICAgICANCgkJICAgMCwgICAgICAgICAgICAvLyBNZWRpdW0gICAgICBNZWRpdW0gICAgSGlnaCAgICAgICAgICANCgkJICAgMCwgICAgICAgICAgICAvLyBNZWRpdW0gICAgICBIaWdoICAgICAgTG93ICAgICAgICAgICANCgkJICAgMCwgICAgICAgICAgICAvLyBNZWRpdW0gICAgICBIaWdoICAgICAgTWVkaXVtICAgICAgICANCgkJICAgMCwgICAgICAgICAgICAvLyBNZWRpdW0gICAgICBIaWdoICAgICAgSGlnaCAgICAgICAgICANCgkJICAgMCwgICAgICAgICAgICAvLyBIaWdoICAgICAgICBMb3cgICAgICAgTG93ICAgICAgICAgICANCgkJICAgMCwgICAgICAgICAgICAvLyBIaWdoICAgICAgICBMb3cgICAgICAgTWVkaXVtICAgICAgICANCgkJICAgMCwgICAgICAgICAgICAvLyBIaWdoICAgICAgICBMb3cgICAgICAgSGlnaCAgICAgICAgICANCgkJICAgMCwgICAgICAgICAgICAvLyBIaWdoICAgICAgICBNZWRpdW0gICAgTG93ICAgICAgICAgICANCgkJICAgMCwgICAgICAgICAgICAvLyBIaWdoICAgICAgICBNZWRpdW0gICAgTWVkaXVtICAgICAgICANCgkJICAgMCwgICAgICAgICAgICAvLyBIaWdoICAgICAgICBNZWRpdW0gICAgSGlnaCAgICAgICAgICANCgkJICAgMCwgICAgICAgICAgICAvLyBIaWdoICAgICAgICBIaWdoICAgICAgTG93ICAgICAgICAgICANCgkJICAgMCwgICAgICAgICAgICAvLyBIaWdoICAgICAgICBIaWdoICAgICAgTWVkaXVtICAgICAgICANCgkJICAgMSk7ICAgICAgICAgICAvLyBIaWdoICAgICAgICBIaWdoICAgICAgSGlnaCAgICAgICAgICA7DQoJd2hlbmNoYW5nZWQgPSAwOw0KCWJlbGllZiA9ICgwLjI2NDM2NjIsIDAuNDk4OTk2MywgMC4yMzY2Mzc1KTsNCgl2aXN1YWwgVjEgew0KCQljZW50ZXIgPSAoMzcyLCAyNTgpOw0KCQloZWlnaHQgPSAzOw0KCQl9Ow0KCX07DQpFbGltT3JkZXIgPSAoY29kZXF1YWxpdHksIHNvZnR3YXJlc3RhYmlsaXR5LCB0ZXN0aW5nc3RhdHVzLCBwcm9kdWN0cXVhbGl0eSk7DQp9Ow0K",
+  "qualityFactors" : [ "codequality", "softwarestability", "testingstatus" ],
+  "weighted" : false,
+  "qualityFactorsWeights" : [ "codequality", "-1.0", "softwarestability", "-1.0", "testingstatus", "-1.0" ]
+}
+
+
+
+
+
+

2.14. Add strategic indicator

+
+

Request parameters

+ ++++ + + + + + + + + + + + + + + + + + + + + + + + + +
ParameterDescription

prj

Project external identifier

name

Product name

description

Product description

quality_factors

Comma separated values of the quality factors identifiers which belong to the strategic indicator

+
+
+

Request parts

+ ++++ + + + + + + + + + + + + +
PartDescription

network

Bayesian network file

+
+
+

Curl request

+
+
+
$ curl 'http://localhost:8080/api/strategicIndicators' -i -X POST \
+    -H 'Content-Type: multipart/form-data' \
+    -F 'network=@network.dne;type=text/plain' \
+    -F 'prj=test' \
+    -F 'name=Product Quality' \
+    -F 'description=Quality of the product built' \
+    -F 'quality_factors=codequality,softwarestability,testingstatus'
+
+
+
+
+

HTTP response

+
+
+
HTTP/1.1 201 Created
+
+
+
+
+

HTTP response assessment error

+
+
+
HTTP/1.1 500 Internal Server Error
+
+
+
+
+
+

2.15. Update strategic indicator

+
+

Request parameters

+ ++++ + + + + + + + + + + + + + + + + + + + + +
ParameterDescription

name

Product name

description

Product description

quality_factors

Comma separated values of the quality factors identifiers which belong to the strategic indicator and their corresponding weights (-1 if no weighted)

+
+
+

Request parts

+ ++++ + + + + + + + + + + + + +
PartDescription

network

Bayesian network file

+
+
+

Curl request

+
+
+
$ curl 'http://localhost:8080/api/strategicIndicators/1' -i -X PUT \
+    -H 'Content-Type: multipart/form-data' \
+    -F 'network=@network.dne;type=text/plain' \
+    -F 'name=Product Quality' \
+    -F 'description=Quality of the product built' \
+    -F 'quality_factors=codequality,-1.0,softwarestability,-1.0,testingstatus,-1.0'
+
+
+
+
+

HTTP response

+
+
+
HTTP/1.1 200 OK
+
+
+
+
+

HTTP response missing parameter

+
+
+
HTTP/1.1 400 Bad Request
+
+
+
+
+

HTTP response data integrity violation

+
+
+
HTTP/1.1 409 Conflict
+
+
+
+
+

HTTP response assessment error

+
+
+
HTTP/1.1 500 Internal Server Error
+
+
+
+
+
+

2.16. Delete strategic indicator

+
+

Path parameters

+ + ++++ + + + + + + + + + + + + +
Table 1. /api/strategicIndicators/{id}
ParameterDescription

id

Strategic indicator identifier

+
+
+

Curl request

+
+
+
$ curl 'http://localhost:8080/api/strategicIndicators/1' -i -X DELETE
+
+
+
+
+

HTTP response

+
+
+
HTTP/1.1 200 OK
+
+
+
+
+
+

2.17. Fetch strategic indicators

+
+

Curl request

+
+
+
$ curl 'http://localhost:8080/api/strategicIndicators/fetch' -i -X GET
+
+
+
+
+

HTTP response

+
+
+
HTTP/1.1 200 OK
+
+
+
+
+
+

2.18. Assess strategic indicators

+
+

Request parameters

+ ++++ + + + + + + + + + + + + + + + + + + + + +
ParameterDescription

prj

Project external identifier

train

Indicates if the forecasting models should be trained: NONE for no training, ONE for one method training and ALL for all methods training

from

Date of the day (yyyy-mm-dd) from which execute several assessments, one for each day since today (optional)

+
+
+

Curl request

+
+
+
$ curl 'http://localhost:8080/api/strategicIndicators/assess?prj=test&train=NONE' -i -X GET
+
+
+
+
+

HTTP response

+
+
+
HTTP/1.1 200 OK
+
+
+
+
+

HTTP response bad parameter

+
+
+
HTTP/1.1 400 Bad Request
+
+
+
+
+

HTTP response assessment error

+
+
+
HTTP/1.1 500 Internal Server Error
+
+
+
+
+
+

2.19. Assess strategic indicators (deprecated)

+
+ + + + + +
+
Note
+
+This operation is deprecated. Please, use Assess strategic indicators +
+
+
+

Request parameters

+ ++++ + + + + + + + + + + + + + + + + + + + + +
ParameterDescription

prj

Project external identifier

train

Indicates if the forecasting models should be trained: NONE for no training, ONE for one method training and ALL for all methods training

from

Date of the day (yyyy-mm-dd) from which execute several assessments, one for each day since today (optional)

+
+
+

Curl request

+
+
+
$ curl 'http://localhost:8080/api/assessStrategicIndicators?prj=test&train=NONE' -i -X GET
+
+
+
+
+

HTTP response

+
+
+
HTTP/1.1 200 OK
+
+
+
+
+

HTTP response bad parameter

+
+
+
HTTP/1.1 400 Bad Request
+
+
+
+
+

HTTP response assessment error

+
+
+
HTTP/1.1 500 Internal Server Error
+
+
+
+
+
+

2.20. Simulate strategic indicators assessment

+
+

Request parameters

+ ++++ + + + + + + + + + + + + + + + + +
ParameterDescription

prj

Project external identifier

factors

List of the names and new values of the quality factors

+
+
+

Curl request

+
+
+
$ curl 'http://localhost:8080/api/strategicIndicators/simulate' -i -X POST \
+    -d 'prj=test&factors=%5B%7B%22id%22%3A%22processperformance%22%2C%22value%22%3A%220.9%22%7D%5D'
+
+
+
+
+

Response fields

+ +++++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
PathTypeDescription

[].id

String

Strategic indicator identifier

[].dbId

Number

Strategic indicator database identifier

[].name

String

Strategic indicator name

[].description

String

Strategic indicator description

[].value.first

Number

Strategic indicator numerical value

[].value.second

String

Strategic indicator category

[].confidence80

Null

Strategic indicator forecasting 80% confidence interval

[].confidence95

Null

Strategic indicator forecasting 95% confidence interval

[].value_description

String

Readable strategic indicator value and category

[].rationale

String

Strategic indicator evaluation rationale

[].probabilities

Array

Strategic indicator categories list

[].probabilities[].id

Number

Strategic indicator category identifier

[].probabilities[].label

String

Strategic indicator category label

[].probabilities[].value

Null

Strategic indicator category probability

[].probabilities[].color

String

Strategic indicator category hexadecimal color

[].probabilities[].upperThreshold

Number

Strategic indicator category upper threshold

[].date

Null

Strategic indicator assessment date

[].datasource

String

Strategic indicator source of data

[].categories_description

String

Array with the strategic indicator categories and thresholds

[].hasBN

Boolean

Does the strategic indicator have a Bayesian Network?

[].hasFeedback

Boolean

Does the strategic indicator have any feedback

[].forecastingError

Null

Errors in the forecasting

[].mismatchDays

Number

Maximum difference (in days) when there is difference in the evaluation dates between the strategic indicator and some quality factors

[].missingFactors

Null

Factors without assessment

+
+
+

HTTP response

+
+
+
HTTP/1.1 200 OK
+Content-Type: application/json;charset=UTF-8
+Content-Length: 1006
+
+[ {
+  "id" : "processperformance",
+  "dbId" : 1,
+  "name" : "Process Performance",
+  "description" : "Performance of the processes involved in the development",
+  "value" : {
+    "first" : 0.8,
+    "second" : "Good"
+  },
+  "value_description" : "Good (0.80)",
+  "rationale" : "factors: {...}, formula: ..., value: ..., category: ...",
+  "probabilities" : [ {
+    "id" : 10,
+    "label" : "Good",
+    "value" : null,
+    "color" : "#00ff00",
+    "upperThreshold" : 0.66
+  }, {
+    "id" : 11,
+    "label" : "Neutral",
+    "value" : null,
+    "color" : "#ff8000",
+    "upperThreshold" : 0.33
+  }, {
+    "id" : 11,
+    "label" : "Bad",
+    "value" : null,
+    "color" : "#ff0000",
+    "upperThreshold" : 0.0
+  } ],
+  "date" : null,
+  "datasource" : "Simulation",
+  "categories_description" : "",
+  "hasBN" : false,
+  "hasFeedback" : false,
+  "confidence80" : null,
+  "confidence95" : null,
+  "forecastingError" : null,
+  "mismatchDays" : 0,
+  "missingFactors" : null
+} ]
+
+
+
+
+

HTTP response simulation error

+
+
+
HTTP/1.1 500 Internal Server Error
+
+
+
+
+
+

2.21. Get quality model

+
+

Request parameters

+ ++++ + + + + + + + + + + + + + + + + +
ParameterDescription

prj

Project external identifier

date

Date (yyyy-mm-dd) of the quality model evaluation

+
+
+

Curl request

+
+
+
$ curl 'http://localhost:8080/api/strategicIndicators/qualityModel?prj=test&date=2019-07-07' -i -X GET
+
+
+
+
+

Response fields

+ +++++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
PathTypeDescription

[].id

String

Strategic indicator identifier

[].name

Null

Strategic indicator name

[].value

String

Strategic indicator assessment value

[].valueDescription

String

Strategic indicator assessment value and category

[].color

String

Strategic indicator category color

[].factors

Array

List with all the quality factors composing the strategic indicator

[].factors[].id

String

Quality factor identifier

[].factors[].name

Null

Quality factor name

[].factors[].weightedValue

String

Quality factor weighted value

[].factors[].weight

String

Quality factor weight in the strategic indicator assessment

[].factors[].assessmentValue

Null

Quality factor assessment value

[].factors[].metrics

Array

List with all the metrics composing the quality factor

[].factors[].metrics[].id

String

Metric identifier

[].factors[].metrics[].name

Null

Metric name

[].factors[].metrics[].weightedValue

String

Metric weighted value

[].factors[].metrics[].weight

String

Metric weight in the computation of the quality factor

[].factors[].metrics[].assessmentValue

Null

Metric assessment value

+
+
+

HTTP response

+
+
+
HTTP/1.1 200 OK
+Content-Length: 459
+Content-Type: application/json;charset=UTF-8
+
+[ {
+  "id" : "blocking",
+  "name" : null,
+  "value" : "0.8",
+  "valueDescription" : "Good (0.8)",
+  "color" : "#00ff00",
+  "factors" : [ {
+    "id" : "blockingcode",
+    "name" : null,
+    "weightedValue" : "0.8",
+    "weight" : "1",
+    "assessmentValue" : null,
+    "metrics" : [ {
+      "id" : "nonblockingfiles",
+      "name" : null,
+      "weightedValue" : "0.8",
+      "weight" : "1",
+      "assessmentValue" : null
+    } ]
+  } ]
+} ]
+
+
+
+
+
+

2.22. Get strategic indicator categories

+
+

Curl request

+
+
+
$ curl 'http://localhost:8080/api/strategicIndicators/categories' -i -X GET
+
+
+
+
+

Response fields

+ +++++ + + + + + + + + + + + + + + + + + + + + + + + + +
PathTypeDescription

[].id

Number

Category identifier

[].name

String

Category name

[].color

String

Category hexadecimal color

+
+
+

HTTP response

+
+
+
HTTP/1.1 200 OK
+Content-Length: 193
+Content-Type: application/json;charset=UTF-8
+
+[ {
+  "id" : 10,
+  "name" : "Good",
+  "color" : "#00ff00"
+}, {
+  "id" : 11,
+  "name" : "Neutral",
+  "color" : "#ff8000"
+}, {
+  "id" : 12,
+  "name" : "Bad",
+  "color" : "#ff0000"
+} ]
+
+
+
+
+
+

2.23. Set strategic indicator categories

+
+

Request fields

+ +++++ + + + + + + + + + + + + + + + + + + + +
PathTypeDescription

[].name

String

Strategic indicator category name

[].color

String

Strategic indicator category color

+
+
+

Curl request

+
+
+
$ curl 'http://localhost:8080/api/strategicIndicators/categories' -i -X POST \
+    -H 'Content-Type: application/json' \
+    -d '[ {
+  "color" : "#00ff00",
+  "name" : "Good"
+}, {
+  "color" : "#ff8000",
+  "name" : "Neutral"
+}, {
+  "color" : "#ff0000",
+  "name" : "Bad"
+} ]'
+
+
+
+
+

HTTP response

+
+
+
HTTP/1.1 201 Created
+
+
+
+
+

HTTP response not enough categories

+
+
+
HTTP/1.1 400 Bad Request
+
+
+
+
+
+
+
+

3. Quality Factors

+
+
+

3.1. Get current evaluation

+
+

Request parameters

+ ++++ + + + + + + + + + + + + +
ParameterDescription

prj

Project external identifier

+
+
+

Curl request

+
+
+
$ curl 'http://localhost:8080/api/qualityFactors/metrics/current?prj=test' -i -X GET
+
+
+
+
+

Response fields

+ +++++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
PathTypeDescription

[].id

String

Quality factor identifier

[].name

String

Quality factor name

[].metrics

Array

List with all the quality factor metrics

[].metrics[].id

String

Metric identifier

[].metrics[].name

String

Metric name

[].metrics[].description

String

Metric description

[].metrics[].value

Number

Metric value

[].metrics[].value_description

String

Metric readable value

[].metrics[].date

Array

Metric evaluation date

[].metrics[].datasource

Null

Metric source of data

[].metrics[].rationale

String

Metric evaluation rationale

[].metrics[].confidence80

Null

Metric forecasting 80% confidence interval

[].metrics[].confidence95

Null

Metric forecasting 95% confidence interval

[].metrics[].forecastingError

Null

Description of forecasting errors

+
+
+

HTTP response

+
+
+
HTTP/1.1 200 OK
+Content-Type: application/json;charset=UTF-8
+Content-Length: 488
+
+[ {
+  "id" : "testingperformance",
+  "name" : "Testing Performance",
+  "metrics" : [ {
+    "id" : "fasttests",
+    "name" : "Fast Tests",
+    "description" : "Percentage of tests under the testing duration threshold",
+    "value" : 0.8,
+    "value_description" : "0,80",
+    "date" : [ 2020, 6, 16 ],
+    "datasource" : null,
+    "rationale" : "parameters: {...}, formula: ...",
+    "confidence80" : null,
+    "confidence95" : null,
+    "forecastingError" : null
+  } ]
+} ]
+
+
+
+
+

HTTP response wrong project

+
+
+
HTTP/1.1 400 Bad Request
+
+
+
+
+

HTTP response error on ElasticSearch connection

+
+
+
HTTP/1.1 500 Internal Server Error
+
+
+
+
+
+

3.2. Get current evaluation for strategic indicator

+
+

Path parameters

+ + ++++ + + + + + + + + + + + + +
Table 1. /api/strategicIndicators/{id}/qualityFactors/metrics/current
ParameterDescription

id

Strategic indicator identifier

+
+
+

Request parameters

+ ++++ + + + + + + + + + + + + +
ParameterDescription

prj

Project external identifier

+
+
+

Curl request

+
+
+
$ curl 'http://localhost:8080/api/strategicIndicators/processperformance/qualityFactors/metrics/current?prj=test' -i -X GET
+
+
+
+
+

Response fields

+ +++++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
PathTypeDescription

[].id

String

Quality factor identifier

[].name

String

Quality factor name

[].metrics

Array

List with all the quality factor metrics

[].metrics[].id

String

Metric identifier

[].metrics[].name

String

Metric name

[].metrics[].description

String

Metric description

[].metrics[].value

Number

Metric value

[].metrics[].value_description

String

Metric readable value

[].metrics[].date

Array

Metric evaluation date

[].metrics[].datasource

Null

Metric source of data

[].metrics[].rationale

String

Metric evaluation rationale

[].metrics[].confidence80

Null

Metric forecasting 80% confidence interval

[].metrics[].confidence95

Null

Metric forecasting 95% confidence interval

[].metrics[].forecastingError

Null

Description of forecasting errors

+
+
+

HTTP response

+
+
+
HTTP/1.1 200 OK
+Content-Type: application/json;charset=UTF-8
+Content-Length: 488
+
+[ {
+  "id" : "testingperformance",
+  "name" : "Testing Performance",
+  "metrics" : [ {
+    "id" : "fasttests",
+    "name" : "Fast Tests",
+    "description" : "Percentage of tests under the testing duration threshold",
+    "value" : 0.8,
+    "value_description" : "0,80",
+    "date" : [ 2020, 6, 16 ],
+    "datasource" : null,
+    "rationale" : "parameters: {...}, formula: ...",
+    "confidence80" : null,
+    "confidence95" : null,
+    "forecastingError" : null
+  } ]
+} ]
+
+
+
+
+

HTTP response wrong project

+
+
+
HTTP/1.1 400 Bad Request
+
+
+
+
+

HTTP response error on ElasticSearch connection

+
+
+
HTTP/1.1 500 Internal Server Error
+
+
+
+
+
+

3.3. Get historical evaluation

+
+

Request parameters

+ ++++ + + + + + + + + + + + + + + + + + + + + +
ParameterDescription

prj

Project external identifier

from

Starting date (yyyy-mm-dd) for the requested the period

to

Ending date (yyyy-mm-dd) for the requested the period

+
+
+

Curl request

+
+
+
$ curl 'http://localhost:8080/api/qualityFactors/metrics/historical?prj=test&from=2020-06-09&to=2020-06-16' -i -X GET
+
+
+
+
+

Response fields

+ +++++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
PathTypeDescription

[].id

String

Quality factor identifier

[].name

String

Quality factor name

[].metrics

Array

List with all the quality factor metrics

[].metrics[].id

String

Metric identifier

[].metrics[].name

String

Metric name

[].metrics[].description

String

Metric description

[].metrics[].value

Number

Metric value

[].metrics[].value_description

String

Metric readable value

[].metrics[].date

Array

Metric evaluation date

[].metrics[].datasource

Null

Metric source of data

[].metrics[].rationale

String

Metric evaluation rationale

[].metrics[].confidence80

Null

Metric forecasting 80% confidence interval

[].metrics[].confidence95

Null

Metric forecasting 95% confidence interval

[].metrics[].forecastingError

Null

Description of forecasting errors

+
+
+

HTTP response

+
+
+
HTTP/1.1 200 OK
+Content-Type: application/json;charset=UTF-8
+Content-Length: 488
+
+[ {
+  "id" : "testingperformance",
+  "name" : "Testing Performance",
+  "metrics" : [ {
+    "id" : "fasttests",
+    "name" : "Fast Tests",
+    "description" : "Percentage of tests under the testing duration threshold",
+    "value" : 0.8,
+    "value_description" : "0,80",
+    "date" : [ 2020, 6, 16 ],
+    "datasource" : null,
+    "rationale" : "parameters: {...}, formula: ...",
+    "confidence80" : null,
+    "confidence95" : null,
+    "forecastingError" : null
+  } ]
+} ]
+
+
+
+
+

HTTP response wrong project

+
+
+
HTTP/1.1 400 Bad Request
+
+
+
+
+

HTTP response error on ElasticSearch connection

+
+
+
HTTP/1.1 500 Internal Server Error
+
+
+
+
+
+

3.4. Get historical evaluation for strategic indicator

+
+

Path parameters

+ + ++++ + + + + + + + + + + + + +
Table 1. /api/strategicIndicators/{id}/qualityFactors/metrics/historical
ParameterDescription

id

Strategic indicator identifier

+
+
+

Request parameters

+ ++++ + + + + + + + + + + + + + + + + + + + + +
ParameterDescription

prj

Project external identifier

from

Starting date (yyyy-mm-dd) for the requested the period

to

Ending date (yyyy-mm-dd) for the requested the period

+
+
+

Curl request

+
+
+
$ curl 'http://localhost:8080/api/strategicIndicators/processperformance/qualityFactors/metrics/historical?prj=test&from=2020-06-09&to=2020-06-16' -i -X GET
+
+
+
+
+

Response fields

+ +++++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
PathTypeDescription

[].id

String

Quality factor identifier

[].name

String

Quality factor name

[].metrics

Array

List with all the quality factor metrics

[].metrics[].id

String

Metric identifier

[].metrics[].name

String

Metric name

[].metrics[].description

String

Metric description

[].metrics[].value

Number

Metric value

[].metrics[].value_description

String

Metric readable value

[].metrics[].date

Array

Metric evaluation date

[].metrics[].datasource

Null

Metric source of data

[].metrics[].rationale

String

Metric evaluation rationale

[].metrics[].confidence80

Null

Metric forecasting 80% confidence interval

[].metrics[].confidence95

Null

Metric forecasting 95% confidence interval

[].metrics[].forecastingError

Null

Description of forecasting errors

+
+
+

HTTP response

+
+
+
HTTP/1.1 200 OK
+Content-Type: application/json;charset=UTF-8
+Content-Length: 488
+
+[ {
+  "id" : "testingperformance",
+  "name" : "Testing Performance",
+  "metrics" : [ {
+    "id" : "fasttests",
+    "name" : "Fast Tests",
+    "description" : "Percentage of tests under the testing duration threshold",
+    "value" : 0.8,
+    "value_description" : "0,80",
+    "date" : [ 2020, 6, 16 ],
+    "datasource" : null,
+    "rationale" : "parameters: {...}, formula: ...",
+    "confidence80" : null,
+    "confidence95" : null,
+    "forecastingError" : null
+  } ]
+} ]
+
+
+
+
+

HTTP response wrong project

+
+
+
HTTP/1.1 400 Bad Request
+
+
+
+
+

HTTP response error on ElasticSearch connection

+
+
+
HTTP/1.1 500 Internal Server Error
+
+
+
+
+
+

3.5. Get prediction

+
+

Request parameters

+ ++++ + + + + + + + + + + + + + + + + + + + + +
ParameterDescription

prj

Project external identifier

technique

Forecasting technique

horizon

Amount of days that the prediction will cover

+
+
+

Curl request

+
+
+
$ curl 'http://localhost:8080/api/qualityFactors/metrics/prediction?prj=test&technique=PROPHET&horizon=7' -i -X GET
+
+
+
+
+

Response fields

+ +++++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
PathTypeDescription

[].id

String

Quality factor identifier

[].name

String

Quality factor name

[].metrics

Array

List with all the quality factor metrics

[].metrics[].id

String

Metric identifier

[].metrics[].name

String

Metric name

[].metrics[].description

String

Metric description

[].metrics[].value

Number

Metric value

[].metrics[].value_description

String

Metric readable value

[].metrics[].date

Array

Metric evaluation date

[].metrics[].datasource

String

Metric source of data

[].metrics[].rationale

String

Metric evaluation rationale

[].metrics[].confidence80

Object

Metric forecasting 80% confidence interval

[].metrics[].confidence80.first

Number

Metric forecasting 80% confidence interval higher values

[].metrics[].confidence80.second

Number

Metric forecasting 80% confidence interval lower values

[].metrics[].confidence95

Object

Metric forecasting 95% confidence interval

[].metrics[].confidence95.first

Number

Metric forecasting 95% confidence interval higher values

[].metrics[].confidence95.second

Number

Metric forecasting 95% confidence interval lower values

[].metrics[].forecastingError

Null

Description of forecasting errors

+
+
+

HTTP response

+
+
+
HTTP/1.1 200 OK
+Content-Length: 593
+Content-Type: application/json;charset=UTF-8
+
+[ {
+  "id" : "testingperformance",
+  "name" : "Testing Performance",
+  "metrics" : [ {
+    "id" : "fasttests",
+    "name" : "Fast Tests",
+    "description" : "Percentage of tests under the testing duration threshold",
+    "value" : 0.8,
+    "value_description" : "0,80",
+    "date" : [ 2020, 6, 16 ],
+    "datasource" : "Forecast",
+    "rationale" : "Forecast",
+    "confidence80" : {
+      "first" : 0.97473043,
+      "second" : 0.9745246
+    },
+    "confidence95" : {
+      "first" : 0.9747849,
+      "second" : 0.97447014
+    },
+    "forecastingError" : null
+  } ]
+} ]
+
+
+
+
+

HTTP response wrong project

+
+
+
HTTP/1.1 400 Bad Request
+
+
+
+
+

HTTP response error on ElasticSearch connection

+
+
+
HTTP/1.1 500 Internal Server Error
+
+
+
+
+
+

3.6. Get prediction for strategic indicators

+
+

Path parameters

+ + ++++ + + + + + + + + + + + + +
Table 1. /api/strategicIndicators/{id}/qualityFactors/metrics/prediction
ParameterDescription

id

Strategic indicator identifier

+
+
+

Request parameters

+ ++++ + + + + + + + + + + + + + + + + + + + + +
ParameterDescription

prj

Project external identifier

technique

Forecasting technique

horizon

Amount of days that the prediction will cover

+
+
+

Curl request

+
+
+
$ curl 'http://localhost:8080/api/strategicIndicators/processperformance/qualityFactors/metrics/prediction?prj=test&technique=PROPHET&horizon=7' -i -X GET
+
+
+
+
+

Response fields

+ +++++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
PathTypeDescription

[].id

String

Quality factor identifier

[].name

String

Quality factor name

[].metrics

Array

List with all the quality factor metrics

[].metrics[].id

String

Metric identifier

[].metrics[].name

String

Metric name

[].metrics[].description

String

Metric description

[].metrics[].value

Number

Metric value

[].metrics[].value_description

String

Metric readable value

[].metrics[].date

Array

Metric evaluation date

[].metrics[].datasource

String

Metric source of data

[].metrics[].rationale

String

Metric evaluation rationale

[].metrics[].confidence80

Object

Metric forecasting 80% confidence interval

[].metrics[].confidence80.first

Number

Metric forecasting 80% confidence interval higher values

[].metrics[].confidence80.second

Number

Metric forecasting 80% confidence interval lower values

[].metrics[].confidence95

Object

Metric forecasting 95% confidence interval

[].metrics[].confidence95.first

Number

Metric forecasting 95% confidence interval higher values

[].metrics[].confidence95.second

Number

Metric forecasting 95% confidence interval lower values

[].metrics[].forecastingError

Null

Description of forecasting errors

+
+
+

HTTP response

+
+
+
HTTP/1.1 200 OK
+Content-Length: 593
+Content-Type: application/json;charset=UTF-8
+
+[ {
+  "id" : "testingperformance",
+  "name" : "Testing Performance",
+  "metrics" : [ {
+    "id" : "fasttests",
+    "name" : "Fast Tests",
+    "description" : "Percentage of tests under the testing duration threshold",
+    "value" : 0.8,
+    "value_description" : "0,80",
+    "date" : [ 2020, 6, 16 ],
+    "datasource" : "Forecast",
+    "rationale" : "Forecast",
+    "confidence80" : {
+      "first" : 0.97473043,
+      "second" : 0.9745246
+    },
+    "confidence95" : {
+      "first" : 0.9747849,
+      "second" : 0.97447014
+    },
+    "forecastingError" : null
+  } ]
+} ]
+
+
+
+
+

HTTP response wrong project

+
+
+
HTTP/1.1 400 Bad Request
+
+
+
+
+

HTTP response error on ElasticSearch connection

+
+
+
HTTP/1.1 500 Internal Server Error
+
+
+
+
+
+

3.7. Get all quality factors

+
+

Request parameters

+ ++++ + + + + + + + + + + + + +
ParameterDescription

prj

Project external identifier

+
+
+

Curl request

+
+
+
$ curl 'http://localhost:8080/api/qualityFactors?prj=test' -i -X GET
+
+
+
+
+

Response fields

+ +++++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
PathTypeDescription

[].id

String

Quality factor identifier

[].name

String

Quality factor name

[].description

String

Quality factor description

[].value

Number

Quality factor value

[].value_description

String

Readable quality factor value

[].date

Array

Quality factor evaluation date

[].datasource

Null

Quality factor source of data

[].rationale

String

Quality factor evaluation rationale

[].forecastingError

Null

Description of forecasting errors

[].strategicIndicators

Array

List of the strategic indicators that use this quality factor

[].formattedDate

String

Readable quality factor evaluation date

+
+
+

HTTP response

+
+
+
HTTP/1.1 200 OK
+Content-Length: 395
+Content-Type: application/json;charset=UTF-8
+
+[ {
+  "id" : "testingperformance",
+  "name" : "Testing Performance",
+  "description" : "Performance of the tests",
+  "value" : 0.8,
+  "value_description" : "0,80",
+  "date" : [ 2020, 6, 16 ],
+  "datasource" : null,
+  "rationale" : "parameters: {...}, formula: ...",
+  "forecastingError" : null,
+  "formattedDate" : "2020-06-16",
+  "strategicIndicators" : [ "processperformance" ]
+} ]
+
+
+
+
+

HTTP response wrong project

+
+
+
HTTP/1.1 400 Bad Request
+
+
+
+
+

HTTP response error on ElasticSearch connection

+
+
+
HTTP/1.1 500 Internal Server Error
+
+
+
+
+
+

3.8. Get one quality factor

+
+

Path parameters

+ + ++++ + + + + + + + + + + + + +
Table 1. /api/qualityFactors/{id}
ParameterDescription

id

Quality factor identifier

+
+
+

Request parameters

+ ++++ + + + + + + + + + + + + +
ParameterDescription

prj

Project external identifier

+
+
+

Curl request

+
+
+
$ curl 'http://localhost:8080/api/qualityFactors/testingperformance?prj=test' -i -X GET
+
+
+
+
+

Response fields

+ +++++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
PathTypeDescription

id

String

Quality factor identifier

name

String

Quality factor name

description

String

Quality factor description

value

Number

Quality factor value

value_description

String

Readable quality factor value

date

Array

Quality factor evaluation date

datasource

Null

Quality factor source of data

rationale

String

Quality factor evaluation rationale

forecastingError

Null

Description of forecasting errors

strategicIndicators

Array

List of the strategic indicators that use this quality factor

formattedDate

String

Readable quality factor evaluation date

+
+
+

HTTP response

+
+
+
HTTP/1.1 200 OK
+Content-Length: 391
+Content-Type: application/json;charset=UTF-8
+
+{
+  "id" : "testingperformance",
+  "name" : "Testing Performance",
+  "description" : "Performance of the tests",
+  "value" : 0.8,
+  "value_description" : "0,80",
+  "date" : [ 2020, 6, 16 ],
+  "datasource" : null,
+  "rationale" : "parameters: {...}, formula: ...",
+  "forecastingError" : null,
+  "formattedDate" : "2020-06-16",
+  "strategicIndicators" : [ "processperformance" ]
+}
+
+
+
+
+

HTTP response wrong project

+
+
+
HTTP/1.1 400 Bad Request
+
+
+
+
+

HTTP response error on ElasticSearch connection

+
+
+
HTTP/1.1 500 Internal Server Error
+
+
+
+
+
+

3.9. Simulate quality factors assessment

+
+

Request parameters

+ ++++ + + + + + + + + + + + + + + + + +
ParameterDescription

prj

Project external identifier

date

Date of the quality factors evaluation simulation model base

+
+
+

Request fields

+ +++++ + + + + + + + + + + + + + + + + + + + +
PathTypeDescription

[].id

String

Metric identifier

[].value

String

Metric value

+
+
+

Curl request

+
+
+
$ curl 'http://localhost:8080/api/qualityFactors/simulate?prj=test&date=2019-07-07' -i -X POST \
+    -H 'Content-Type: application/json' \
+    -d '[ {
+  "id" : "fasttests",
+  "value" : "0.7"
+} ]'
+
+
+
+
+

Response fields

+ +++++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
PathTypeDescription

[].id

String

Quality factor identifier

[].name

String

Quality factor name

[].description

String

Quality factor description

[].value

Number

Quality factor value

[].value_description

String

Readable quality factor value

[].date

Array

Quality factor evaluation date

[].datasource

Null

Quality factor source of data

[].rationale

String

Quality factor evaluation rationale

[].forecastingError

Null

Description of forecasting errors

[].strategicIndicators

Array

List of the strategic indicators that use this quality factor

[].formattedDate

String

Readable quality factor evaluation date

+
+
+

HTTP response

+
+
+
HTTP/1.1 200 OK
+Content-Length: 395
+Content-Type: application/json;charset=UTF-8
+
+[ {
+  "id" : "testingperformance",
+  "name" : "Testing Performance",
+  "description" : "Performance of the tests",
+  "value" : 0.8,
+  "value_description" : "0,80",
+  "date" : [ 2020, 6, 16 ],
+  "datasource" : null,
+  "rationale" : "parameters: {...}, formula: ...",
+  "forecastingError" : null,
+  "formattedDate" : "2020-06-16",
+  "strategicIndicators" : [ "processperformance" ]
+} ]
+
+
+
+
+

HTTP response wrong project

+
+
+
HTTP/1.1 400 Bad Request
+
+
+
+
+

HTTP response error on ElasticSearch connection

+
+
+
HTTP/1.1 500 Internal Server Error
+
+
+
+
+
+

3.10. Get quality factor categories

+
+

Curl request

+
+
+
$ curl 'http://localhost:8080/api/qualityFactors/categories' -i -X GET
+
+
+
+
+

Response fields

+ +++++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
PathTypeDescription

[].id

Number

Category identifier

[].name

String

Category name

[].color

String

Category hexadecimal color

[].upperThreshold

Number

Category upper threshold

+
+
+

HTTP response

+
+
+
HTTP/1.1 200 OK
+Content-Type: application/json;charset=UTF-8
+Content-Length: 276
+
+[ {
+  "id" : 10,
+  "name" : "Good",
+  "color" : "#00ff00",
+  "upperThreshold" : 1.0
+}, {
+  "id" : 11,
+  "name" : "Neutral",
+  "color" : "#ff8000",
+  "upperThreshold" : 0.67
+}, {
+  "id" : 12,
+  "name" : "Bad",
+  "color" : "#ff0000",
+  "upperThreshold" : 0.33
+} ]
+
+
+
+
+
+

3.11. Set quality factor categories

+
+

Request fields

+ +++++ + + + + + + + + + + + + + + + + + + + + + + + + +
PathTypeDescription

[].name

String

Quality factors category name

[].color

String

Quality factors category color

[].upperThreshold

String

Quality factors category upper threshold

+
+
+

Curl request

+
+
+
$ curl 'http://localhost:8080/api/qualityFactors/categories' -i -X POST \
+    -H 'Content-Type: application/json' \
+    -d '[ {
+  "upperThreshold" : "1.0",
+  "color" : "#00ff00",
+  "name" : "Good"
+}, {
+  "upperThreshold" : "0.67",
+  "color" : "#ff8000",
+  "name" : "Neutral"
+}, {
+  "upperThreshold" : "0.33",
+  "color" : "#ff0000",
+  "name" : "Bad"
+} ]'
+
+
+
+
+

HTTP response

+
+
+
HTTP/1.1 201 Created
+
+
+
+
+

HTTP response not enough categories

+
+
+
HTTP/1.1 400 Bad Request
+
+
+
+
+
+
+
+

4. Metrics

+
+
+

4.1. Get current evaluation

+
+

Request parameters

+ ++++ + + + + + + + + + + + + +
ParameterDescription

prj

Project external identifier

+
+
+

Curl request

+
+
+
$ curl 'http://localhost:8080/api/metrics/current?prj=test' -i -X GET
+
+
+
+
+

Response fields

+ +++++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
PathTypeDescription

[].id

String

Metric identifier

[].name

String

Metric name

[].description

String

Metric description

[].value

Number

Metric value

[].value_description

String

Metric readable value

[].date

Array

Metric evaluation date

[].datasource

Null

Metric source of data

[].rationale

String

Metric evaluation rationale

[].confidence80

Null

Metric forecasting 80% confidence interval

[].confidence95

Null

Metric forecasting 95% confidence interval

[].forecastingError

Null

Description of forecasting errors

+
+
+

HTTP response

+
+
+
HTTP/1.1 200 OK
+Content-Length: 373
+Content-Type: application/json;charset=UTF-8
+
+[ {
+  "id" : "fasttests",
+  "name" : "Fast Tests",
+  "description" : "Percentage of tests under the testing duration threshold",
+  "value" : 0.8,
+  "value_description" : "0,80",
+  "date" : [ 2020, 6, 16 ],
+  "datasource" : null,
+  "rationale" : "parameters: {...}, formula: ...",
+  "confidence80" : null,
+  "confidence95" : null,
+  "forecastingError" : null
+} ]
+
+
+
+
+

HTTP response wrong project

+
+
+
HTTP/1.1 400 Bad Request
+
+
+
+
+

HTTP response error on ElasticSearch connection

+
+
+
HTTP/1.1 500 Internal Server Error
+
+
+
+
+
+

4.2. Get single current evaluation

+
+

Path parameters

+ + ++++ + + + + + + + + + + + + +
Table 1. /api/metrics/{id}/current
ParameterDescription

id

Metric identifier

+
+
+

Request parameters

+ ++++ + + + + + + + + + + + + +
ParameterDescription

prj

Project external identifier

+
+
+

Curl request

+
+
+
$ curl 'http://localhost:8080/api/metrics/fasttests/current?prj=test' -i -X GET
+
+
+
+
+

Response fields

+ +++++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
PathTypeDescription

id

String

Metric identifier

name

String

Metric name

description

String

Metric description

value

Number

Metric value

value_description

String

Metric readable value

date

Array

Metric evaluation date

datasource

Null

Metric source of data

rationale

String

Metric evaluation rationale

confidence80

Null

Metric forecasting 80% confidence interval

confidence95

Null

Metric forecasting 95% confidence interval

forecastingError

Null

Description of forecasting errors

+
+
+

HTTP response

+
+
+
HTTP/1.1 200 OK
+Content-Length: 369
+Content-Type: application/json;charset=UTF-8
+
+{
+  "id" : "fasttests",
+  "name" : "Fast Tests",
+  "description" : "Percentage of tests under the testing duration threshold",
+  "value" : 0.8,
+  "value_description" : "0,80",
+  "date" : [ 2020, 6, 16 ],
+  "datasource" : null,
+  "rationale" : "parameters: {...}, formula: ...",
+  "confidence80" : null,
+  "confidence95" : null,
+  "forecastingError" : null
+}
+
+
+
+
+

HTTP response wrong project

+
+
+
HTTP/1.1 400 Bad Request
+
+
+
+
+

HTTP response error on ElasticSearch connection

+
+
+
HTTP/1.1 500 Internal Server Error
+
+
+
+
+
+

4.3. Get current evaluation for quality factor

+
+

Path parameters

+ + ++++ + + + + + + + + + + + + +
Table 1. /api/qualityFactors/{id}/metrics/current
ParameterDescription

id

Quality factor identifier

+
+
+

Request parameters

+ ++++ + + + + + + + + + + + + +
ParameterDescription

prj

Project external identifier

+
+
+

Curl request

+
+
+
$ curl 'http://localhost:8080/api/qualityFactors/testingperformance/metrics/current?prj=test' -i -X GET
+
+
+
+
+

Response fields

+ +++++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
PathTypeDescription

[].id

String

Metric identifier

[].name

String

Metric name

[].description

String

Metric description

[].value

Number

Metric value

[].value_description

String

Metric readable value

[].date

Array

Metric evaluation date

[].datasource

Null

Metric source of data

[].rationale

String

Metric evaluation rationale

[].confidence80

Null

Metric forecasting 80% confidence interval

[].confidence95

Null

Metric forecasting 95% confidence interval

[].forecastingError

Null

Description of forecasting errors

+
+
+

HTTP response

+
+
+
HTTP/1.1 200 OK
+Content-Length: 373
+Content-Type: application/json;charset=UTF-8
+
+[ {
+  "id" : "fasttests",
+  "name" : "Fast Tests",
+  "description" : "Percentage of tests under the testing duration threshold",
+  "value" : 0.8,
+  "value_description" : "0,80",
+  "date" : [ 2020, 6, 16 ],
+  "datasource" : null,
+  "rationale" : "parameters: {...}, formula: ...",
+  "confidence80" : null,
+  "confidence95" : null,
+  "forecastingError" : null
+} ]
+
+
+
+
+

HTTP response wrong project

+
+
+
HTTP/1.1 400 Bad Request
+
+
+
+
+

HTTP response error on ElasticSearch connection

+
+
+
HTTP/1.1 500 Internal Server Error
+
+
+
+
+
+

4.4. Get historical evaluation

+
+

Request parameters

+ ++++ + + + + + + + + + + + + + + + + + + + + +
ParameterDescription

prj

Project external identifier

from

Starting date (yyyy-mm-dd) for the requested the period

to

Ending date (yyyy-mm-dd) for the requested the period

+
+
+

Curl request

+
+
+
$ curl 'http://localhost:8080/api/metrics/historical?prj=test&from=2019-07-07&to=2019-07-15' -i -X GET
+
+
+
+
+

Response fields

+ +++++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
PathTypeDescription

[].id

String

Metric identifier

[].name

String

Metric name

[].description

String

Metric description

[].value

Number

Metric value

[].value_description

String

Metric readable value

[].date

Array

Metric evaluation date

[].datasource

Null

Metric source of data

[].rationale

String

Metric evaluation rationale

[].confidence80

Null

Metric forecasting 80% confidence interval

[].confidence95

Null

Metric forecasting 95% confidence interval

[].forecastingError

Null

Description of forecasting errors

+
+
+

HTTP response

+
+
+
HTTP/1.1 200 OK
+Content-Length: 373
+Content-Type: application/json;charset=UTF-8
+
+[ {
+  "id" : "fasttests",
+  "name" : "Fast Tests",
+  "description" : "Percentage of tests under the testing duration threshold",
+  "value" : 0.8,
+  "value_description" : "0,80",
+  "date" : [ 2020, 6, 16 ],
+  "datasource" : null,
+  "rationale" : "parameters: {...}, formula: ...",
+  "confidence80" : null,
+  "confidence95" : null,
+  "forecastingError" : null
+} ]
+
+
+
+
+

HTTP response wrong project

+
+
+
HTTP/1.1 400 Bad Request
+
+
+
+
+

HTTP response error on ElasticSearch connection

+
+
+
HTTP/1.1 500 Internal Server Error
+
+
+
+
+
+

4.5. Get single historical evaluation

+
+

Path parameters

+ + ++++ + + + + + + + + + + + + +
Table 1. /api/metrics/{id}/historical
ParameterDescription

id

Metric identifier

+
+
+

Request parameters

+ ++++ + + + + + + + + + + + + + + + + + + + + +
ParameterDescription

prj

Project external identifier

from

Starting date (yyyy-mm-dd) for the requested the period

to

Ending date (yyyy-mm-dd) for the requested the period

+
+
+

Curl request

+
+
+
$ curl 'http://localhost:8080/api/metrics/fasttests/historical?prj=test&from=2019-07-07&to=2019-07-15' -i -X GET
+
+
+
+
+

Response fields

+ +++++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
PathTypeDescription

[].id

String

Metric identifier

[].name

String

Metric name

[].description

String

Metric description

[].value

Number

Metric value

[].value_description

String

Metric readable value

[].date

Array

Metric evaluation date

[].datasource

Null

Metric source of data

[].rationale

String

Metric evaluation rationale

[].confidence80

Null

Metric forecasting 80% confidence interval

[].confidence95

Null

Metric forecasting 95% confidence interval

[].forecastingError

Null

Description of forecasting errors

+
+
+

HTTP response

+
+
+
HTTP/1.1 200 OK
+Content-Length: 373
+Content-Type: application/json;charset=UTF-8
+
+[ {
+  "id" : "fasttests",
+  "name" : "Fast Tests",
+  "description" : "Percentage of tests under the testing duration threshold",
+  "value" : 0.8,
+  "value_description" : "0,80",
+  "date" : [ 2020, 6, 16 ],
+  "datasource" : null,
+  "rationale" : "parameters: {...}, formula: ...",
+  "confidence80" : null,
+  "confidence95" : null,
+  "forecastingError" : null
+} ]
+
+
+
+
+

HTTP response wrong project

+
+
+
HTTP/1.1 400 Bad Request
+
+
+
+
+

HTTP response error on ElasticSearch connection

+
+
+
HTTP/1.1 500 Internal Server Error
+
+
+
+
+
+

4.6. Get historical evaluation for quality factor

+
+

Path parameters

+ + ++++ + + + + + + + + + + + + +
Table 1. /api/qualityFactors/{id}/metrics/historical
ParameterDescription

id

Quality factor identifier

+
+
+

Request parameters

+ ++++ + + + + + + + + + + + + + + + + + + + + +
ParameterDescription

prj

Project external identifier

from

Starting date (yyyy-mm-dd) for the requested the period

to

Ending date (yyyy-mm-dd) for the requested the period

+
+
+

Curl request

+
+
+
$ curl 'http://localhost:8080/api/qualityFactors/testingperformance/metrics/historical?prj=test&from=2019-07-07&to=2019-07-15' -i -X GET
+
+
+
+
+

Response fields

+ +++++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
PathTypeDescription

[].id

String

Metric identifier

[].name

String

Metric name

[].description

String

Metric description

[].value

Number

Metric value

[].value_description

String

Metric readable value

[].date

Array

Metric evaluation date

[].datasource

Null

Metric source of data

[].rationale

String

Metric evaluation rationale

[].confidence80

Null

Metric forecasting 80% confidence interval

[].confidence95

Null

Metric forecasting 95% confidence interval

[].forecastingError

Null

Description of forecasting errors

+
+
+

HTTP response

+
+
+
HTTP/1.1 200 OK
+Content-Length: 373
+Content-Type: application/json;charset=UTF-8
+
+[ {
+  "id" : "fasttests",
+  "name" : "Fast Tests",
+  "description" : "Percentage of tests under the testing duration threshold",
+  "value" : 0.8,
+  "value_description" : "0,80",
+  "date" : [ 2020, 6, 16 ],
+  "datasource" : null,
+  "rationale" : "parameters: {...}, formula: ...",
+  "confidence80" : null,
+  "confidence95" : null,
+  "forecastingError" : null
+} ]
+
+
+
+
+

HTTP response wrong project

+
+
+
HTTP/1.1 400 Bad Request
+
+
+
+
+

HTTP response error on ElasticSearch connection

+
+
+
HTTP/1.1 500 Internal Server Error
+
+
+
+
+
+

4.7. Get prediction

+
+

Request parameters

+ ++++ + + + + + + + + + + + + + + + + + + + + +
ParameterDescription

prj

Project external identifier

technique

Forecasting technique

horizon

Amount of days that the prediction will cover

+
+
+

Curl request

+
+
+
$ curl 'http://localhost:8080/api/metrics/prediction?prj=test&technique=PROPHET&horizon=7' -i -X GET
+
+
+
+
+

Response fields

+ +++++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
PathTypeDescription

[].id

String

Metric identifier

[].name

String

Metric name

[].description

String

Metric description

[].value

Number

Metric value

[].value_description

String

Metric readable value

[].date

Array

Metric evaluation date

[].datasource

String

Metric source of data

[].rationale

String

Metric evaluation rationale

[].confidence80

Object

Metric forecasting 80% confidence interval

[].confidence80.first

Number

Metric forecasting 80% confidence interval higher values

[].confidence80.second

Number

Metric forecasting 80% confidence interval lower values

[].confidence95

Object

Metric forecasting 95% confidence interval

[].confidence95.first

Number

Metric forecasting 95% confidence interval higher values

[].confidence95.second

Number

Metric forecasting 95% confidence interval lower values

[].forecastingError

Null

Description of forecasting errors

+
+
+

HTTP response

+
+
+
HTTP/1.1 200 OK
+Content-Type: application/json;charset=UTF-8
+Content-Length: 466
+
+[ {
+  "id" : "fasttests",
+  "name" : "Fast Tests",
+  "description" : "Percentage of tests under the testing duration threshold",
+  "value" : 0.8,
+  "value_description" : "0,80",
+  "date" : [ 2020, 6, 16 ],
+  "datasource" : "Forecast",
+  "rationale" : "Forecast",
+  "confidence80" : {
+    "first" : 0.97473043,
+    "second" : 0.9745246
+  },
+  "confidence95" : {
+    "first" : 0.9747849,
+    "second" : 0.97447014
+  },
+  "forecastingError" : null
+} ]
+
+
+
+
+

HTTP response wrong project

+
+
+
HTTP/1.1 400 Bad Request
+
+
+
+
+

HTTP response error on ElasticSearch connection

+
+
+
HTTP/1.1 500 Internal Server Error
+
+
+
+
+
+

4.8. Get prediction for quality factor

+
+

Path parameters

+ + ++++ + + + + + + + + + + + + +
Table 1. /api/qualityFactors/{id}/metrics/prediction
ParameterDescription

id

Quality factor identifier

+
+
+

Request parameters

+ ++++ + + + + + + + + + + + + + + + + + + + + +
ParameterDescription

prj

Project external identifier

technique

Forecasting technique

horizon

Amount of days that the prediction will cover

+
+
+

Curl request

+
+
+
$ curl 'http://localhost:8080/api/qualityFactors/testingperformance/metrics/prediction?prj=test&technique=PROPHET&horizon=7' -i -X GET
+
+
+
+
+

Response fields

+ +++++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
PathTypeDescription

[].id

String

Metric identifier

[].name

String

Metric name

[].description

String

Metric description

[].value

Number

Metric value

[].value_description

String

Metric readable value

[].date

Array

Metric evaluation date

[].datasource

String

Metric source of data

[].rationale

String

Metric evaluation rationale

[].confidence80

Object

Metric forecasting 80% confidence interval

[].confidence80.first

Number

Metric forecasting 80% confidence interval higher values

[].confidence80.second

Number

Metric forecasting 80% confidence interval lower values

[].confidence95

Object

Metric forecasting 95% confidence interval

[].confidence95.first

Number

Metric forecasting 95% confidence interval higher values

[].confidence95.second

Number

Metric forecasting 95% confidence interval lower values

[].forecastingError

Null

Description of forecasting errors

+
+
+

HTTP response

+
+
+
HTTP/1.1 200 OK
+Content-Type: application/json;charset=UTF-8
+Content-Length: 466
+
+[ {
+  "id" : "fasttests",
+  "name" : "Fast Tests",
+  "description" : "Percentage of tests under the testing duration threshold",
+  "value" : 0.8,
+  "value_description" : "0,80",
+  "date" : [ 2020, 6, 16 ],
+  "datasource" : "Forecast",
+  "rationale" : "Forecast",
+  "confidence80" : {
+    "first" : 0.97473043,
+    "second" : 0.9745246
+  },
+  "confidence95" : {
+    "first" : 0.9747849,
+    "second" : 0.97447014
+  },
+  "forecastingError" : null
+} ]
+
+
+
+
+

HTTP response wrong project

+
+
+
HTTP/1.1 400 Bad Request
+
+
+
+
+

HTTP response error on ElasticSearch connection

+
+
+
HTTP/1.1 500 Internal Server Error
+
+
+
+
+
+

4.9. Get metric categories

+
+

Curl request

+
+
+
$ curl 'http://localhost:8080/api/metrics/categories' -i -X GET
+
+
+
+
+

Response fields

+ +++++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
PathTypeDescription

[].id

Number

Category identifier

[].name

String

Category name

[].color

String

Category hexadecimal color

[].upperThreshold

Number

Category upper threshold

+
+
+

HTTP response

+
+
+
HTTP/1.1 200 OK
+Content-Type: application/json;charset=UTF-8
+Content-Length: 276
+
+[ {
+  "id" : 10,
+  "name" : "Good",
+  "color" : "#00ff00",
+  "upperThreshold" : 1.0
+}, {
+  "id" : 11,
+  "name" : "Neutral",
+  "color" : "#ff8000",
+  "upperThreshold" : 0.67
+}, {
+  "id" : 12,
+  "name" : "Bad",
+  "color" : "#ff0000",
+  "upperThreshold" : 0.33
+} ]
+
+
+
+
+
+

4.10. Set strategic indicator categories

+
+

Request fields

+ +++++ + + + + + + + + + + + + + + + + + + + + + + + + +
PathTypeDescription

[].name

String

Metrics category name

[].color

String

Metrics category color

[].upperThreshold

String

Metrics category upper threshold

+
+
+

Curl request

+
+
+
$ curl 'http://localhost:8080/api/metrics/categories' -i -X POST \
+    -H 'Content-Type: application/json' \
+    -d '[ {
+  "upperThreshold" : "1.0",
+  "color" : "#00ff00",
+  "name" : "Good"
+}, {
+  "upperThreshold" : "0.67",
+  "color" : "#ff8000",
+  "name" : "Neutral"
+}, {
+  "upperThreshold" : "0.33",
+  "color" : "#ff0000",
+  "name" : "Bad"
+} ]'
+
+
+
+
+

HTTP response

+
+
+
HTTP/1.1 201 Created
+
+
+
+
+

HTTP response not enough categories

+
+
+
HTTP/1.1 400 Bad Request
+
+
+
+
+
+
+
+

5. Alerts

+
+
+

5.1. Get all alerts

+
+

Request parameters

+ ++++ + + + + + + + + + + + + +
ParameterDescription

prj

Project external identifier

+
+
+

Curl request

+
+
+
$ curl 'http://localhost:8080/api/alerts?prj=test' -i -X GET
+
+
+
+
+

Response fields

+ +++++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
PathTypeDescription

[].id

Number

Alert identifier

[].id_element

String

Identifier of the element causing the alert

[].name

String

Name of the element causing the alert

[].type

String

Type of element causing the alert (METRIC or FACTOR)

[].value

Number

Current value of the element causing the alert

[].threshold

Number

Minimum acceptable value for the element

[].category

String

Identifier of the element causing the alert

[].date

Number

Generation date of the alert

[].status

String

Status of the alert (NEW, VIEWED or RESOLVED)

[].reqAssociat

Boolean

The alert has or hasn’t an associated quality requirement

[].artefacts

Null

Alert artefacts

+
+
+

HTTP response

+
+
+
HTTP/1.1 200 OK
+Content-Type: application/json;charset=UTF-8
+Content-Length: 257
+
+[ {
+  "id" : 2,
+  "id_element" : "id",
+  "name" : "Duplication",
+  "type" : "METRIC",
+  "value" : 0.4,
+  "threshold" : 0.5,
+  "category" : "category",
+  "date" : 1592304288018,
+  "status" : "NEW",
+  "reqAssociat" : true,
+  "artefacts" : null
+} ]
+
+
+
+
+

HTTP response wrong project

+
+
+
HTTP/1.1 400 Bad Request
+
+
+
+
+
+

5.2. Create alert

+
+

Request fields

+ +++++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
PathTypeDescription

element.id

String

Identifier of the element causing the alert

element.name

String

Name of the element causing the alert

element.type

String

Type of the element causing the alert (METRIC or FACTOR)

element.value

String

Current value of the element causing the alert

element.threshold

String

Minimum acceptable value for the element

element.category

String

Identifier of the element causing the alert

element.project_id

String

Identifier of the element causing the alert

+
+
+

Curl request

+
+
+
$ curl 'http://localhost:8080/api/alerts' -i -X POST \
+    -H 'Content-Type: application/json' \
+    -d '{
+  "element" : {
+    "project_id" : "test",
+    "name" : "Duplication",
+    "threshold" : "0.5",
+    "id" : "duplication",
+    "type" : "METRIC",
+    "category" : "duplication",
+    "value" : "0.4"
+  }
+}'
+
+
+
+
+

HTTP response

+
+
+
HTTP/1.1 201 Created
+
+
+
+
+

HTTP response missing body parameter

+
+
+
HTTP/1.1 400 Bad Request
+
+
+
+
+

HTTP response wrong element type

+
+
+
HTTP/1.1 400 Bad Request
+
+
+
+
+
+

5.3. Notify alert (deprecated)

+
+ + + + + +
+
Note
+
+This operation is deprecated. Please, use Create alert +
+
+
+

Request fields

+ +++++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
PathTypeDescription

element.id

String

Identifier of the element causing the alert

element.name

String

Name of the element causing the alert

element.type

String

Type of the element causing the alert (METRIC or FACTOR)

element.value

String

Current value of the element causing the alert

element.threshold

String

Minimum acceptable value for the element

element.category

String

Identifier of the element causing the alert

element.project_id

String

Identifier of the element causing the alert

+
+
+

Curl request

+
+
+
$ curl 'http://localhost:8080/api/notifyAlert' -i -X POST \
+    -H 'Content-Type: application/json' \
+    -d '{
+  "element" : {
+    "project_id" : "test",
+    "name" : "Duplication",
+    "threshold" : "0.5",
+    "id" : "duplication",
+    "type" : "METRIC",
+    "category" : "duplication",
+    "value" : "0.4"
+  }
+}'
+
+
+
+
+

HTTP response

+
+
+
HTTP/1.1 200 OK
+
+
+
+
+

HTTP response missing body parameter

+
+
+
HTTP/1.1 400 Bad Request
+
+
+
+
+

HTTP response wrong element type

+
+
+
HTTP/1.1 400 Bad Request
+
+
+
+
+
+

5.4. Count new alerts

+
+

Request parameters

+ ++++ + + + + + + + + + + + + +
ParameterDescription

prj

Project external identifier

+
+
+

Curl request

+
+
+
$ curl 'http://localhost:8080/api/alerts/countNew?prj=test' -i -X GET
+
+
+
+
+

Response fields

+ +++++ + + + + + + + + + + + + + + + + + + + +
PathTypeDescription

newAlerts

Number

Number of new alerts

newAlertsWithQR

Number

Number of new alerts with an associated quality requirement

+
+
+

HTTP response

+
+
+
HTTP/1.1 200 OK
+Content-Length: 49
+Content-Type: application/json;charset=UTF-8
+
+{
+  "newAlerts" : 2,
+  "newAlertsWithQR" : 1
+}
+
+
+
+
+

HTTP response wrong project

+
+
+
HTTP/1.1 400 Bad Request
+
+
+
+
+
+

5.5. Get quality requirement patterns for alert

+
+

Path parameters

+ + ++++ + + + + + + + + + + + + +
Table 1. /api/alerts/{id}/qrPatterns
ParameterDescription

id

Alert identifier

+
+
+

Curl request

+
+
+
$ curl 'http://localhost:8080/api/alerts/2/qrPatterns' -i -X GET
+
+
+
+
+

Response fields

+ +++++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
PathTypeDescription

[].id

Number

Quality requirement identifier

[].name

String

Quality requirement name

[].comments

String

Quality requirement comments

[].description

String

Quality requirement description

[].goal

String

Quality requirement goal

[].forms[].name

String

Suggested quality requirement name

[].forms[].description

String

Suggested quality requirement description

[].forms[].comments

String

Suggested quality requirement comments

[].forms[].fixedPart.formText

String

Suggested quality requirement text

[].costFunction

String

Suggested quality requirement cost function

+
+
+

HTTP response

+
+
+
HTTP/1.1 200 OK
+Content-Length: 516
+Content-Type: application/json;charset=UTF-8
+
+[ {
+  "id" : 100,
+  "name" : "Duplications",
+  "comments" : "No comments",
+  "description" : "No description",
+  "goal" : "Improve the quality of the source code",
+  "forms" : [ {
+    "name" : "Duplications",
+    "description" : "The ratio of files without duplications should be at least the given value",
+    "comments" : "No comments",
+    "fixedPart" : {
+      "formText" : "The ratio of files without duplications should be at least %value%"
+    }
+  } ],
+  "costFunction" : "No cost function"
+} ]
+
+
+
+
+

HTTP response alert not found

+
+
+
HTTP/1.1 404 Not Found
+
+
+
+
+
+

5.6. Get alert decision

+
+

Path parameters

+ + ++++ + + + + + + + + + + + + +
Table 1. /api/alerts/{id}/decision
ParameterDescription

id

Alert identifier

+
+
+

Curl request

+
+
+
$ curl 'http://localhost:8080/api/alerts/2/decision' -i -X GET
+
+
+
+
+

Response fields

+ +++++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
PathTypeDescription

qrGoal

String

Quality requirement goal

qrRequirement

String

Quality requirement text

qrDescription

String

Quality requirement description

qrBacklogUrl

String

Link to the backlog issue containing the quality requirement

decisionType

String

Type of the decision (ADD or IGNORE)

decisionRationale

String

User rationale of the decision

+
+
+

HTTP response

+
+
+
HTTP/1.1 200 OK
+Content-Length: 371
+Content-Type: application/json;charset=UTF-8
+
+{
+  "qrGoal" : "Improve the quality of the source code",
+  "qrRequirement" : "The ratio of files without duplications should be at least 0.8",
+  "qrDescription" : "The ratio of files without duplications should be at least the given value",
+  "qrBacklogUrl" : "https://backlog.example/issue/999",
+  "decisionType" : "ADD",
+  "decisionRationale" : "User comments"
+}
+
+
+
+
+

HTTP response alert not found

+
+
+
HTTP/1.1 404 Not Found
+
+
+
+
+
+

5.7. Ignore quality requirement for alert

+
+

Path parameters

+ + ++++ + + + + + + + + + + + + +
Table 1. /api/alerts/{id}/qr/ignore
ParameterDescription

id

Alert identifier

+
+
+

Request parameters

+ ++++ + + + + + + + + + + + + + + + + + + + + +
ParameterDescription

prj

Project external identifier

rationale

User rationale of the decision

patternId

Identifier of the ignored quality requirement pattern

+
+
+

Curl request

+
+
+
$ curl 'http://localhost:8080/api/alerts/2/qr/ignore' -i -X POST \
+    -d 'prj=test&rationale=Not+important&patternId=100'
+
+
+
+
+

HTTP response

+
+
+
HTTP/1.1 201 Created
+
+
+
+
+

HTTP response wrong project

+
+
+
HTTP/1.1 400 Bad Request
+
+
+
+
+

HTTP response alert not found

+
+
+
HTTP/1.1 404 Not Found
+
+
+
+
+
+

5.8. Add quality requirement for alert

+
+

Path parameters

+ + ++++ + + + + + + + + + + + + +
Table 1. /api/alerts/{id}/qr
ParameterDescription

id

Alert identifier

+
+
+

Request parameters

+ ++++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ParameterDescription

prj

Project external identifier

rationale

User rationale of the decision

patternId

Identifier of the added quality requirement pattern

requirement

Text of the added quality requirement

description

Description of the added quality requirement

goal

Goal of the added quality requirement

+
+
+

Curl request

+
+
+
$ curl 'http://localhost:8080/api/alerts/2/qr' -i -X POST \
+    -d 'prj=test&rationale=User+comments&patternId=100&requirement=The+ratio+of+files+without+duplications+should+be+at+least+0.8&description=The+ratio+of+files+without+duplications+should+be+at+least+the+given+value&goal=Improve+the+quality+of+the+source+code'
+
+
+
+
+

Response fields

+ +++++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
PathTypeDescription

id

Number

Identifier of the added quality requirement

date

Number

Quality requirement creation date

requirement

String

Text of the added quality requirement

description

String

Description of the added quality requirement

goal

String

Goal of the added quality requirement

backlogId

String

Quality requirement identifier inside the backlog

backlogUrl

String

Link to the backlog issue containing the quality requirement

backlogProjectId

Null

Backlog identifier of the project containing the quality requirement

alert

Null

Alert object which caused the quality requirement addition

+
+
+

HTTP response

+
+
+
HTTP/1.1 201 Created
+Content-Type: application/json;charset=UTF-8
+Content-Length: 410
+
+{
+  "id" : 3,
+  "date" : 1592304287487,
+  "requirement" : "The ratio of files without duplications should be at least 0.8",
+  "description" : "The ratio of files without duplications should be at least the given value",
+  "goal" : "Improve the quality of the source code",
+  "backlogId" : "ID-999",
+  "backlogUrl" : "https://backlog.example/issue/999",
+  "backlogProjectId" : null,
+  "alert" : null
+}
+
+
+
+
+

HTTP response alert not found

+
+
+
HTTP/1.1 404 Not Found
+
+
+
+
+

HTTP response error on backlog saving

+
+
+
HTTP/1.1 500 Internal Server Error
+
+
+
+
+
+
+
+

6. Quality requirements

+
+
+

6.1. Get all quality requirements

+
+

Request parameters

+ ++++ + + + + + + + + + + + + +
ParameterDescription

prj

Project external identifier

+
+
+

Curl request

+
+
+
$ curl 'http://localhost:8080/api/qr?prj=test' -i -X GET
+
+
+
+
+

Response fields

+ +++++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
PathTypeDescription

[].id

Number

Identifier of the added quality requirement

[].date

Number

Quality requirement creation date

[].requirement

String

Text of the added quality requirement

[].description

String

Description of the added quality requirement

[].goal

String

Goal of the added quality requirement

[].backlogId

String

Quality requirement identifier inside the backlog

[].backlogUrl

String

Link to the backlog issue containing the quality requirement

[].backlogProjectId

String

Backlog identifier of the project containing the quality requirement

[].alert.id

Number

Alert identifier

[].alert.id_element

String

Identifier of the element causing the alert

[].alert.name

String

Name of the element causing the alert

[].alert.type

String

Type of element causing the alert (METRIC or FACTOR)

[].alert.value

Number

Current value of the element causing the alert

[].alert.threshold

Number

Minimum acceptable value for the element

[].alert.category

String

Identifier of the element causing the alert

[].alert.date

Number

Generation date of the alert

[].alert.status

String

Status of the alert (NEW, VIEWED or RESOLVED)

[].alert.reqAssociat

Boolean

The alert has or hasn’t an associated quality requirement

[].alert.artefacts

Null

Alert artefacts

+
+
+

HTTP response

+
+
+
HTTP/1.1 200 OK
+Content-Length: 690
+Content-Type: application/json;charset=UTF-8
+
+[ {
+  "id" : 3,
+  "date" : 1592304291593,
+  "requirement" : "The ratio of files without duplications should be at least 0.8",
+  "description" : "The ratio of files without duplications should be at least the given value",
+  "goal" : "Improve the quality of the source code",
+  "backlogId" : "ID-999",
+  "backlogUrl" : "https://backlog.example/issue/999",
+  "backlogProjectId" : "prj-1",
+  "alert" : {
+    "id" : 2,
+    "id_element" : "id",
+    "name" : "Duplication",
+    "type" : "METRIC",
+    "value" : 0.4,
+    "threshold" : 0.5,
+    "category" : "category",
+    "date" : 1592304291593,
+    "status" : "NEW",
+    "reqAssociat" : true,
+    "artefacts" : null
+  }
+} ]
+
+
+
+
+

HTTP response wrong project

+
+
+
HTTP/1.1 400 Bad Request
+
+
+
+
+
+

6.2. Add quality requirement

+
+

Request parameters

+ ++++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ParameterDescription

prj

Project external identifier

rationale

User rationale of the decision

patternId

Identifier of the added quality requirement pattern

requirement

Text of the added quality requirement

description

Description of the added quality requirement

goal

Goal of the added quality requirement

+
+
+

Curl request

+
+
+
$ curl 'http://localhost:8080/api/qr' -i -X POST \
+    -d 'prj=test&rationale=User+comments&patternId=100&requirement=The+ratio+of+files+without+duplications+should+be+at+least+0.8&description=The+ratio+of+files+without+duplications+should+be+at+least+the+given+value&goal=Improve+the+quality+of+the+source+code'
+
+
+
+
+

Response fields

+ +++++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
PathTypeDescription

id

Number

Identifier of the added quality requirement

date

Number

Quality requirement creation date

requirement

String

Text of the added quality requirement

description

String

Description of the added quality requirement

goal

String

Goal of the added quality requirement

backlogId

String

Quality requirement identifier inside the backlog

backlogUrl

String

Link to the backlog issue containing the quality requirement

backlogProjectId

Null

Backlog identifier of the project containing the quality requirement

alert

Null

Alert object which caused the quality requirement addition

+
+
+

HTTP response

+
+
+
HTTP/1.1 201 Created
+Content-Type: application/json;charset=UTF-8
+Content-Length: 410
+
+{
+  "id" : 3,
+  "date" : 1592304291708,
+  "requirement" : "The ratio of files without duplications should be at least 0.8",
+  "description" : "The ratio of files without duplications should be at least the given value",
+  "goal" : "Improve the quality of the source code",
+  "backlogId" : "ID-999",
+  "backlogUrl" : "https://backlog.example/issue/999",
+  "backlogProjectId" : null,
+  "alert" : null
+}
+
+
+
+
+

HTTP response error on backlog saving

+
+
+
HTTP/1.1 500 Internal Server Error
+
+
+
+
+
+

6.3. Ignore quality requirement

+
+

Request parameters

+ ++++ + + + + + + + + + + + + + + + + + + + + +
ParameterDescription

prj

Project external identifier

rationale

User rationale of the decision

patternId

Identifier of the ignored quality requirement pattern

+
+
+

Curl request

+
+
+
$ curl 'http://localhost:8080/api/qr/ignore' -i -X POST \
+    -d 'prj=test&rationale=Not+important&patternId=100'
+
+
+
+
+

HTTP response

+
+
+
HTTP/1.1 201 Created
+
+
+
+
+

HTTP response wrong project

+
+
+
HTTP/1.1 400 Bad Request
+
+
+
+
+
+

6.4. Get all quality requirement patterns

+
+

Curl request

+
+
+
$ curl 'http://localhost:8080/api/qrPatterns' -i -X GET
+
+
+
+
+

Response fields

+ +++++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
PathTypeDescription

[].id

Number

Quality requirement identifier

[].name

String

Quality requirement name

[].comments

String

Quality requirement comments

[].description

String

Quality requirement description

[].goal

String

Quality requirement goal

[].forms[].name

String

Suggested quality requirement name

[].forms[].description

String

Suggested quality requirement description

[].forms[].comments

String

Suggested quality requirement comments

[].forms[].fixedPart.formText

String

Suggested quality requirement text

[].costFunction

String

Suggested quality requirement cost function

+
+
+

HTTP response

+
+
+
HTTP/1.1 200 OK
+Content-Length: 516
+Content-Type: application/json;charset=UTF-8
+
+[ {
+  "id" : 100,
+  "name" : "Duplications",
+  "comments" : "No comments",
+  "description" : "No description",
+  "goal" : "Improve the quality of the source code",
+  "forms" : [ {
+    "name" : "Duplications",
+    "description" : "The ratio of files without duplications should be at least the given value",
+    "comments" : "No comments",
+    "fixedPart" : {
+      "formText" : "The ratio of files without duplications should be at least %value%"
+    }
+  } ],
+  "costFunction" : "No cost function"
+} ]
+
+
+
+
+
+

6.5. Get single quality requirement pattern

+
+

Path parameters

+ + ++++ + + + + + + + + + + + + +
Table 1. /api/qrPatterns/{id}
ParameterDescription

id

Quality requirement pattern identifier

+
+
+

Curl request

+
+
+
$ curl 'http://localhost:8080/api/qrPatterns/100' -i -X GET
+
+
+
+
+

Response fields

+ +++++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
PathTypeDescription

id

Number

Quality requirement identifier

name

String

Quality requirement name

comments

String

Quality requirement comments

description

String

Quality requirement description

goal

String

Quality requirement goal

forms[].name

String

Suggested quality requirement name

forms[].description

String

Suggested quality requirement description

forms[].comments

String

Suggested quality requirement comments

forms[].fixedPart.formText

String

Suggested quality requirement text

costFunction

String

Suggested quality requirement cost function

+
+
+

HTTP response

+
+
+
HTTP/1.1 200 OK
+Content-Length: 512
+Content-Type: application/json;charset=UTF-8
+
+{
+  "id" : 100,
+  "name" : "Duplications",
+  "comments" : "No comments",
+  "description" : "No description",
+  "goal" : "Improve the quality of the source code",
+  "forms" : [ {
+    "name" : "Duplications",
+    "description" : "The ratio of files without duplications should be at least the given value",
+    "comments" : "No comments",
+    "fixedPart" : {
+      "formText" : "The ratio of files without duplications should be at least %value%"
+    }
+  } ],
+  "costFunction" : "No cost function"
+}
+
+
+
+
+
+

6.6. Get metric for quality requirement pattern

+
+

Path parameters

+ + ++++ + + + + + + + + + + + + +
Table 1. /api/qrPatterns/{id}/metric
ParameterDescription

id

Quality requirement pattern identifier

+
+
+

Curl request

+
+
+
$ curl 'http://localhost:8080/api/qrPatterns/1/metric' -i -X GET
+
+
+
+
+

Response fields

+ +++++ + + + + + + + + + + + + + + +
PathTypeDescription

metric

String

Metric identifier

+
+
+

HTTP response

+
+
+
HTTP/1.1 200 OK
+Content-Length: 29
+Content-Type: application/json;charset=UTF-8
+
+{
+  "metric" : "comments"
+}
+
+
+
+
+
+
+
+

7. Decisions

+
+
+

7.1. Get all decisions

+
+

Request parameters

+ ++++ + + + + + + + + + + + + + + + + + + + + + + + + +
ParameterDescription

prj

Project external identifier

qrs

Indicates if the result must include the information about the quality requirements associated to the decisions

from

Starting date (yyyy-mm-dd) for the requested the period

to

Ending date (yyyy-mm-dd) for the requested the period

+
+
+

Curl request

+
+
+
$ curl 'http://localhost:8080/api/decisions?prj=test&qrs=true&from=2019-07-15&to=2019-08-01' -i -X GET
+
+
+
+
+

Response fields

+ +++++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
PathTypeDescription

[].id

Number

Decision identifier

[].type

String

Decision type (ADD or IGNORE)

[].date

Number

Decision creation date

[].author

Null

Name of the decision creator

[].rationale

String

User rationale behind the decision

[].patternId

Number

Identifier of the quality requirement pattern being added or ignored

[].elementId

String

Identifier of the element impacted by the quality requirement

[].requirement

String

Text of the added quality requirement

[].description

String

Description of the added quality requirement

[].goal

String

Goal of the added quality requirement

[].backlogId

String

Quality requirement identifier inside the backlog

[].backlogUrl

String

Link to the backlog issue containing the quality requirement

+
+
+

HTTP response

+
+
+
HTTP/1.1 200 OK
+Content-Length: 493
+Content-Type: application/json;charset=UTF-8
+
+[ {
+  "id" : 2,
+  "type" : "ADD",
+  "date" : 1592304288884,
+  "author" : null,
+  "rationale" : "User comments",
+  "patternId" : 100,
+  "elementId" : "duplications",
+  "requirement" : "The ratio of files without duplications should be at least 0.8",
+  "description" : "The ratio of files without duplications should be at least the given value",
+  "goal" : "Improve the quality of the source code",
+  "backlogId" : "ID-999",
+  "backlogUrl" : "https://backlog.example/issue/999"
+} ]
+
+
+
+
+
+
+
+

8. Feedback

+
+
+

8.1. Add new feedback

+
+

Path parameters

+ + ++++ + + + + + + + + + + + + +
Table 1. /api/strategicIndicators/{id}/feedback
ParameterDescription

id

Strategic indicator identifier

+
+
+

Request fields

+ +++++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
PathTypeDescription

newvalue

String

New strategic indicator value

oldvalue

String

Old strategic indicator value

factorIds

String

List of the factors identifiers

factorNames

String

List of the factors names

factorValues

String

List of the factors values

factorEvaluationDates

String

List of the factors evaluation dates

+
+
+

Curl request

+
+
+
$ curl 'http://localhost:8080/api/strategicIndicators/1/feedback' -i -X POST \
+    -H 'Content-Type: application/json' \
+    -d '{
+  "newvalue" : "0.75",
+  "factorEvaluationDates" : "[\"2019-07-07\",\"2019-07-06\",\"2019-07-05\"]",
+  "factorIds" : "[\"factor1\",\"factor2\",\"factor3\"]",
+  "factorValues" : "[\"0.8\",\"0.7\",\"0.6\"]",
+  "oldvalue" : "0.6",
+  "factorNames" : "[\"Factor 1\",\"Factor 2\",\"Factor 3\"]"
+}'
+
+
+
+
+

HTTP response

+
+
+
HTTP/1.1 202 Accepted
+
+
+
+
+

HTTP response missing body parameter

+
+
+
HTTP/1.1 400 Bad Request
+
+
+
+
+
+

8.2. Get feedback for strategic indicator

+
+

Path parameters

+ + ++++ + + + + + + + + + + + + +
Table 1. /api/strategicIndicators/{id}/feedback
ParameterDescription

id

Strategic indicator identifier

+
+
+

Curl request

+
+
+
$ curl 'http://localhost:8080/api/strategicIndicators/1/feedback' -i -X GET
+
+
+
+
+

Response fields

+ +++++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
PathTypeDescription

[].strategicIndicatorId

Number

Strategic indicator identifier

[].date

String

Feedback creation date

[].author

Null

Feedback creator name

[].newValue

Number

New strategic indicator value

[].oldValue

Number

Old strategic indicator value

+
+
+

HTTP response

+
+
+
HTTP/1.1 200 OK
+Content-Length: 127
+Content-Type: application/json;charset=UTF-8
+
+[ {
+  "strategicIndicatorId" : 1,
+  "date" : "2020-06-16",
+  "author" : null,
+  "oldValue" : 0.6,
+  "newValue" : 0.75
+} ]
+
+
+
+
+
+

8.3. Get feedback report for strategic indicator

+
+

Path parameters

+ + ++++ + + + + + + + + + + + + +
Table 1. /api/strategicIndicators/{id}/feedbackReport
ParameterDescription

id

Strategic indicator identifier

+
+
+

Curl request

+
+
+
$ curl 'http://localhost:8080/api/strategicIndicators/1/feedbackReport' -i -X GET
+
+
+
+
+

Response fields

+ +++++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
PathTypeDescription

[].siId

Number

Strategic indicator identifier

[].siName

String

Strategic indicator name

[].date

String

Feedback creation date

[].fact

Array

List with factor names

[].factVal

Array

List with factor values

[].author

Null

Feedback creator name

[].oldvalue

Number

Old strategic indicator value

[].oldCategory

String

Old strategic indicator category name

[].oldCategoryColor

String

Old strategic indicator category color

[].newvalue

Number

New strategic indicator value

[].newCategory

String

New strategic indicator category name

[].newCategoryColor

String

New strategic indicator category color

+
+
+

HTTP response

+
+
+
HTTP/1.1 200 OK
+Content-Length: 346
+Content-Type: application/json;charset=UTF-8
+
+[ {
+  "siId" : 1,
+  "siName" : "Blocking",
+  "date" : "2019-07-07",
+  "fact" : [ "Factor 1", "Factor 2", "Factor 3" ],
+  "factVal" : [ 0.8, 0.7, 0.6 ],
+  "author" : null,
+  "oldvalue" : 0.6,
+  "oldCategory" : "Medium",
+  "oldCategoryColor" : "Orange",
+  "newvalue" : 0.75,
+  "newCategory" : "High",
+  "newCategoryColor" : "Green"
+} ]
+
+
+
+
+
+
+
+

9. Projects

+
+
+

9.1. Import projects

+
+

Curl request

+
+
+
$ curl 'http://localhost:8080/api/projects/import' -i -X GET
+
+
+
+
+

Response fields

+ +++++ + + + + + + + + + + + + + + +
PathTypeDescription

[]

Array

List with the external identifiers of all the assessed projects

+
+
+

HTTP response

+
+
+
HTTP/1.1 200 OK
+Content-Length: 38
+Content-Type: application/json;charset=UTF-8
+
+[ "project1", "project2", "project3" ]
+
+
+
+
+

HTTP response categories error

+
+
+
HTTP/1.1 409 Conflict
+
+
+
+
+

HTTP response error on ElasticSearch connection

+
+
+
HTTP/1.1 500 Internal Server Error
+
+
+
+
+
+

9.2. Get all projects

+
+

Curl request

+
+
+
$ curl 'http://localhost:8080/api/projects' -i -X GET
+
+
+
+
+

Response fields

+ +++++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
PathTypeDescription

[].id

Number

Project identifier

[].externalId

String

Project external identifier

[].name

String

Project name

[].description

String

Project description

[].logo

Null

Project logo file

[].active

Boolean

Is an active project?

[].backlogId

String

Project identifier in the backlog

+
+
+

HTTP response

+
+
+
HTTP/1.1 200 OK
+Content-Length: 163
+Content-Type: application/json;charset=UTF-8
+
+[ {
+  "id" : 1,
+  "externalId" : "test",
+  "name" : "Test",
+  "description" : "Test project",
+  "logo" : null,
+  "active" : true,
+  "backlogId" : "999"
+} ]
+
+
+
+
+
+

9.3. Get single project

+
+

Path parameters

+ + ++++ + + + + + + + + + + + + +
Table 1. /api/projects/{id}
ParameterDescription

id

Project identifier

+
+
+

Curl request

+
+
+
$ curl 'http://localhost:8080/api/projects/1' -i -X GET
+
+
+
+
+

Response fields

+ +++++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
PathTypeDescription

id

Number

Project identifier

externalId

String

Project external identifier

name

String

Project name

description

String

Project description

logo

Null

Project logo file

active

Boolean

Is an active project?

backlogId

String

Project identifier in the backlog

+
+
+

HTTP response

+
+
+
HTTP/1.1 200 OK
+Content-Length: 159
+Content-Type: application/json;charset=UTF-8
+
+{
+  "id" : 1,
+  "externalId" : "test",
+  "name" : "Test",
+  "description" : "Test project",
+  "logo" : null,
+  "active" : true,
+  "backlogId" : "999"
+}
+
+
+
+
+
+

9.4. Update project

+
+

Path parameters

+ + ++++ + + + + + + + + + + + + +
Table 1. /api/projects/{id}
ParameterDescription

id

Project identifier

+
+
Request parameters
+ ++++ + + + + + + + + + + + + + + + + + + + + + + + + +
ParameterDescription

externalId

Project external identifier

name

Project name

description

Project description

backlogId

Project identifier in the backlog

+
+
+
Request parts
+ ++++ + + + + + + + + + + + + +
PartDescription

logo

Project logo file

+
+
+
Curl request
+
+
+
$ curl 'http://localhost:8080/api/projects/1' -i -X PUT \
+    -H 'Content-Type: multipart/form-data' \
+    -F 'logo=@logo.jpg;type=image/jpeg' \
+    -F 'externalId=test' \
+    -F 'name=Test' \
+    -F 'description=Test project' \
+    -F 'backlogId=999'
+
+
+
+
+
HTTP response
+
+
+
HTTP/1.1 200 OK
+
+
+
+
+
+

HTTP response name already exists

+
+
+
HTTP/1.1 409 Conflict
+
+
+
+
+
+
+
+

10. Products

+
+
+

10.1. Get all products

+
+

Curl request

+
+
+
$ curl 'http://localhost:8080/api/products' -i -X GET
+
+
+
+
+

Response fields

+ +++++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
PathTypeDescription

[].id

Number

Product identifier

[].name

String

Product name

[].description

String

Product description

[].logo

Null

Product logo file

[].projects

Array

List of all the projects which compose the product

[].projects[].id

Number

Project identifier

[].projects[].externalId

String

Project external identifier

[].projects[].name

String

Project name

[].projects[].description

String

Project description

[].projects[].logo

Null

Project logo file

[].projects[].active

Boolean

Is an active project?

[].projects[].backlogId

String

Project identifier in the backlog

+
+
+

HTTP response

+
+
+
HTTP/1.1 200 OK
+Content-Length: 290
+Content-Type: application/json;charset=UTF-8
+
+[ {
+  "id" : 1,
+  "name" : "Test",
+  "description" : "Test product",
+  "logo" : null,
+  "projects" : [ {
+    "id" : 1,
+    "externalId" : "test",
+    "name" : "Test",
+    "description" : "Test project",
+    "logo" : null,
+    "active" : true,
+    "backlogId" : "999"
+  } ]
+} ]
+
+
+
+
+
+

10.2. Get single product

+
+

Path parameters

+ + ++++ + + + + + + + + + + + + +
Table 1. /api/products/{id}
ParameterDescription

id

Product identifier

+
+
+

Curl request

+
+
+
$ curl 'http://localhost:8080/api/products/1' -i -X GET
+
+
+
+
+

Response fields

+ +++++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
PathTypeDescription

id

Number

Product identifier

name

String

Product name

description

String

Product description

logo

Null

Product logo file

projects

Array

List of all the projects which compose the product

projects[].id

Number

Project identifier

projects[].externalId

String

Project external identifier

projects[].name

String

Project name

projects[].description

String

Project description

projects[].logo

Null

Project logo file

projects[].active

Boolean

Is an active project?

projects[].backlogId

String

Project identifier in the backlog

+
+
+

HTTP response

+
+
+
HTTP/1.1 200 OK
+Content-Length: 286
+Content-Type: application/json;charset=UTF-8
+
+{
+  "id" : 1,
+  "name" : "Test",
+  "description" : "Test product",
+  "logo" : null,
+  "projects" : [ {
+    "id" : 1,
+    "externalId" : "test",
+    "name" : "Test",
+    "description" : "Test project",
+    "logo" : null,
+    "active" : true,
+    "backlogId" : "999"
+  } ]
+}
+
+
+
+
+
+

10.3. New product

+
+

Request parameters

+ ++++ + + + + + + + + + + + + + + + + + + + + +
ParameterDescription

name

Product name

description

Product description

projects

Comma separated values of the project identifiers which belong to the product

+
+
+

Request parts

+ ++++ + + + + + + + + + + + + +
PartDescription

logo

Product logo file

+
+
+

Curl request

+
+
+
$ curl 'http://localhost:8080/api/products' -i -X POST \
+    -H 'Content-Type: multipart/form-data' \
+    -F 'logo=@logo.jpg;type=image/jpeg' \
+    -F 'name=Test' \
+    -F 'description=Test product' \
+    -F 'projects=1'
+
+
+
+
+

HTTP response

+
+
+
HTTP/1.1 201 Created
+
+
+
+
+

HTTP response name already exists

+
+
+
HTTP/1.1 409 Conflict
+
+
+
+
+
+

10.4. Update product

+
+

Path parameters

+ + ++++ + + + + + + + + + + + + +
Table 2. /api/products/{id}
ParameterDescription

id

Product identifier

+
+
Request parameters
+ ++++ + + + + + + + + + + + + + + + + + + + + +
ParameterDescription

name

Product name

description

Product description

projects

Comma separated values of the project identifiers which belong to the product

+
+
+
Request parts
+ ++++ + + + + + + + + + + + + +
PartDescription

logo

Product logo file

+
+
+
Curl request
+
+
+
$ curl 'http://localhost:8080/api/products/1' -i -X PUT \
+    -H 'Content-Type: multipart/form-data' \
+    -F 'logo=@logo.jpg;type=image/jpeg' \
+    -F 'name=Test' \
+    -F 'description=Test product' \
+    -F 'projects=1'
+
+
+
+
+
HTTP response
+
+
+
HTTP/1.1 200 OK
+
+
+
+
+
+

HTTP response name already exists

+
+
+
HTTP/1.1 409 Conflict
+
+
+
+
+
+

10.5. Delete product

+
+

Path parameters

+ + ++++ + + + + + + + + + + + + +
Table 1. /api/products/{id}
ParameterDescription

id

Product identifier

+
+
+

Curl request

+
+
+
$ curl 'http://localhost:8080/api/products/1' -i -X DELETE
+
+
+
+
+

HTTP response

+
+
+
HTTP/1.1 200 OK
+
+
+
+
+
+

10.6. Get product evaluation

+
+

Path parameters

+ + ++++ + + + + + + + + + + + + +
Table 1. /api/products/{id}/current
ParameterDescription

id

Product identifier

+
+
+

Curl request

+
+
+
$ curl 'http://localhost:8080/api/products/1/current' -i -X GET
+
+
+
+
+

Response fields

+ +++++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
PathTypeDescription

[].id

String

Strategic indicator identifier

[].dbId

Number

Strategic indicator database identifier

[].name

String

Strategic indicator name

[].description

String

Strategic indicator description

[].value.first

Number

Strategic indicator numerical value

[].value.second

String

Strategic indicator category

[].confidence80

Null

Strategic indicator forecasting 80% confidence interval

[].confidence95

Null

Strategic indicator forecasting 95% confidence interval

[].value_description

String

Readable strategic indicator value and category

[].rationale

String

Strategic indicator evaluation rationale

[].probabilities

Array

Strategic indicator categories list

[].probabilities[].id

Number

Strategic indicator category identifier

[].probabilities[].label

String

Strategic indicator category label

[].probabilities[].value

Null

Strategic indicator category probability

[].probabilities[].color

String

Strategic indicator category hexadecimal color

[].probabilities[].upperThreshold

Number

Strategic indicator category upper threshold

[].date

Array

Strategic indicator assessment date

[].datasource

String

Strategic indicator source of data

[].categories_description

String

Array with the strategic indicator categories and thresholds

[].hasBN

Boolean

Does the strategic indicator have a Bayesian Network?

[].hasFeedback

Boolean

Does the strategic indicator have any feedback

[].forecastingError

Null

Errors in the forecasting

[].mismatchDays

Number

Maximum difference (in days) when there is difference in the evaluation dates between the strategic indicator and some quality factors

[].missingFactors

Null

Factors without assessment

+
+
+

HTTP response

+
+
+
HTTP/1.1 200 OK
+Content-Length: 1005
+Content-Type: application/json;charset=UTF-8
+
+[ {
+  "id" : "blocking",
+  "dbId" : 1,
+  "name" : "Blocking",
+  "description" : "Blocking elements",
+  "value" : {
+    "first" : 0.8,
+    "second" : "Good"
+  },
+  "value_description" : "Good (0.80)",
+  "rationale" : "factors: {...}, formula: ..., value: ..., category: ...",
+  "probabilities" : [ {
+    "id" : 10,
+    "label" : "Good",
+    "value" : null,
+    "color" : "#00ff00",
+    "upperThreshold" : 0.66
+  }, {
+    "id" : 11,
+    "label" : "Neutral",
+    "value" : null,
+    "color" : "#ff8000",
+    "upperThreshold" : 0.33
+  }, {
+    "id" : 11,
+    "label" : "Bad",
+    "value" : null,
+    "color" : "#ff0000",
+    "upperThreshold" : 0.0
+  } ],
+  "date" : [ 2019, 7, 7 ],
+  "datasource" : "Q-Rapdis Dashboard",
+  "categories_description" : "[Good (0,67), Neutral (0,33), Bad (0,00)]",
+  "hasBN" : false,
+  "hasFeedback" : false,
+  "confidence80" : null,
+  "confidence95" : null,
+  "forecastingError" : null,
+  "mismatchDays" : 0,
+  "missingFactors" : null
+} ]
+
+
+
+
+
+

10.7. Get product detailed evaluation

+
+

Path parameters

+ + ++++ + + + + + + + + + + + + +
Table 1. /api/products/{id}/projects/current
ParameterDescription

id

Product identifier

+
+
+

Curl request

+
+
+
$ curl 'http://localhost:8080/api/products/1/projects/current' -i -X GET
+
+
+
+
+

Response fields

+ +++++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
PathTypeDescription

[].first

String

Project external identifier

[].second

Array

List of the current assessment of every strategic indicator inside the project

[].second[].id

String

Strategic indicator identifier

[].second[].dbId

Number

Strategic indicator database identifier

[].second[].name

String

Strategic indicator name

[].second[].description

String

Strategic indicator description

[].second[].value.first

Number

Strategic indicator numerical value

[].second[].value.second

String

Strategic indicator category

[].second[].confidence80

Null

Strategic indicator forecasting 80% confidence interval

[].second[].confidence95

Null

Strategic indicator forecasting 95% confidence interval

[].second[].value_description

String

Readable strategic indicator value and category

[].second[].rationale

String

Strategic indicator evaluation rationale

[].second[].probabilities

Array

Strategic indicator categories list

[].second[].probabilities[].id

Number

Strategic indicator category identifier

[].second[].probabilities[].label

String

Strategic indicator category label

[].second[].probabilities[].value

Null

Strategic indicator category probability

[].second[].probabilities[].color

String

Strategic indicator category hexadecimal color

[].second[].probabilities[].upperThreshold

Number

Strategic indicator category upper threshold

[].second[].date

Array

Strategic indicator assessment date

[].second[].datasource

String

Strategic indicator source of data

[].second[].categories_description

String

Array with the strategic indicator categories and thresholds

[].second[].hasBN

Boolean

Does the strategic indicator have a Bayesian Network?

[].second[].hasFeedback

Boolean

Does the strategic indicator have any feedback

[].second[].forecastingError

Null

Errors in the forecasting

[].second[].mismatchDays

Number

Maximum difference (in days) when there is difference in the evaluation dates between the strategic indicator and some quality factors

[].second[].missingFactors

Null

Factors without assessment

+
+
+

HTTP response

+
+
+
HTTP/1.1 200 OK
+Content-Type: application/json;charset=UTF-8
+Content-Length: 1129
+
+[ {
+  "first" : "test",
+  "second" : [ {
+    "id" : "blocking",
+    "dbId" : 1,
+    "name" : "Blocking",
+    "description" : "Blocking elements",
+    "value" : {
+      "first" : 0.8,
+      "second" : "Good"
+    },
+    "value_description" : "Good (0.80)",
+    "rationale" : "factors: {...}, formula: ..., value: ..., category: ...",
+    "probabilities" : [ {
+      "id" : 10,
+      "label" : "Good",
+      "value" : null,
+      "color" : "#00ff00",
+      "upperThreshold" : 0.66
+    }, {
+      "id" : 11,
+      "label" : "Neutral",
+      "value" : null,
+      "color" : "#ff8000",
+      "upperThreshold" : 0.33
+    }, {
+      "id" : 11,
+      "label" : "Bad",
+      "value" : null,
+      "color" : "#ff0000",
+      "upperThreshold" : 0.0
+    } ],
+    "date" : [ 2019, 7, 7 ],
+    "datasource" : "Q-Rapdis Dashboard",
+    "categories_description" : "[Good (0,67), Neutral (0,33), Bad (0,00)]",
+    "hasBN" : false,
+    "hasFeedback" : false,
+    "confidence80" : null,
+    "confidence95" : null,
+    "forecastingError" : null,
+    "mismatchDays" : 0,
+    "missingFactors" : null
+  } ]
+} ]
+
+
+
+
+
+
+
+

11. Others

+
+
+

11.1. Get forecasting techniques

+
+

Curl request

+
+
+
$ curl 'http://localhost:8080/api/forecastTechniques' -i -X GET
+
+
+
+
+

Response fields

+ +++++ + + + + + + + + + + + + + + +
PathTypeDescription

[]

Array

Array with the forecasting techniques names

+
+
+

HTTP response

+
+
+
HTTP/1.1 200 OK
+Content-Type: application/json;charset=UTF-8
+Content-Length: 26
+
+[ "PROPHET", "ETS", "NN" ]
+
+
+
+
+
+

11.2. Get project milestones

+
+

Request parameters

+ ++++ + + + + + + + + + + + + + + + + +
ParameterDescription

prj

Project external identifier

date

Minimum milestone date (yyyy-mm-dd)

+
+
+

Curl request

+
+
+
$ curl 'http://localhost:8080/api/milestones?prj=test&date=2020-06-16' -i -X GET
+
+
+
+
+

Response fields

+ +++++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
PathTypeDescription

[].date

String

Milestone date

[].name

String

Milestone name

[].description

String

Milestone description

[].type

String

Milestone type

+
+
+

HTTP response

+
+
+
HTTP/1.1 200 OK
+Content-Length: 137
+Content-Type: application/json;charset=UTF-8
+
+[ {
+  "date" : "2020-06-19",
+  "name" : "Version 1.3",
+  "description" : "Version 1.3 adding new features",
+  "type" : "Release"
+} ]
+
+
+
+
+
+

11.3. Get project phases

+
+

Request parameters

+ ++++ + + + + + + + + + + + + + + + + +
ParameterDescription

prj

Project external identifier

date

Minimum phase date (yyyy-mm-dd)

+
+
+

Curl request

+
+
+
$ curl 'http://localhost:8080/api/phases?prj=test' -i -X GET
+
+
+
+
+

Response fields

+ +++++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
PathTypeDescription

[].dateFrom

String

Phase from date

[].name

String

Phase name

[].description

String

Phase description

[].dateTo

String

Phase to date

+
+
+

HTTP response

+
+
+
HTTP/1.1 200 OK
+Content-Type: application/json;charset=UTF-8
+Content-Length: 156
+
+[ {
+  "dateFrom" : "2020-06-01",
+  "name" : "Development",
+  "description" : "Implementation of project functionalities",
+  "dateTo" : "2020-07-01"
+} ]
+
+
+
+
+
+
+
+ \ No newline at end of file diff --git a/sonar-project.properties b/sonar-project.properties index 5cfe689e..0ed3436d 100644 --- a/sonar-project.properties +++ b/sonar-project.properties @@ -2,7 +2,7 @@ sonar.projectKey=q-rapids_qrapids-dashboard sonar.projectName=qrapids-dashboard -sonar.projectVersion=1.3 +sonar.projectVersion=1.4 sonar.sources=src/main/java sonar.tests=src/test/java diff --git a/src/main/java/com/upc/gessi/qrapids/app/presentation/rest/dto/DTOSICurrentHistoricEvaluation.java b/src/main/java/com/upc/gessi/qrapids/app/presentation/rest/dto/DTOSICurrentHistoricEvaluation.java new file mode 100644 index 00000000..7575ed6b --- /dev/null +++ b/src/main/java/com/upc/gessi/qrapids/app/presentation/rest/dto/DTOSICurrentHistoricEvaluation.java @@ -0,0 +1,170 @@ +package com.upc.gessi.qrapids.app.presentation.rest.dto; + +import com.upc.gessi.qrapids.app.domain.controllers.StrategicIndicatorsController; +import org.springframework.data.util.Pair; + +import java.time.LocalDate; +import java.util.List; + +public class DTOSICurrentHistoricEvaluation { + //class attributes + private String id; + private Long dbId; + private String prjName; + private String name; + private String description; + private Pair currentValue; + private String currentValueDescription; + private String currentRationale; + private LocalDate currentDate; + private List probabilities; + private List historicalDataList; + + public static class DTOHistoricalData { + private Pair value; + private String valueDescription; + private String rationale; + private LocalDate date; + + public DTOHistoricalData(Pair value, String rationale, LocalDate date) { + setValue(value); + this.valueDescription = StrategicIndicatorsController.buildDescriptiveLabelAndValue(value); + setRationale(rationale); + setDate(date); + } + + public void setValue(Pair value) { + this.value = value; + } + + public Pair getValue() { + return value; + } + + public String getValueDescription() { + return valueDescription; + } + + public void setValueDescription(String valueDescription) { + this.valueDescription = valueDescription; + } + + public void setRationale(String rationale) { + this.rationale = rationale; + } + + public String getRationale() { + return rationale; + } + + public void setDate(LocalDate date) { + this.date = date; + } + + public LocalDate getDate() { + return date; + } + } + + public DTOSICurrentHistoricEvaluation(String id, String prjName, String name, String description, Pair value, Long dbId, + String rationale, List probabilities, LocalDate date) { + setId(id); + setPrjName(prjName); + setName(name); + setDescription(description); + setCurrentValue(value); + setCurrentRationale(rationale); + setProbabilities(probabilities); + setCurrentDate(date); + setDbId(dbId); + } + + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public Long getDbId() { + return dbId; + } + + public void setDbId(Long dbId) { + this.dbId = dbId; + } + + public String getPrjName() { + return prjName; + } + + public void setPrjName(String prjName) { + this.prjName = prjName; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public String getDescription() { + return description; + } + + public void setDescription(String description) { + if (description != null) + this.description = description; + } + + public Pair getCurrentValue() { + return currentValue; + } + + public String getCurrentValueDescription() { return currentValueDescription;} + + private void setCurrentValueDescription(Pair value) { + this.currentValueDescription = StrategicIndicatorsController.buildDescriptiveLabelAndValue(value); + } + + public void setCurrentValue(Pair value) { + this.currentValue = value; + setCurrentValueDescription(value); + } + + public void setCurrentRationale(String rationale) { + this.currentRationale = rationale; + } + + public String getCurrentRationale() { + return currentRationale; + } + + public List getProbabilities() { + return probabilities; + } + + public void setProbabilities(List probabilities) { + this.probabilities = probabilities; + } + + public LocalDate getCurrentDate() { + return currentDate; + } + + public void setCurrentDate(LocalDate date) { + this.currentDate = date; + } + + public List getHistoricalDataList() { + return historicalDataList; + } + + public void setHistoricalDataList(List historicalData) { + this.historicalDataList = historicalData; + } + +} diff --git a/src/main/java/com/upc/gessi/qrapids/app/presentation/rest/services/StrategicIndicators.java b/src/main/java/com/upc/gessi/qrapids/app/presentation/rest/services/StrategicIndicators.java index 2cf9dc3e..fce8337f 100644 --- a/src/main/java/com/upc/gessi/qrapids/app/presentation/rest/services/StrategicIndicators.java +++ b/src/main/java/com/upc/gessi/qrapids/app/presentation/rest/services/StrategicIndicators.java @@ -507,4 +507,40 @@ public LocalDate getcurrentDate(@RequestParam(value = "prj") String prj) { // if the response is null return null; } + + @GetMapping("/api/strategicIndicators/current_and_historical") + @ResponseStatus(HttpStatus.OK) + public List getStrategicIndicatorsCurrentHistoricEvaluation(@RequestParam(value = "prj", required=false) String prj, @RequestParam("from") String from, @RequestParam("to") String to) { + try { + Project project = projectsController.findProjectByExternalId(prj); + List currentData = strategicIndicatorsController.getAllStrategicIndicatorsCurrentEvaluation(prj); + List historicData = strategicIndicatorsController.getAllStrategicIndicatorsHistoricalEvaluation(prj, LocalDate.parse(from), LocalDate.parse(to)); + List result = new ArrayList<>(); + int j = 0; + for (int i = 0; i < currentData.size(); i++) { + DTOStrategicIndicatorEvaluation aux = currentData.get(i); + DTOSICurrentHistoricEvaluation siInfo = new DTOSICurrentHistoricEvaluation(aux.getId(),project.getName(),aux.getName(),aux.getDescription(), + aux.getValue(), aux.getDbId(),aux.getRationale(),aux.getProbabilities(),aux.getDate()); + List siHistInfo = new ArrayList<>(); + while (j < historicData.size() && aux.getId().equals(historicData.get(j).getId())) { + DTOStrategicIndicatorEvaluation histAux = historicData.get(j); + DTOSICurrentHistoricEvaluation.DTOHistoricalData histInfo = new DTOSICurrentHistoricEvaluation.DTOHistoricalData(histAux.getValue(),histAux.getRationale(),histAux.getDate()); + siHistInfo.add(histInfo); + j++; + } + siInfo.setHistoricalDataList(siHistInfo); + result.add(siInfo); + } + return result; + } catch (ElasticsearchStatusException e) { + logger.error(e.getMessage(), e); + throw new ResponseStatusException(HttpStatus.BAD_REQUEST, Messages.PROJECT_NOT_FOUND); + } catch (CategoriesException | ProjectNotFoundException e) { + logger.error(e.getMessage(), e); + throw new ResponseStatusException(HttpStatus.CONFLICT, Messages.CATEGORIES_DO_NOT_MATCH); + } catch (IOException e) { + logger.error(e.getMessage(), e); + throw new ResponseStatusException(HttpStatus.INTERNAL_SERVER_ERROR, Messages.INTERNAL_SERVER_ERROR + e.getMessage()); + } + } } diff --git a/src/main/java/com/upc/gessi/qrapids/app/presentation/rest/services/Util.java b/src/main/java/com/upc/gessi/qrapids/app/presentation/rest/services/Util.java index cbdce38f..58c3d99c 100644 --- a/src/main/java/com/upc/gessi/qrapids/app/presentation/rest/services/Util.java +++ b/src/main/java/com/upc/gessi/qrapids/app/presentation/rest/services/Util.java @@ -11,6 +11,7 @@ import javax.servlet.http.HttpServletResponse; import java.time.LocalDate; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; @RestController @@ -25,6 +26,20 @@ public class Util { @Value("${server.url}") private String serverUrl; + // add jasterserver data + @Value("${jasperServer.url}") + private String jasperserverURL; + @Value("${jasperserver.user}") + private String jasperserverUser; + @Value("${jasperserver.password}") + private String jasperserverPassword; + + @GetMapping("/api/jasperserverInfo") + @ResponseStatus(HttpStatus.OK) + public List jasperserverInfo() { + return Arrays.asList(jasperserverURL, jasperserverUser, jasperserverPassword); + } + @GetMapping("/api/rawdataDashboard") @ResponseStatus(HttpStatus.OK) public String RawDataDashboard() { diff --git a/src/main/java/com/upc/gessi/qrapids/app/presentation/web/mapping/ReportingController.java b/src/main/java/com/upc/gessi/qrapids/app/presentation/web/mapping/ReportingController.java new file mode 100644 index 00000000..67bfe015 --- /dev/null +++ b/src/main/java/com/upc/gessi/qrapids/app/presentation/web/mapping/ReportingController.java @@ -0,0 +1,10 @@ +package com.upc.gessi.qrapids.app.presentation.web.mapping; + +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.stereotype.Controller; + +@Controller("/Reporting") +public class ReportingController { + @RequestMapping("/Reporting") + public String reporting(){ return "Reporting/Reporting"; } +} diff --git a/src/main/resources/static/css/products.css b/src/main/resources/static/css/products.css index 431d41e8..fadbb499 100644 --- a/src/main/resources/static/css/products.css +++ b/src/main/resources/static/css/products.css @@ -1,24 +1,22 @@ @CHARSET "UTF-8"; -#productView, #SIConfigView, #CategoriesConfigView { +#productView, #SIConfigView, #CategoriesConfigView, #ReportingView { display: flex; flex-direction: row; } - -#productTree, #SITree, #CategoriesElementSelector { +#productTree, #SITree, #CategoriesElementSelector, #ProjectSelector { margin: 1%; width: 21%; } -#productInfo, #SIInfo, #Categories { +#productInfo, #SIInfo, #Categories, #ReportingInfo { margin: 1%; width: 75%; display: flex; flex-direction: column; } - -#productForm, #SIForm, #SICategories, #FactorsCategories, #MetricsCategories { +#productForm, #SIForm, #SICategories, #FactorsCategories, #MetricsCategories, #RedirectToReport, #tableREPdiv { margin: 1%; display: flex; flex-direction: column; diff --git a/src/main/resources/static/css/stylesDashboard.css b/src/main/resources/static/css/stylesDashboard.css index 12617186..3b610ff4 100644 --- a/src/main/resources/static/css/stylesDashboard.css +++ b/src/main/resources/static/css/stylesDashboard.css @@ -236,4 +236,11 @@ canvas { border: 1px solid gray; border-collapse: collapse; padding: 5px; +} + +col-reporting { + width: 50%; + float: left; + position: relative; + min-height: 1px; } \ No newline at end of file diff --git a/src/main/resources/static/js/navScript.js b/src/main/resources/static/js/navScript.js index dbb21a39..c04bd35b 100644 --- a/src/main/resources/static/js/navScript.js +++ b/src/main/resources/static/js/navScript.js @@ -205,6 +205,9 @@ if ((currentURL.search("/StrategicIndicators/") !== -1 || currentURL.search("/Ed } else if (currentURL.search("/Decisions") !== -1) { id = "Decisions"; highlight(id); +} else if (currentURL.search("/Reporting") !== -1) { + id = "Reporting"; + highlight(id); } else if (currentURL.search("/QualityModel") !== -1) { id = "QualityModel"; highlightAndSaveCurrentAssessment(id); @@ -374,6 +377,8 @@ $("#usersConfig").attr("href", serverUrl + "/users"); $("#usergroupsConfig").attr("href", serverUrl + "/usergroups"); +$("#Reporting").attr("href", serverUrl + "/Reporting"); + $("#LogoutProfileConfig").attr("href", serverUrl + "/logout_user"); $("#LogoutProfileConfig").click(function () { sessionStorage.removeItem("userName"); diff --git a/src/main/resources/static/js/predictionLineChart.js b/src/main/resources/static/js/predictionLineChart.js index b2a433df..f3398279 100644 --- a/src/main/resources/static/js/predictionLineChart.js +++ b/src/main/resources/static/js/predictionLineChart.js @@ -3,12 +3,10 @@ var config = []; var charts = []; if (isqf || isdsi) {// qf and dsi -> no intervals of confidence - var colors_hist = ['rgb(75, 149, 179)', 'rgb(242, 177, 111)', 'rgb(110, 212, 110)', 'rgb(255, 135, 135)', - 'rgb(232, 230, 139)', 'rgb(222, 147, 230)' ]; - var colors_pred = ['rgb(1, 119, 166)', 'rgb(255, 153, 51)', 'rgb(51, 204, 51)', 'rgb(255, 80, 80)', + var colors = ['rgb(1, 119, 166)', 'rgb(255, 153, 51)', 'rgb(51, 204, 51)', 'rgb(255, 80, 80)', 'rgb(204, 201, 53)', 'rgb(192, 96, 201)']; } else // metrics and si -> intervals of confidence - var colors = ['rgb(75, 149, 179)', 'rgb(1, 119, 166)', 'rgb( 254, 126, 0)', 'rgb( 254, 126, 0)', 'rgb( 255, 177, 101)', 'rgb( 255, 177, 101)']; + var colors = ['rgb(1, 119, 166)', 'rgb(1, 119, 166)', 'rgb( 254, 126, 0)', 'rgb( 254, 126, 0)', 'rgb( 255, 177, 101)', 'rgb( 255, 177, 101)']; if (isqf || isdsi) { // qf and dsi -> no intervals of confidence $('#showConfidence').prop("disabled",true); @@ -195,15 +193,15 @@ function drawChart() { if (value[i][j].length === 0) hidden = true; var showLine = true; var pointStyle = 'circle'; - var pointRadius = 3; + var pointRadius = 2.5; var borderWidth = 1; var color = []; if (isqf || isdsi) { var num = value[i].length/2; if (j < num) { // if we work with historical data - color = colors_hist[j % colors_hist.length]; + color = colors[j % colors.length]; } else { // if we work with predicted data - color = colors_pred[(j-num) % colors_pred.length]; + color = colors[(j-num) % colors.length]; } } else color = colors[j % colors.length]; // to paint areas for confidence interval series @@ -225,18 +223,35 @@ function drawChart() { borderWidth: borderWidth }); } else { // to paint mean serie - c.data.datasets.push({ - label: labels[i][j], - hidden: false, - backgroundColor: color, - borderColor: color, - fill: false, - data: value[i][j], - showLine: showLine, - pointStyle: pointStyle, - radius: pointRadius, - borderWidth: borderWidth - }); + if (labels[i][j].includes("Predicted ")) { // normal line for predicted data + c.data.datasets.push({ + label: labels[i][j], + hidden: false, + backgroundColor: color, + borderColor: color, + fill: false, + data: value[i][j], + showLine: showLine, + pointStyle: pointStyle, + radius: pointRadius, + borderWidth: borderWidth + }); + } else { // dashed line for historical data + c.data.datasets.push({ + label: labels[i][j], + hidden: false, + backgroundColor: color, + borderColor: color, + borderDash: [5,5], + fill: false, + data: value[i][j], + showLine: showLine, + pointStyle: pointStyle, + radius: 0, + borderWidth: borderWidth + }); + } + } if (!showLine) { diff --git a/src/main/resources/static/js/product.js b/src/main/resources/static/js/product.js index da0b65cc..dc822e8c 100644 --- a/src/main/resources/static/js/product.js +++ b/src/main/resources/static/js/product.js @@ -20,7 +20,7 @@ function buildFirstPartOfTree() { type: "GET", async: true, success: function (data) { - var productList = document.getElementById('productList'); + var T = document.getElementById('productList'); productList.innerHTML = ""; var product = document.createElement('li'); product.classList.add("list-group-item"); diff --git a/src/main/resources/static/js/reporting.js b/src/main/resources/static/js/reporting.js new file mode 100644 index 00000000..69ae86e3 --- /dev/null +++ b/src/main/resources/static/js/reporting.js @@ -0,0 +1,197 @@ +var dirs = [] +var serverUrl = sessionStorage.getItem("serverUrl"); + +var jasperserverURL; +var jasperserverUser; +var jasperserverPassword; + +function getJasperserverInfo() { + var url = "/api/jasperserverInfo"; + if (serverUrl) { + url = serverUrl + url; + } + jQuery.ajax({ + dataType: "json", + url: url, + cache: false, + type: "GET", + async: true, + success: function (data) { + jasperserverURL = data[0]; + jasperserverUser = data[1]; + jasperserverPassword = data[2]; + // we login before make other requests + $.ajax({ + type: "POST", + url: jasperserverURL + "/rest/login", + data: { + j_username: jasperserverUser, + j_password: jasperserverPassword + }, + success: function (data, textStatus, xhr) { + console.log("login response status: " + xhr.status); + readDirectories(); + } + }); + + } + }); +} + +function readDirectories(){ + $.ajax({ + dataType: "json", + url: jasperserverURL + "/rest_v2/resources?type=reportUnit", + type: "GET", + contentType: "application/x-www-form-urlencoded", + data: { + j_username:jasperserverUser, + j_password:jasperserverPassword + }, + success: function (data){ + for (i=0; i < data.resourceLookup.length; i++){ + // choose resource where in uri there is a Q-Rapids directory! + if(data.resourceLookup[i].uri.includes("/Q_Rapids/")){ + tmp = data.resourceLookup[i].uri.split("/"); + // the last one is a report, one before is its directory + if (!dirs.includes(tmp[tmp.length-2])) dirs.push(tmp[tmp.length-2]); + } + } + if (dirs && dirs.length){ + // first we need to sort directories in a case-insensitive way + dirs.sort((a,b) => (a.toLowerCase() > b.toLowerCase()) ? 1 : ((b.toLowerCase() > a.toLowerCase()) ? -1 : 0)); + // then make a list of buttons + var dirsList = dirs.slice(); + for (i = 0; i < dirsList.length; i++) { + // change _ to space or - + if (dirsList[i] == "Q_Rapids") dirsList[i] = dirsList[i].replace("_","-"); + else { + while (dirsList[i].includes("_")) + dirsList[i] = dirsList[i].replace("_"," "); + } + var opt = document.createElement("li"); + opt.setAttribute('id', (dirs[i] + 'Button')); + opt.setAttribute('class', 'list-group-item category-element'); + opt.setAttribute('onclick', 'showRInfo($(this), \"' + dirs[i] + '\" )'); + opt.innerHTML = dirsList[i]; + document.getElementById("ElementList").appendChild(opt); + } + } + else{ + var opt = document.createElement("li"); + opt.setAttribute('class', 'list-group-item category-element'); + opt.innerHTML = "No Q-Rapids' reports available in the server."; + document.getElementById("ElementList").appendChild(opt); + } + } + }); +}; + +function showRInfo(selectedElement, dirName){ + selectElement(selectedElement); + linkWithJasper(dirName); +} + +function selectElement (selectedElement) { + selectedElement.addClass("active"); + $(".category-element").each(function () { + if (selectedElement.attr("id") !== $(this).attr("id")) + $(this).removeClass("active"); + }); +} + +function linkWithJasper(dirName){ + $.ajax({ + dataType: "json", + url: jasperserverURL + "/rest_v2/resources?type=reportUnit", + type: "GET", + contentType: "application/x-www-form-urlencoded", + data: { + j_username:jasperserverUser, + j_password:jasperserverPassword + }, + dataType: "json", + success: function (data) { + while(document.getElementById("tableREP").hasChildNodes()) + document.getElementById("tableREP").removeChild(document.getElementById("tableREP").firstChild); + // add header to table --> made in html + // add data rows to table + for (i=0; i < data.resourceLookup.length; i++){ + // find reports for specified directory + if(data.resourceLookup[i].uri.includes("/Q_Rapids/")) { + tmp = data.resourceLookup[i].uri.split("/"); + // take a look is resource directory is correspond with selected one + if (tmp[tmp.length - 2] == dirName) { + var row = document.getElementById("tableREP").insertRow(-1); + var reportName = document.createElement("td"); + reportName.appendChild(document.createTextNode(data.resourceLookup[i].label)); + row.appendChild(reportName); + + var buttonViewTd = document.createElement("td"); + var buttonView = document.createElement("button"); + buttonView.setAttribute("class", "btn btn-link"); + buttonView.setAttribute('onclick', 'onClickBt(\"' + data.resourceLookup[i].uri + '\", \"html\" )'); + buttonView.innerText = "View as HTML"; + buttonViewTd.appendChild(buttonView); + row.appendChild(buttonViewTd); + + var buttonPDFtd = document.createElement("td"); + var buttonPDF = document.createElement("button"); + buttonPDF.setAttribute("class", "btn btn-link"); + buttonPDF.setAttribute('onclick', 'onClickBt(\"' + data.resourceLookup[i].uri + '\", \"pdf\" )'); + buttonPDF.innerText = "Save as PDF"; + buttonPDFtd.appendChild(buttonPDF); + row.appendChild(buttonPDFtd); + + var buttonPPTtd = document.createElement("td"); + var buttonPPT = document.createElement("button"); + buttonPPT.setAttribute("class", "btn btn-link"); + buttonPPT.setAttribute('onclick', 'onClickBt(\"' + data.resourceLookup[i].uri + '\", \"pptx\" )'); + buttonPPT.innerText = "Save as PowerPoint"; + buttonPPTtd.appendChild(buttonPPT); + row.appendChild(buttonPPTtd); + } + } + } + $("#tableREPdiv").show(); + }, + error: function() { + alert("Error loading reports"); + } + }); +} + +function onClickBt(uriReport, repType){ + // get project id from project selector + var p = sessionStorage.getItem("prj"); + var urlV = jasperserverURL + "/rest_v2/reports" + uriReport + "." + repType + "?projID=" + p + + "&from=" + $('#datepickerFrom').val() + "&to=" + $('#datepickerTo').val() + +"&j_username=" + jasperserverUser + "&j_password="+jasperserverPassword; // remove credentials from url + console.log(urlV); + window.open(urlV); +} + +// search function +$(document).ready(function(){ + $("#searchInput").on("keyup", function() { + var value = $(this).val().toLowerCase(); + $("#tableREP tr").filter(function() { + $(this).toggle($(this).text().toLowerCase().indexOf(value) > -1) + }); + }); +}); + +window.onload = function() { + getJasperserverInfo(); + // remove projectSelectorDiv old css class and put new one + const el = document.querySelector('#projectSelectorDiv'); + if (el.classList.contains("col-xs-4")) { + el.classList.remove("col-xs-4"); + el.classList.add("col-reporting"); + $('.col-reporting').css('padding-right', '15px'); + $('.col-reporting').css('padding-left', '15px'); + // also correct css of datapicker + $('.well').css('margin-top', '10px'); + $('.well').css('margin-bottom', '10px'); + } +}; diff --git a/src/main/resources/static/js/scriptDatePicker.js b/src/main/resources/static/js/scriptDatePicker.js index 70dc4f90..6dfc99dc 100644 --- a/src/main/resources/static/js/scriptDatePicker.js +++ b/src/main/resources/static/js/scriptDatePicker.js @@ -12,7 +12,7 @@ var config = { }; var currentURL = window.location.href; -if (currentURL.search("/Historic") !== -1) { +if ((currentURL.search("/Historic") !== -1) || (currentURL.search("/Reporting") !== -1)) { configureHistoric(); } else if (currentURL.search("/Prediction") !== -1) { configurePrediction(); @@ -23,12 +23,19 @@ function configureHistoric () { $('#datepickerFrom').datepicker(config); $('#datepickerTo').datepicker(config); - $('#intervalsDropdown').append('
  • This week
  • '); - $('#intervalsDropdown').append('
  • Last 7 days
  • '); - $('#intervalsDropdown').append('
  • Last 14 days
  • '); - $('#intervalsDropdown').append('
  • This month
  • '); - $('#intervalsDropdown').append('
  • This year
  • '); - + if (window.location.href.search("/Reporting") !== -1) { // reporting page intervals + $('#intervalsDropdown').append('
  • This week
  • '); + $('#intervalsDropdown').append('
  • Last 7 days
  • '); + $('#intervalsDropdown').append('
  • Last 14 days
  • '); + $('#intervalsDropdown').append('
  • This month
  • '); + $('#intervalsDropdown').append('
  • This year
  • '); + } else { // historic page intervals + $('#intervalsDropdown').append('
  • This week
  • '); + $('#intervalsDropdown').append('
  • Last 7 days
  • '); + $('#intervalsDropdown').append('
  • Last 14 days
  • '); + $('#intervalsDropdown').append('
  • This month
  • '); + $('#intervalsDropdown').append('
  • This year
  • '); + } var historicFrom; var historicTo; // we are navegating -> no params @@ -62,6 +69,11 @@ function configureHistoric () { $('#techniqueDropdownDiv').hide(); $('#current_dateDiv').hide(); $('#showConfidenceDiv').hide(); + // hide some parts in reporting page + if (window.location.href.search("/Reporting") !== -1) { + $('#fitToContentDiv').hide(); + $('#applyButton').hide(); + } } async function configurePrediction () { diff --git a/src/main/resources/templates/Fragments/TemplateDashboard.html b/src/main/resources/templates/Fragments/TemplateDashboard.html index 17901774..797bb9a3 100644 --- a/src/main/resources/templates/Fragments/TemplateDashboard.html +++ b/src/main/resources/templates/Fragments/TemplateDashboard.html @@ -50,6 +50,7 @@ Alerts Quality Requirements Decisions + Reporting