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).
Take the tour and experiment on your own data prior to any development through our hands-on application !
https://try-analytics-se.azurewebsites.net/virtualsensor

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.
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.
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.
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.
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
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.
We follow the error response format proposed in RFC 7807also 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 |
---|---|
400Bad request |
Your request could not be processed. This is a generic error. InvalidAction The action requested was not valid for this resource. This error is returned when you try to access an action that doesn't exist. For example, /campaigns/{id}/actions/send. InvalidResource The resource submitted could not be validated. For field-specific details, see field_warnings or field_errors objects. This error means that the object submitted to a POST or PATCH request failed to validate against JSON schema, and could relate to campaign, interest group, merge field, or any other available object. JSONParseError We encountered an unspecified JSON parsing error. This error means that your JSON was formatted incorrectly or was considered invalid or incomplete. |
401APIKeyMissing |
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. To learn more, check out Get Started with the Mailchimp API. 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. To learn more, check out Get Started with the Mailchimp API. |
403Forbidden |
You are not permitted to access this resource. This is a generic error. UserDisabled - This account has been disabled. The Mailchimp account is deactivated. Contact our support team if you need more help. 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. |
404ResourceNotFound |
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. |
405MethodNotAllowed |
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. |
414ResourceNestingTooDeep |
The sub-resource requested is nested too deeply. This uncommon error appears if you've tried to generate a URL with too many resources. |
422InvalidMethodOverride |
You can only use the X-HTTP-Method-Override header with the POST method. This error lets you know you've tried to override an incompatible method. The Mailchimp API only permits method override with POST. 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. |
429TooManyRequests |
You have exceeded the limit of 10 simultaneous connections. When you reach the connection limit, we'll throttle 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. Contact the Exchange support team at exchange.support@se.com if you think this is the case. |
500InternalServerError |
An unexpected internal error has occurred. Please contact Support for more information. This error lets you know our servers have experienced a problem. Although this is rare, please contact exchange.support@se.com to let us know that you've encountered this error. |
503ComplianceRelated |
This method has been disabled. |
400 Bad request |
---|
Your request could not be processed. This is a generic error. InvalidAction The action requested was not valid for this resource. This error is returned when you try to access an action that doesn't exist. For example, /campaigns/{id}/actions/send. InvalidResource The resource submitted could not be validated. For field-specific details, see field_warnings or field_errors objects. This error means that the object submitted to a POST or PATCH request failed to validate against JSON schema, and could relate to campaign, interest group, merge field, or any other available object. JSONParseError We encountered an unspecified JSON parsing error. This error means that your JSON was formatted incorrectly or was considered invalid or incomplete. |
401 APIKeyMissing |
---|
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. To learn more, check out Get Started with the Mailchimp API. 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. To learn more, check out Get Started with the Mailchimp API. |
403 Forbidden |
---|
You are not permitted to access this resource. This is a generic error. UserDisabled - This account has been disabled. The Mailchimp account is deactivated. Contact our support team if you need more help. 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. |
404 ResourceNotFound |
---|
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. |
405 MethodNotAllowed |
---|
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. |
414 ResourceNestingTooDeep |
---|
The sub-resource requested is nested too deeply. This uncommon error appears if you've tried to generate a URL with too many resources. |
422 InvalidMethodOverride |
---|
You can only use the X-HTTP-Method-Override header with the POST method. This error lets you know you've tried to override an incompatible method. The Mailchimp API only permits method override with POST. 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. |
429 TooManyRequests |
---|
You have exceeded the limit of 10 simultaneous connections. When you reach the connection limit, we'll throttle 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. Contact the Exchange support team at exchange.support@se.com if you think this is the case. |
500 InternalServerError |
---|
An unexpected internal error has occurred. Please contact Support for more information. This error lets you know our servers have experienced a problem. Although this is rare, please contact exchange.support@se.com to let us know that you've encountered this error. |
503 ComplianceRelated |
---|
This method has been disabled. |
Contact the Exchange support team at exchange.support@se.com.
In your request please :
- mention the involved endpoint
- give the request that generate the error
- copy past any error message you received
- add some screen shot