/
Network

Network

Basic Networking

URL

http://<<ip address>>/rest/network/ipaddress

Method

GET

Description

Gets a list of currently defined IP addresses

Response

{ "ipaddress": [«list of ip addresses»] }

URL

http://<<ip address>>/rest/network

Method

GET

Description

Receives information on the current network setup.

Response

{ "type": "wifi|ethernet", "connection": "static|dhcp", "static": { "ipaddress": «ipaddress», "netmask": «netmask», "gateway": «gateway» }, "wifi": { "ssid": «ssid», "key": «pre shared key» } }

URL

http://<<ip address>>/rest/network

Method

PUT

Description

Sets network settings, will reboot afterwards.

Request

{ "type": "wifi|ethernet", "connection": "static|dhcp", "static": { "ipaddress": «ipaddress», "netmask": «netmask», "gateway": «gateway» }, "wifi": { "ssid": «ssid», "key": «pre shared key» } }

Response

HTTP204 when successful, followed by a reboot

Possible Errors

HTTP400 when request was invalid

HTTPS Support

HTTPS support is available with user-supplied PFX certificates, encrypted with a password. During startup, the PTLControl will decide if it will use HTTPS or not. When any error occurs, it falls back to HTTP. It is up to the client to connect using HTTP or HTTPS. It will also be available on port 5000.

To upload the PFX file and password, the API provides a httpscall. Uploading a new certificate will overwrite an existing one. The PTL Control needs to be restarted for changes to take effect.

URL

http://<<ip address>>/rest/network/https/

Method

POST

Description

Upload a new HTTPS certificate (in .pfx format) and password.

Request

Response

HTTP204

Possible Error

When an invalid certificate is uploaded, the system falls back to HTTP.

URL

http://<<ip address>>/rest/network/https/

Method

DELETE

Description

Remove certificate and password

Request

Empty

Response

HTTP204

Related content