1. Introduction

RESTful wrapper for forecast library

2. Endpoints

2.1. Forecast Techniques

Forecast techniques

Curl request

$ curl 'http://localhost:8080/api/ForecastTechniques?host=host&port=8080&path=path&user=user&pwd=pwd' -i -X GET

Response fields

Path Type Description

[]

Array

Forecast techiques

HTTP response

HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 114

[ "ARIMA", "ARIMA_FORCE_SEASONALITY", "THETA", "ETS", "ETSDAMPED", "BAGGEDETS", "STL", "NN", "HYBRID", "PROPHET" ]

2.2. Forecast Training

Train the models for future forecasting

Request parameters

Parameter Description

host

ElasticSearch host

port

ElasticSearch port

path

ElasticSearch path

user

ElasticSearch user

pwd

ElasticSearch password

index

ElasticSearch name of metrics or factors index

elements

List of elements to forecast

frequency

Amount of days conforming the natural time period of the data samples

technique

Technique to train. If not present, all techniques are trained.

Curl request

$ curl 'http://localhost:8080/api/Train?host=host&port=8080&path=path&user=user&pwd=pwd&index=indexMetrics&elements=testperformance&frequency=7&technique=ETS' -i -X GET

HTTP response

HTTP/1.1 200 OK

2.3. Metrics forecasting

Metrics forecasting

Request parameters

Parameter Description

host

ElasticSearch host

port

ElasticSearch port

path

ElasticSearch path

user

ElasticSearch user

pwd

ElasticSearch password

index_metrics

ElasticSearch name of metrics index

metric

List of metrics to forecast

frequency

Amount of days conforming the natural time period of the data samples

horizon

Amount of days that the forecasting will cover

technique

Forecasting technique

Curl request

$ curl 'http://localhost:8080/api/Metrics/Forecast?host=host&port=8080&path=path&user=user&pwd=pwd&index_metrics=indexMetrics&metric=testperformance&frequency=7&horizon=10&technique=ETS' -i -X GET

Response fields

Path Type Description

[].id

String

Metric id

[].lower80

Array

Lower 80 confidence predicted interval

[].lower95

Array

Lower 95 confidence predicted interval

[].mean

Array

Mean confidence predicted interval

[].upper80

Array

Upper 80 confidence predicted interval

[].upper95

Array

Upper 95 confidence predicted interval

[].error

String

Description of the forecasting error

HTTP response

HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 840

[ {
  "lower80" : [ 0.6414524692520523, 0.6310027287500249, 0.6229788194502033, 0.6162098305036225, 0.6102422881085776, 0.6048436667711347, 0.5998758631263202 ],
  "lower95" : [ 0.6281052189200053, 0.612123719944535, 0.5998522096396154, 0.5894999343947172, 0.5803733658781132, 0.5721168870347814, 0.564519286994423 ],
  "mean" : [ 0.6666660253129496, 0.6666660253129496, 0.6666660253129496, 0.6666660253129496, 0.6666660253129496, 0.6666660253129496, 0.6666660253129496 ],
  "upper80" : [ 0.6918795813738469, 0.7023293218758743, 0.7103532311756959, 0.7171222201222767, 0.7230897625173216, 0.7284883838547646, 0.733456187499579 ],
  "upper95" : [ 0.705226831705894, 0.7212083306813643, 0.7334798409862838, 0.7438321162311821, 0.752958684747786, 0.7612151635911178, 0.7688127636314762 ],
  "id" : "testperformance",
  "error" : ""
} ]

2.4. Factors forecasting

Factors forecasting

Request parameters

Parameter Description

host

ElasticSearch host

port

ElasticSearch port

path

ElasticSearch path

user

ElasticSearch user

pwd

ElasticSearch password

index_factors

ElasticSearch name of factors index

factor

List of factors to forecast

frequency

Amount of days conforming the natural time period of the data samples

horizon

Amount of days that the forecasting will cover

technique

Forecasting technique

Curl request

