Datamining REST API

Auto-generated swagger documentation

Overview

Media Type

The API uses JSON to communicate with clients.

You should add the following accept header to your requests:

Accept: application/json

When you send JSON data with a POST or PUT request, you must add the following content type header:

Content-Type: application/json

Tenant Header

Hawkular Metrics is a multi-tenant time-series data store. Your requests to tenant-dependent resources must include a tenant header:

Hawkular-Tenant: my-tenant

Timestamps

The API understands all timestamps as milliseconds since January 1, 1970, 00:00:00 UTC.

Base Path

/hawkular/datamining/

REST APIs

Forecaster

Endpoint PUT /metrics/{metricId}/forecaster

Change forecaster configuration.

Path parameters

Parameter Required Description Type Format Allowable Values

metricId

Yes

-

string

-

-

Body

Required Description Data Type

Yes

-

Update

Response

Status codes

Status Code Reason Response Model

201

Success, prediction successfully enabled

-

400

Missing or invalid payload

ApiError

404

Subscription of given metric not found

ApiError

500

Server error

ApiError

Endpoint GET /metrics/{metricId}/forecaster/forecast

Predict future values of given metric.

Path parameters

Parameter Required Description Type Format Allowable Values

metricId

Yes

-

string

-

-

Query parameters

Parameter Required Description Type Format Allowable Values

ahead

No

-

integer

int32

-

Response

Status codes

Status Code Reason Response Model

200

Success, predictions returned

-

404

Subscription of given metric not found

ApiError

500

Server error

ApiError

Endpoint POST /metrics/{metricId}/forecaster/learn

Learn model based on inserted values.

Path parameters

Parameter Required Description Type Format Allowable Values

metricId

Yes

-

string

-

-

Response

Status codes

Status Code Reason Response Model

201

Success, learning successfully processed

-

400

Missing or invalid payload

ApiError

404

Subscription of given metric not found

ApiError

500

Server error

ApiError

Info

Endpoint GET /

Returns complete list of REST endpoints.

Response

Status codes

Status Code Reason Response Model

default

successful operation

-

Subscription

Endpoint GET /metrics

Get all subscriptions of tenant.

Response

Status codes

Status Code Reason Response Model

200

Success

-

404

Subscription for given metric not found

ApiError

500

Server error

ApiError

Endpoint POST /metrics

Subscribe metric for prediction.

Body

Required Description Data Type

Yes

-

RestBlueprint

Response

Status codes

Status Code Reason Response Model

201

Success, prediction successfully enabled

-

400

Missing or invalid payload

ApiError

409

Subscription for given metric already enabled

ApiError

500

Server error

ApiError

Endpoint DELETE /metrics/{id}

Deletes subscription of given metric.

Path parameters

Parameter Required Description Type Format Allowable Values

id

Yes

-

string

-

-

Response

Status codes

Status Code Reason Response Model

204

Success, Model successfully disabled

-

400

Missing or invalid payload

ApiError

404

Model for given metric not found

ApiError

500

Server error

ApiError

Endpoint PUT /metrics/{id}

Modify metric metadata.

Path parameters

Parameter Required Description Type Format Allowable Values

id

Yes

-

string

-

-

Body

Required Description Data Type

Yes

-

Update

Response

Status codes

Status Code Reason Response Model

201

Success, prediction successfully enabled

-

400

Missing or invalid payload

ApiError

409

Subscription for given metric already enabled

ApiError

500

Server error

ApiError

Endpoint GET /metrics/{metricId}

Get a concrete subscription.

Path parameters

Parameter Required Description Type Format Allowable Values

metricId

Yes

-

string

-

-

Response

Status codes

Status Code Reason Response Model

200

Success

-

404

Subscription for given metric not found

ApiError

500

Server error

ApiError

Data Types

ApiError

Name Required Description Type Format Allowable Values

errorMsg

No

-

string

-

-

ConceptDriftStrategy

Name Required Description Type Format Allowable Values

RestBlueprint

Name Required Description Type Format Allowable Values

collectionInterval

No

-

integer

int64

-

metricId

No

-

string

-

-

Update

Name Required Description Type Format Allowable Values

conceptDriftStrategy

No

-

null

-

-

ic

No

-

string

-

AIC, AICc, BIC

modelToUse

No

-

string

-

SimpleExponentialSmoothing, DoubleExponentialSmoothing, TripleExponentialSmoothing

period

No

-

integer

int32

-

windowSize

No

-

integer

int32

-

redhatlogo-white

© 2016 | Hawkular is released under Apache License v2.0