We’re constantly improving Tools.Valarm.net and adding new features based on input from our customers.

We’ve received multiple requests for a way to make API outputs, like JSON and CSV, even nicer and cleaner.

You’ll learn in this blog post how your organization can make API calls that return a response with your custom columns and sensor values.

To get started, take a look at this blog post on configuring custom column names / aliases if you haven’t already made your own lists of custom sensor field names.

You’ll find the new Column Layout ID in the Column Layout Edit dialog box in your Device Manager on Valarm Tools Cloud.

Take note of, e.g., copy to your clipboard, your Column Layout ID. Then you’ll add “columnLayout=[the ID]” to any API call, which means that custom column layout will be used to build your JSON or CSV API outputs.

Note also in the above API call the new “columnLayout=xxxxx” parameter.

The argument passed to this parameter is the ID of a Custom Column Layout from the Device Manager. You’ll see this is highlighted in the Tools.Valarm.net screenshot.

Here’s a sample API Call for Latest Events on a Customer Account:

https://tools.valarm.net/api/v1/account/latestEvents.json?apiId=yourApiId&apiKey=yourApiKey&columnLayout=yourColumnLayoutId

Note that this is a Customer Account-Level API call – not a single Device, nor a Device Group.

This means you’ll receive the latest IoT sensor upload events from any of your devices associated with your Tools.Valarm.net account.

You’ll see this API call returns results from whichever of your remote monitoring systems uploaded data most recently.

Let’s break down a few of the parameters in this API call for retrieving your latest Industrial IoT sensor upload events.

Your custom column layout ID is used in the columnLayout parameter.

By adding the Customer Account parameters, apiId and apiKey, you can make this call from outside Valarm Tools Cloud, without being logged in.

The apiId and apiKey are controlled in the Account config screen on Valarm Tools Cloud. You can see these in the screenshot of the Customer Account Edit mode, which shows your Account-level API ID and API Key. After you’ve generated these API parameters then they’ll be shown in View mode.

To see step-by-step how to access this screen on your Tools.Valarm.net account, take a gander at our write-ups on retrieving a list of your defined IoT device groups and retrieving Industrial IoT metadata details for a device group.

Similarly, a Device apiKey can be added to Device-level API calls, in order to query the API without setting the device to Public or being actually logged in to Tools. We’ll cover that in a separate blog post and link to it from our general APIs docs page.

You can also add additional parameters to your API calls like:

fromDate – returns sensor data for this device since the date you specify. Example for your Industrial IoT sensor measurements since August 11, 2017, add: &fromDate=2017-08-11%2000%3A00

pretty – if set to true this will format your result so that it is more humanly readable with newlines and tabs, e.g., add &pretty=true to your API calls and you’ll see a prettier format like in the screenshot of the JSON API here.

 


 

That’s your overview of using your Tools.Valarm.net APIs for retrieving Industrial IoT sensor measurements at the account level, with custom column layout names / aliases.

Please don’t hesitate to get in touch if you’ve got any questions about Tools.Valarm.net, APIs, or anything else related to monitoring Industrial IoT sensors.

Tools.Valarm.net is an open Industrial IoT software platform, which means you can integrate sensors made by any hardware manufacturer, whether you need to manage and monitor water well levels / usage, flood warning systems, piezometers, or anything else.

For example, a few of our customer favorites are sensors made by hardware companies like Flowline, Geokon, ClairAir, and Senix.

Take a gander at our Customer Stories page to learn more about who is using Tools.Valarm.net and how remote monitoring saves your time and your money.

And have a look at our Web Dashboards, which integrate our JSON APIs like you learned about here, to engineer custom dashboards, maps, and alerts based on each customer and industry need.

Send us a message at Info@Valarm.net and we’ll help you, your teams, and your organization deploy your most effective remote monitoring solutions.