$ curl 'http://localhost:8080/api/QualityFactors/Forecast?host=host&port=8080&path=path&user=user&pwd=pwd&index_factors=indexFactors&factor=blockingcode&frequency=7&horizon=10&technique=ETS' -i -X GET

Response fields

Path Type Description

[].id

String

Factor id

[].lower80

Array

Lower 80 confidence predicted interval

[].lower95

Array

Lower 95 confidence predicted interval

[].mean

Array

Mean confidence predicted interval

[].upper80

Array

Upper 80 confidence predicted interval

[].upper95

Array

Upper 95 confidence predicted interval

[].error

String

Description of the forecasting error

HTTP response

HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 837

[ {
  "lower80" : [ 0.6414524692520523, 0.6310027287500249, 0.6229788194502033, 0.6162098305036225, 0.6102422881085776, 0.6048436667711347, 0.5998758631263202 ],
  "lower95" : [ 0.6281052189200053, 0.612123719944535, 0.5998522096396154, 0.5894999343947172, 0.5803733658781132, 0.5721168870347814, 0.564519286994423 ],
  "mean" : [ 0.6666660253129496, 0.6666660253129496, 0.6666660253129496, 0.6666660253129496, 0.6666660253129496, 0.6666660253129496, 0.6666660253129496 ],
  "upper80" : [ 0.6918795813738469, 0.7023293218758743, 0.7103532311756959, 0.7171222201222767, 0.7230897625173216, 0.7284883838547646, 0.733456187499579 ],
  "upper95" : [ 0.705226831705894, 0.7212083306813643, 0.7334798409862838, 0.7438321162311821, 0.752958684747786, 0.7612151635911178, 0.7688127636314762 ],
  "id" : "blockingcode",
  "error" : ""
} ]

2.5. Strategic Indicators forecasting

Strategic Indicators forecasting

Request parameters

Parameter Description

host

ElasticSearch host

port

ElasticSearch port

path

ElasticSearch path

user

ElasticSearch user

pwd

ElasticSearch password

index_strategic_indicators

ElasticSearch name of strategic indicators index

strategic_indicator

List of strategic indicators to forecast

frequency

Amount of days conforming the natural time period of the data samples

horizon

Amount of days that the forecasting will cover

technique

Forecasting technique

Curl request

$ curl 'http://localhost:8080/api/StrategicIndicators/Forecast?host=host&port=8080&path=path&user=user&pwd=pwd&index_strategic_indicators=indexSIs&strategic_indicator=blocking&frequency=7&horizon=10&technique=ETS' -i -X GET

Response fields

Path Type Description

[].id

String

Strategic Indicator id

[].lower80

Array

Lower 80 confidence predicted interval

[].lower95

Array

Lower 95 confidence predicted interval

[].mean

Array

Mean confidence predicted interval

[].upper80

Array

Upper 80 confidence predicted interval

[].upper95

Array

Upper 95 confidence predicted interval

[].error

String

Description of the forecasting error

HTTP response

HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 833

[ {
  "lower80" : [ 0.6414524692520523, 0.6310027287500249, 0.6229788194502033, 0.6162098305036225, 0.6102422881085776, 0.6048436667711347, 0.5998758631263202 ],
  "lower95" : [ 0.6281052189200053, 0.612123719944535, 0.5998522096396154, 0.5894999343947172, 0.5803733658781132, 0.5721168870347814, 0.564519286994423 ],
  "mean" : [ 0.6666660253129496, 0.6666660253129496, 0.6666660253129496, 0.6666660253129496, 0.6666660253129496, 0.6666660253129496, 0.6666660253129496 ],
  "upper80" : [ 0.6918795813738469, 0.7023293218758743, 0.7103532311756959, 0.7171222201222767, 0.7230897625173216, 0.7284883838547646, 0.733456187499579 ],
  "upper95" : [ 0.705226831705894, 0.7212083306813643, 0.7334798409862838, 0.7438321162311821, 0.752958684747786, 0.7612151635911178, 0.7688127636314762 ],
  "id" : "blocking",
  "error" : ""
} ]