Skip to main content
Skip table of contents

HTTP connection info

Connect through the local network

To use the HTTP API, connect your computer to the uplink network of the gateway (Network interfaces & requirements) and find the gateway's IP address in the Gateway: Info page of the webapp.

The HTTP API can be reached on port 4000 of this IP address. Make sure to include the version, v1, in the URL.

For example: GET http://192.168.82.1:4000/v1/anchors

From version 2020.3 on it is also possible to reach the api via the default HTTP port, port 80. You will need to include api and the version, v1, in the URL.

For example: GET http://192.168.82.1/api/v1/anchors

Examples

Python
PY
import requests

try:
	response = requests.get('http://192.168.80.178/api/v1/alerts')
	response.raise_for_status()
	alerts = response.json().get('alerts')
	print(alerts)
except requests.exceptions.HTTPError as errh:
    print(errh)
except requests.exceptions.ConnectionError as errc:
    print(errc)
except requests.exceptions.Timeout as errt:
    print(errt)
except requests.exceptions.RequestException as err:
    print(err)

Connect through the cloud

The HTTP API is not available through the cloud.

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.