Sign in Back to the site
IT-NetCOM · API

IT-NetCOM API

With an API key your systems (business software, spreadsheet, program) read the data of your devices, download their history and, if you wish, send commands. This page tells you everything you need to get started.

Getting started

  1. Sign in to IT-NetCOM as administrator and open “API keys”.
  2. Create a key: choose a name, what it can do and, if you wish, an expiry. Copy it at once: it is shown only once.
  3. Call the API at this address, with the key in the header of every request:
https://api.netcom.italyadsl.net/api/v1

Authentication

Every request carries the key in the Authorization header. Without a key, or with a revoked or expired one, the answer is 401. A key sees only the devices of your account.

Authorization: Bearer itn_…

Formats

Limits

Errors

CodeWhat it means
401Key missing, unknown, revoked or expired.
403The key cannot do this: it is read only, or the relay is not allowed for it.
404Path not available with a key, or a device, alarm or command that does not exist or is not yours.
409The command has already left and cannot be cancelled, the alarm is not waiting for acknowledgement, or the command asks for a second confirmation.
413Request body over 1 MB.
422Missing or invalid parameters: the answer says which.
429Too many requests a minute, or daily command quota used up. Retry-After says when to try again.

Paths

Every path starts from https://api.netcom.italyadsl.net/api/v1. Any other path answers 404, whatever the key.

Devices

GET/devices

Your devices, with state, last contact, battery, open alarms and position.

  • site_id — only the devices of one site
  • limit — how many items per page (default: 50)
  • offset — which item to start from (default: 0)
GET/devices/{id}

One device: the quantities it measures, the latest values (with the name of each quantity to use for the history), radio data.

GET/sites

The sites the devices are grouped in.

GET/customers

Your account, with its identifier.

GET/device-types

The device types of the catalogue, with the quantities they declare.

Measurements and history

GET/devices/{id}/measurements

The history of a quantity between two instants, in pages: for each measurement time, value, quality and, for counters, increment and reset.

  • quantity required — name of the quantity, as in last_values of /devices/{id}
  • start required — start of the interval, ISO 8601 with time zone
  • end required — end of the interval, ISO 8601 with time zone
  • limit — how many items per page (default: 1000)
  • offset — which item to start from (default: 0)
GET/devices/{id}/measurements.csv

The same history as a CSV file, all at once.

  • quantity required — name of the quantity, as in last_values of /devices/{id}
  • start required — start of the interval, ISO 8601 with time zone
  • end required — end of the interval, ISO 8601 with time zone
GET/devices/{id}/aggregates

Average, minimum, maximum, sum and count of measurements per hour or per day.

  • quantity required — name of the quantity, as in last_values of /devices/{id}
  • start required — start of the interval, ISO 8601 with time zone
  • end required — end of the interval, ISO 8601 with time zone
  • period — hour or day (default: hour)
  • tz — time zone in which to count the days, for instance Europe/Rome
GET/devices/{id}/radio

Signal, signal-to-noise ratio and gateway of every message received.

  • start required — start of the interval, ISO 8601 with time zone
  • end required — end of the interval, ISO 8601 with time zone
  • limit — how many items per page (default: 1000)
GET/devices/{id}/thresholds

The alarm thresholds that concern the device.

Alarms

GET/alarms

The alarms, open or all, in pages.

  • state — open (only open ones) or all (default: open)
  • device_id — only the alarms of one device
  • limit — how many items per page (default: 50)
  • offset — which item to start from (default: 0)
GET/alarms/summary

How many alarms are open, by severity, and how many are waiting to be acknowledged.

POST/alarms/{id}/acknowledgeneeds “Read and commands”

Acknowledges an open alarm.

Commands

GET/devices/{id}/command-types

The commands the device accepts, with their parameters.

POST/devices/{id}/commandsneeds “Read and commands”

Sends a command. Body: {"kind": "<command>", "params": {…}}. Answer 201 with the command and its state.

GET/devices/{id}/commands

The commands sent to the device, the latest first.

  • limit — how many items per page (default: 50)
  • offset — which item to start from (default: 0)
GET/commands

All the commands sent to your devices.

  • limit — how many items per page (default: 50)
  • offset — which item to start from (default: 0)
GET/commands/{id}

One command with all its state changes.

POST/commands/{id}/cancelneeds “Read and commands”

Cancels a command that has not left yet.

Service

GET/health

Answers {"status": "ok"} when the service is running.

A command goes through created, queued (waiting at the gateway), transmitted, received (by the device) and verified (effect confirmed by the device); it ends in verified, failed, expired or cancelled. A device runs one command at a time.

Examples

The list of your devices:

curl -H "Authorization: Bearer itn_…" \
  https://api.netcom.italyadsl.net/api/v1/devices

One device, with the names of the quantities in last_values:

curl -H "Authorization: Bearer itn_…" \
  https://api.netcom.italyadsl.net/api/v1/devices/<id>

The November history of a quantity, as a CSV file:

curl -H "Authorization: Bearer itn_…" -o storico.csv \
  "https://api.netcom.italyadsl.net/api/v1/devices/<id>/measurements.csv?quantity=<quantity>&start=2026-11-01T00:00:00Z&end=2026-12-01T00:00:00Z"

The same history in Python, in pages of 10,000 measurements:

import requests

API = "https://api.netcom.italyadsl.net/api/v1"
HEADERS = {"Authorization": "Bearer itn_…"}

device = requests.get(f"{API}/devices", headers=HEADERS).json()["items"][0]
detail = requests.get(f"{API}/devices/{device['id']}", headers=HEADERS).json()
quantity = detail["last_values"][0]["quantity"]

items, offset = [], 0
while True:
    page = requests.get(f"{API}/devices/{device['id']}/measurements", headers=HEADERS, params={
        "quantity": quantity, "start": "2026-11-01T00:00:00Z", "end": "2026-12-01T00:00:00Z",
        "limit": 10000, "offset": offset}).json()
    items += page["items"]
    offset += len(page["items"])
    if not page["items"] or offset >= page["total"]:
        break
print(device["name"], quantity, len(items))

Switching relay 1 on (a “Read and commands” key allowed on the device):

curl -X POST -H "Authorization: Bearer itn_…" -H "Content-Type: application/json" \
  -d '{"kind": "relay_set", "params": {"relay": 1, "state": 1}}' \
  https://api.netcom.italyadsl.net/api/v1/devices/<id>/commands

Updated on 18 November 2026