Getting Started
Tip
Best Meter Reading results can be accomblished if the numbers are around 28px big
Cloud API Quick Start Guide
In this guide, we will show you how to use the Anyline Cloud API.
Generate an Anyline License
In order to use the Anyline Cloud API, you require a License Key. The Guide on How To Generate a License can be found at Anyline License Key Generation This trial license is valid for 100 Scans in the span of 30 days.
Input Image Requirements:
- Please make sure that the image in not blurry and in good quality.
- The scannable item should be centered in the image and not rotated more than 10 degrees.
Request properties
Your POST request should contain three things to be valid: “license”, “blob” and “config”
Here you put in your Anyline Cloud API License.
{
"license" : "MyAnylineLicense"
}
The blob proerty is for your image in the base64 format.
{
"blob": "Base64EcnryptedString"
}
The “config” parameter will define which product you are using and also in the future configurate your request. The Cloud API configuration is exactly structured as the configuration from the Anyline technologies. See in the different modes, what the config should include.
Modes
Energy:
{
"config": {
"viewPlugin": {
"plugin": {
"meterPlugin": {
"scanMode": "MyEnergyScanMode"
}
}
}
}
}
The Energy scanMode property can be one of the following:
Mode | Product Description |
---|---|
AUTO_ANALOG_DIGITAL_METER |
Auto Analog/Digital Meter Description |
AUTO_ANALOG_DIGITAL_DIAL_METER |
Auto Analog/Digital/Dial Meter Description |
ANALOG_METER |
Analog Meter Description |
DIGITAL_METER |
Digital Meter Description |
DIAL_METER |
Dial Meter Description |
DOT_MATRIX_METER |
Dot Matrix Meter Description |
ANALOG_DIGITAL_SNR_BAR |
Meter Description || Meter Serial Number Description || Barcode Description |
Tip
The AUTO_ANALOG_DIGITAL_METER
Mode will automatically detect if it’s an analog or a digital meter.
The AUTO_ANALOG_DIGITAL_DIAL_METER
Mode will automatically detect if it’s an analog, digital or dial meter.
Tip
Using the ANALOG_DIGITAL_SNR_BAR
Mode, the meter is identified by its barcode or serial number.
{
"config": {
"viewPlugin": {
"plugin": {
"meterPlugin": {
"scanMode": "MyEnergyScanMode"
}
}
}
}
}
Request Example
-
POST
https://api.anyline.com/v1/scan
This is an example request for the Energy Mode:
Example Energy request:
POST /v1/scan Host: api.anyline.com Accept: application/json { "config": { "viewPlugin": { "plugin": { "meterPlugin": { "scanMode": "AUTO_ANALOG_DIGITAL_METER" } } } }, "license": "MyAnylineAPILicense", "blob": "Base64EcnryptedString" }Example Energy response:
200 OK Content-Type: application/json { "sdkVersion": "43.0", "result": { "reading":"115414.0", "outline":"No Outline", "confidence":99 } }