HTTP protocol endpoint
The HTTP protocol endpoint is a device facing service offering connectivity using different HTTP based APIs.
The base address of the HTTP protocol endpoints depends on your installation. For a local, test installation, this
is mostly based on the IP address and uses nip.io
to resolve this as a DNS name. Assuming your IP address is 1.2.3.4
the hostname would be http-endpoint.1.2.3.4.nip.io
.
Default HTTP API
Drogue Cloud offers a default HTTP API for connecting devices to the cloud. In addition to that, other HTTP APIs may exist, implementing other IoT like APIs, see the following sections for more information.
Publish telemetry
POST /v1/{channel}
Authentication
You need to use one of the following authentication mechanisms:
Information | Details |
---|---|
X.509 Client certificate |
Provide an X.509 client certificate during the TLS handshake. The certificate must be signed with a trust anchor stored in the device registry on the application level. |
TLS-PSK |
Provide a pre-shared key during the TLS handshake. See Setting TLS-PSK credentials for how to configure the device. |
|
Standard username/password authentication using |
|
Use a standard username and provide the application as part of the HTTP query. The |
|
Use a non-unique username, provide application and device using query parameters. |
Parameters
Name | Type | Location | Required | Description |
---|---|---|---|---|
|
string |
path |
X |
The name of the channel to send to |
|
string |
query |
Override the application for authentication. See above. |
|
|
string |
query |
Override the device for authentication. See above. |
|
|
string |
query |
Allows to specify an alternate device name that this device may act on behalf of. The "as" device must be configured to
allow the authenticated device (from the credentials or |
|
|
integer |
query |
Code samples
Shell
http \
--auth device1@example-app:foobar \
--verify build/certs/endpoints/root-cert.pem \
POST \
https://http-endpoint.1.2.3.4.nip.io:30443/v1/telemetry \
temp:=42
http \
--auth device1:foobar \
--verify build/certs/endpoints/root-cert.pem \
POST \
https://http-endpoint.192.168.39.35.nip.io:30443/v1/foo \
application==example-app \
temp:=42