Search
  • Elipsa

How To: Create Your Own Template

Updated: Feb 14


Below is a set of instructions to get started with Rapid Deployment Templates by creating your own private template. To get started, get your free API Access Key.




Create Private Template with APIs


The Elipsa API library exposes a series of APIs for building and deploying AI models. One such endpoint is used to create your own private deployment template.


Rapid Deployment Templates enable users to automate the end-to-end process of building historical datasets, training outlier detections models, and deploying models for future predictions. A key benefit to the templates is that like machines utilize a single API endpoint while still building multiple individual models to most effectively monitor a machine.


Template Parameters


To build a template, you simply need the following information pertaining to your use case:

  • Name: The name you give to the template

  • Description: A description of the template

  • Features: A comma-separated list of features. These features will be the names of the data points that you will monitor for anomalies.

  • Owner: You user's access key found on the profile page when logged into the platform

  • Initial_train_amt: The amount of data that the template needs to collect before building an initial model. By default, each template can receive data once per minute so this can be viewed as the number of minutes worth of data to collect before building an initial model

  • Retrain_amt: The amount of data the template needs to collect before retraining the model. While the initial model is making predictions, the template will continue to aggregate streaming data until it reaches the Final_train_amt at which point it will retrain the model using all data received

  • Model_prefix: The template creates a unique model for each unique machine/device that sends data to the template. The Model_prefix will set a common prefix for each model built and associated with this template


Copy from the Public Template Library


In addition to being able to configure a custom template to match your use case, we have a library of common IoT use cases for you to choose from. This enables you to leverage an existing use case template by copying it to your account.


To get started, visit the Template Library.


In the form at the top, enter the email address and API access key associated with your Elipsa account:



The bottom section consists of a series of Rapid Deployment Templates. Each template provides details as to the use case, the names of the data points or features that you must send to the template, as well as how much data will need to be streamed before building an initial model and before the model is retrained.


If the template matches your use case and data points that you are collecting, simply click on the template. If not, you can create your own custom template as detailed above.


When you click a template, the top form will be populated with the key of the template to copy:



Clicking on Copy Template will copy the details of the template and create a new private template under your Elipsa user. When the process is complete, it will return the unique API key for your new template to use when streaming new machine data to the template.



Create Custom Template with User Interface

Often times use cases are specific to your machine. In the event that we do not have a pre-configured template in our library, you can easily create your own.


Custom templates provide the necessary flexibility to monitor any type of machine. Simply provide the required information pertaining to your user and asset into the Elipsa web form and click 'Create Template'.


When the process is complete, it will return the unique API key for your new template to use when streaming new machine data to the template.



Create Custom Template with Code

The Deployment Templates can be invoked by any programing language, platform, or partner system capable of making a REST API call. Below is a sampling of example implementations, you can find more in the API documentation.


Node.js - Axios


var axios = require('axios');
var data = JSON.stringify({
    "Name": "Test Template",
    "Description": "Template to test predictive maintenance",
    "Features": "temp,rh,co2",
    "Owner": "XYZ-123-ABC",
    "Template_type": "Outlier",
    "Initial_train_amt": "2000",
    "Retrain_amt": "40000",
    "Model_prefix": "Test-Pred-Maint"
});

var config = {
  method: 'post',
  url: 'https://api.elipsa.ai:9090/api/v1.0/deployments/template/private/create',
  headers: { 
    'Content-Type': 'application/json'
  },
  data : data
};

axios(config)
.then(function (response) {
  console.log(JSON.stringify(response.data));
})
.catch(function (error) {
  console.log(error);
});


JavaScript - jQuery


var settings = {
  "url": "https://api.elipsa.ai:9090/api/v1.0/deployments/template/private/create",
  "method": "POST",
  "timeout": 0,
  "headers": {
    "Content-Type": "application/json"
  },
  "data": JSON.stringify({
    "Name": "Test Template",
    "Description": "Template to test predictive maintenance",
    "Features": "temp,rh,co2",
    "Owner": "XYZ-123-ABC",
    "Template_type": "Outlier",
    "Initial_train_amt": "2000",
    "Retrain_amt": "40000",
    "Model_prefix": "Test-Pred-Maint"
  }),
};
$.ajax(settings).done(function (response) {
  console.log(response);
});

Python - Requests


import requests
import json

url = "https://api.elipsa.ai:9090/api/v1.0/deployments/template/private/create"

payload = json.dumps({
  "Name": "Test Template",
  "Description": "Template to test predictive maintenance",
  "Features": "temp,rh,co2",
  "Owner": "XYZ-123-ABC",
  "Template_type": "Outlier",
  "Initial_train_amt": "2000",
  "Retrain_amt": "40000",
  "Model_prefix": "Test-Pred-Maint"
})
headers = {
  'Content-Type': 'application/json'
}

response = requests.request("POST", url, headers=headers, data=payload)

print(response.text)

When the process is complete, it will return the unique API key for your new template to use when streaming new machine data to the template.



 

Simple, Fast, and Flexible AI for IoT. Get started today for free!