siemens.analytics.anomalydetection
Module siemens.analytics.anomalydetection
API
ballerinax/siemens.analytics.anomalydetection Ballerina library
Overview
This is a generated connector from Siemens Analytics Anomaly Detection API v3.4.0 OpenAPI Specification.
The anomaly detection service aims to automatically detect unexpected behaviour of processes and assets using time series data and provides API to train model and use it for anomaly detection. In the Interactive mode Analytic Model Management service is used as model storage. Model expiration date is set to 14 days.
Prerequisites
Before using this connector in your Ballerina application, complete the following:
- Create a Siemens MindSphere account.
- Obtain tokens by following this guide. For accessing this service you need to have the respective roles listed in Analytics roles and scopes
Clients
siemens.analytics.anomalydetection: Client
This is a generated connector from Siemens Analytics Anomaly Detection API OpenAPI Specification. The Anomaly Detection Service aims to automatically detect unexpected behaviour of processes and assets using time series data and provides API to train model and use it for anomaly detection. In the Interactive mode Analytic Model Management service is used as model storage. Model expiration date is set to 14 days.
Constructor
Gets invoked to initialize the connector
.
The connector initialization requires setting the API credentials.
Create a Siemens MindSphere account and obtain tokens by following this guide. For accessing this service you need to have the respective roles listed in Analytics roles and scopes
init (ConnectionConfig config, string serviceUrl)
- config ConnectionConfig - The configurations to be used when initializing the
connector
- serviceUrl string - URL of the target service
detectAnomaliesbatchreasoning
function detectAnomaliesbatchreasoning(SubmitReasoningRequest payload) returns ReasoningJobInfo|error
Anomaly Detection batch reasoning
Parameters
- payload SubmitReasoningRequest - Request data to launch reasoning job.
Return Type
- ReasoningJobInfo|error - Accepted
getJobStatus
function getJobStatus(string id) returns ReasoningJobInfo|error
Get job status.
Parameters
- id string - ID of the job to get status for.
Return Type
- ReasoningJobInfo|error - OK
canceljob
Cancel job.
Parameters
- id string - ID of the job to get status for.
detectAnomalyBatchModelTraining
function detectAnomalyBatchModelTraining(SubmitTrainingRequest payload) returns TrainingJobInfo|error
Anomaly Detection batch model training
Parameters
- payload SubmitTrainingRequest - Request data to launch training job
Return Type
- TrainingJobInfo|error - Accepted
getJobStatusTrainModelJobs
function getJobStatusTrainModelJobs(string id) returns TrainingJobInfo|error
Get job status.
Parameters
- id string - ID of the job to get status for.
Return Type
- TrainingJobInfo|error - OK
cancelJobTrainModelJob
Cancel job.
Parameters
- id string - ID of the job to get status for.
trainModel
function trainModel(float epsilon, int minPointsPerCluster, Timeseries[] payload, string distanceMeasureAlgorithm, string name) returns Model|error
Train model
Parameters
- epsilon float - Threshold for the distance to check if point belongs to cluster.
- minPointsPerCluster int - Minimum cluster size. Positive. Minimum is 2.
- payload Timeseries[] - An array containing the time series items. Data to train a model. Data must contain 10 variables at max. Each timeseries item must have equal number of variables.
- distanceMeasureAlgorithm string (default "EUCLIDEAN") - Name of the distance measure algorithm.
- name string (default "model") - Human-friendly name of the model. If a name is provided, it must not be an empty string. Maximum length is 255 characters. Only ASCII characters are allowed. Example 'Test Model
detectAnomalies
function detectAnomalies(string modelID, Timeseries[] payload) returns Anomaly[]|error
Anomaly detection
Parameters
- modelID string - ID of the model to use.
- payload Timeseries[] - An array containing the time series items. Data to performs detection on. Data must contain 10 variables at max. Each timeseries item must have equal number of variables. Variables must be the same as the ones used to train the model (the same number of variables and the same names).
trainModelDirectIntegration
function trainModelDirectIntegration(float epsilon, int minPointsPerCluster, string assetId, string aspectName, string 'from, string to, string distanceMeasureAlgorithm, string name) returns Model|error
Train model in direct integration with IoT time series
Parameters
- epsilon float - Threshold for the distance to check if point belongs to cluster.
- minPointsPerCluster int - Minimum cluster size. Positive. Minimum is 2.
- assetId string - unique identifier of the asset (entity)
- aspectName string - Name of the aspect (property set).
- 'from string - Beginning of the time range to be retrieved (exclusive).
- to string - End of the time range to be retrieved (exclusive).
- distanceMeasureAlgorithm string (default "EUCLIDEAN") - Name of the distance measure algorithm.
- name string (default "model") - Human-friendly name of the model. If a name is provided, it must not be an empty string. Maximum length is 255 characters. Only ASCII characters are allowed. Example 'Test Model
detectAnomaliesDirectIntegration
function detectAnomaliesDirectIntegration(string modelID, string assetId, string aspectName, string 'from, string to) returns Anomaly[]|error
Anomaly detection in direct integration with IoT time series
Parameters
- modelID string - ID of the model to use.
- assetId string - unique identifier of the asset (entity)
- aspectName string - Name of the aspect (property set).
- 'from string - Beginning of the time range to be retrieved (exclusive).
- to string - End of the time range to be retrieved (exclusive).
getModel
Get model
Parameters
- id string - ID of the model to get. Model ID corresponds ID from Analytic Model Management service.
deleteModel
Delete model
Parameters
- id string - ID of the model to delete. Model ID corresponds ID from Analytic Model Management service.
Records
siemens.analytics.anomalydetection: Anomaly
Fields
- anomalyExtent decimal? - Extent of anomaly at this point
- _time string? - time
siemens.analytics.anomalydetection: ClientHttp1Settings
Provides settings related to HTTP/1.x protocol.
Fields
- keepAlive KeepAlive(default http:KEEPALIVE_AUTO) - Specifies whether to reuse a connection for multiple requests
- chunking Chunking(default http:CHUNKING_AUTO) - The chunking behaviour of the request
- proxy ProxyConfig? - Proxy server related options
siemens.analytics.anomalydetection: ConnectionConfig
Provides a set of configurations for controlling the behaviours when communicating with a remote HTTP endpoint.
Fields
- auth BearerTokenConfig|OAuth2RefreshTokenGrantConfig - Configurations related to client authentication
- httpVersion HttpVersion(default http:HTTP_2_0) - The HTTP version understood by the client
- http1Settings ClientHttp1Settings? - Configurations related to HTTP/1.x protocol
- http2Settings ClientHttp2Settings? - Configurations related to HTTP/2 protocol
- timeout decimal(default 60) - The maximum time to wait (in seconds) for a response before closing the connection
- forwarded string(default "disable") - The choice of setting
forwarded
/x-forwarded
header
- poolConfig PoolConfiguration? - Configurations associated with request pooling
- cache CacheConfig? - HTTP caching related configurations
- compression Compression(default http:COMPRESSION_AUTO) - Specifies the way of handling compression (
accept-encoding
) header
- circuitBreaker CircuitBreakerConfig? - Configurations associated with the behaviour of the Circuit Breaker
- retryConfig RetryConfig? - Configurations associated with retrying
- responseLimits ResponseLimitConfigs? - Configurations associated with inbound response size limits
- secureSocket ClientSecureSocket? - SSL/TLS-related options
- proxy ProxyConfig? - Proxy server related options
- validation boolean(default true) - Enables the inbound payload validation functionality which provided by the constraint package. Enabled by default
siemens.analytics.anomalydetection: Error
Fields
- logref string? -
- message string? -
siemens.analytics.anomalydetection: JobProcessingException
Fields
- logref string? -
- message string? -
siemens.analytics.anomalydetection: Model
Fields
- id string? - ID of the created Model.
- creationTimestamp string? - Timestamp model was created at.
- variables string? - Variables used to train the model (variables from input json).
- name string? - Human-friendly name of the model, not an empty string. Maximum length is 255 characters. Only ASCII characters.
siemens.analytics.anomalydetection: NotFoundException
Fields
- logref string? -
- message string? -
siemens.analytics.anomalydetection: OAuth2RefreshTokenGrantConfig
OAuth2 Refresh Token Grant Configs
Fields
- Fields Included from *OAuth2RefreshTokenGrantConfig
- refreshUrl string(default "https://oauth.simple.api/token") - Refresh URL
siemens.analytics.anomalydetection: ProxyConfig
Proxy server configurations to be used with the HTTP client endpoint.
Fields
- host string(default "") - Host name of the proxy server
- port int(default 0) - Proxy server port
- userName string(default "") - Proxy server username
- password string(default "") - Proxy server password
siemens.analytics.anomalydetection: ReasoningJobInfo
Fields
- id string? - unique identifier of the job
- status string? - job status
- timestamp string? - job creation time
- parameters ReasoningjobinfoParameters? -
siemens.analytics.anomalydetection: ReasoningjobinfoParameters
Fields
- asset string? - Name of the entity in IoT Timeseries service to read data for.
- aspect string? - Name of the property set in IoT Timeseries service to read data for.
- variables string? - List of variables to take from property set in IoT Timeseries service. Only those variables which are both in this list and in the propertySet will be taken.
- 'from string? - Beginning of the time range to read (exclusive) from IoT Timeseries service. Date must follow the specified format 'YYYY-MM-DDThh:mm:ss'.
- to string? - End of the time range to read (inclusive) from IoT Timeseries service. Date must follow the specified format 'YYYY-MM-DDThh:mm:ss'.
- modelFolderId string? - ID of the folder in Data Exchange Service to get model from. Must not be empty.
- resultFolderId string? - ID of the folder in Data Exchange Service to save results to. Must not be empty.
siemens.analytics.anomalydetection: SubmitReasoningRequest
Fields
- asset string? - Name of the entity in IoT Timeseries service to read data for.
- aspect string? - Name of the property set in IoT Timeseries service to read data for.
- variables string? - List of variables to take from property set in IoT Timeseries service. Only those variables which are both in this list and in the propertySet will be taken. Also this list must be the same as the one used to train the model, in other words training and reasoning must be performed over the same variables.
- 'from string? - Beginning of the time range to read (exclusive) from IoT Timeseries service. Date must follow the specified format 'YYYY-MM-DDThh:mm:ss'.
- to string? - End of the time range to read (inclusive) from IoT Timeseries service. Date must follow the specified format 'YYYY-MM-DDThh:mm:ss'.
- modelFolderId string? - ID of the folder in Data Exchange Service to get model from. Must not be empty.
- resultFolderId string? - ID of the folder in Data Exchange Service to save results to. Must not be empty.
siemens.analytics.anomalydetection: SubmitTrainingRequest
Fields
- asset string? - Name of the entity in IoT Timeseries service to read data for.
- aspect string? - Name of the property set in IoT Timeseries service to read data for.
- variables string? - List of variables to take from property set in IoT Timeseries service. Only those variables which are both in this list and in the propertySet will be taken. List must contain up to 10 variables.
- 'from string? - Beginning of the time range to read (exclusive) from IoT Timeseries service. Date must follow the specified format 'YYYY-MM-DDThh:mm:ss'.
- to string? - End of the time range to read (inclusive) from IoT Timeseries service. Date must follow the specified format 'YYYY-MM-DDThh:mm:ss'.
- epsilon decimal? - Anomaly Detection threshold for the distance to check if point belongs to cluster.
- minPointsPerCluster decimal? - Anomaly detection minimum cluster size. Positive. Minimum is 2.
- distanceMeasureAlgorithm string? - Name of the Anomaly Detection distance measure algorithm.
- resultFolderId string? - ID of the folder in Data Exchange Service to save results to. Must not be empty.
siemens.analytics.anomalydetection: Timeseries
Fields
- _time string - time
siemens.analytics.anomalydetection: TrainingJobInfo
Fields
- id string? - unique identifier of the job
- status string? - job status
- timestamp string? - job creation time
- parameters TrainingjobinfoParameters? -
siemens.analytics.anomalydetection: TrainingjobinfoParameters
Fields
- asset string? - Name of the entity in IoT Timeseries service to read data for.
- aspect string? - Name of the property set in IoT Timeseries service to read data for.
- variables string? - List of variables to take from property set in IoT Timeseries service. Only those variables which are both in this list and in the propertySet will be taken.
- 'from string? - Beginning of the time range to read (exclusive) from IoT Timeseries service. Date must follow the specified format 'YYYY-MM-DDThh:mm:ss'.
- to string? - End of the time range to read (inclusive) from IoT Timeseries service. Date must follow the specified format 'YYYY-MM-DDThh:mm:ss'.
- epsilon decimal? - Anomaly Detection threshold for the distance to check if point belongs to cluster.
- minPointsPerCluster decimal? - Anomaly detection minimum cluster size. Positive. Minimum is 2.
- distanceMeasureAlgorithm string? - Name of the Anomaly Detection distance measure algorithm.
- resultFolderId string? - ID of the folder in Data Exchange Service to save results to. Must not be empty.
siemens.analytics.anomalydetection: WrongArgumentException
Fields
- logref string? -
- message string? -
Import
import ballerinax/siemens.analytics.anomalydetection;
Metadata
Released date: over 1 year ago
Version: 1.5.1
License: Apache-2.0
Compatibility
Platform: any
Ballerina version: 2201.4.1
GraalVM compatible: Yes
Pull count
Total: 2
Current verison: 2
Weekly downloads
Keywords
Business Intelligence/Analytics
Cost/Paid
Contributors
Dependencies