API overview and usage

The Virtual Sensor API is a software sensor used to serve in place of a physical sensor for variables (called targets) that are too costly or impractical to measure.

It leverages supervised machine learning techniques to learn the relationship between the target variable and a set of heterogeneous available variables.

This API should be used when the target variable is supposed to have an underlying pattern and when historical measurements are available. These measurements could be data collected manually or data collected by a temporary sensor.

This document provides a general tutorial for users who want to consume the Virtual Sensor API.


The Virtual Sensor API includes 4 features:

  • Creates a virtual sensor model based on historical data (createModel endpoint).

  • Applies a created model to a test data set (applyModel endpoint).

  • Updates an existing model that was built with the createModel endpoint (updateModel endpoint).

  • Get information about an existing model (getModelInformation endpoint).

How it works

Hands-on application

Take the tour and experiment on your own data prior to any development through our hands-on application !



createModel endpoint

The createModel endpoint creates a virtual sensor model. The created model uses information available from driver measurements and process parameters to model the relationship between the drivers and the target.
The principle of this service is the following:

  • Historical training data depicting how a system works is available.
  • A target variable, i.e., data of special importance for which we want to build a virtual sensor model, is known.
  • Some pattern in the data is suspected, i.e. some relationship between some of the available data and the target can be observed.
  • This pattern can be used to create a virtual sensor model to generate predictions.

applyModel endpoint

The applyModel web service applies the created model on a input test set in order to predict the value of the target during this period.

updateModel endpoint

The updateModel endpoint updates the model created with the createModel service. The input data should be the same variables as the ones used to create the initial model.

getModelInformation endpoint

This service returns information on an existing prediction model that is securely stored on the Schneider-Electric platform.


Amount of calls to the API in the SANDBOX are limited.

To get a full experience and extend the thresholds, please subscribe to the API and use the production environment.

Getting Started

Step 1: Setup environment

Step 2: Prepare Data

Step 3: Create a new energy model

Step 4: Train model

Step 5: Apply an existing forecasting model to new data

Step 6: Get model information on an existing prediction model

Authentication guide

This API uses API keys to authenticate and allow access to the API.

Your API keys carry many privileges, so be sure to keep them secure!

The API key should be included in all API requests in the Authorization header that looks like the following: Authorization: your_subscription_key

For steps on how to generate your_subscription_key please refer to the Features tab.

Response Codes

We follow the error response format proposed in RFC 7807 also known as Problem Details for HTTP APIs. As with our normal API responses, your client must be prepared to gracefully handle additional members of the response.

HTTP Status Code Error Reason
Bad Request
This is the generic error type for not being able to process the request, and will generally contain an explanation in the message.
Other reasons could be:
Invalid Resource: The submitted POST body failed our input validation. This error may include an additional “errors” property, with a list of the validation issues.
Invalid Action: Returned when you try to access an action on a resource that doesn’t support that action.
JSON Parse Exception: The JSON sent in the request body is not valid JSON.
Your request did not include an API key.This error suggests that your API key was missing from your request, or that something was formatted or named improperly in your header.
Other reason could be:
APIKeyInvalid: Your API key may be invalid, or you've attempted to access the wrong data center. Check that your API key was input correctly, and verify which data center to access.
You are not permitted to access this resource. This is a generic error.
Other reasons could be:
UserDisabled: This account has been disabled.
WrongDatacenter: The API key provided is linked to a different data center. This error suggests that you tried to contact the wrong data center. It's often associated with misconfigured libraries.
The requested resource could not be found. This error tells you a specific resource doesn't exist. It's possible that the resource has been moved or deleted, or that there's a typo in your request.
The requested method and resource are not compatible. See the Allow header for this resource's available methods. This error means that the requested resource does not support the HTTP method you used. Find out which methods are allowed for each resource in the API Reference.
The sub-resource requested is nested too deeply. This uncommon error appears if you've tried to generate a URL with too many resources.
This error lets you know you've tried to override an incompatible method. You can only use the X-HTTP-Method-Override header with the POST method.
Other reasons could be:
RequestedFieldsInvalid: The fields requested from this resource are invalid.This error suggests there is a typo in your field request or some other type of syntax error or problem that invalidates your request.
You have exceeded the limit of 10 simultaneous connections. When you reach the connection limit, we'll throttle the server response. If any of your requests time out after you've reached the limit, those requests could still be considered open and continue to slow your connection.
An unexpected internal error has occurred. This error lets you know RP-C has experienced a problem.
This method has been disabled.


Contact the SE Exchange support team at exchange.support@se.com and include:

  • Endpoint URL
  • Request/Response
  • Any additional information like Screenshots , Postman collections.