POST api/v1/thethingsnetwork/data/uplink
Upload data from The Things Network HTTP Integration
Request Information
URI Parameters
None.
Body Parameters
UplinkMessageDtoName | Description | Type | Additional information |
---|---|---|---|
app_id | string |
None. |
|
dev_id | string |
None. |
|
hardware_serial |
In case of LoRaWAN: the DevEUI |
string |
None. |
port |
LoRaWAN FPort |
integer |
None. |
counter |
LoRaWAN frame counter |
integer |
None. |
is_retry |
Is set to true if this message is a retry (you could also detect this from the counter) |
boolean |
None. |
confirmed |
Is set to true if this message was a confirmed message |
boolean |
None. |
payload_raw |
Base64 encoded payload: [0x01, 0x02, 0x03, 0x04] |
string |
None. |
payload_fields |
Object containing the results from the payload functions - left out when empty |
Dictionary of string [key] and string [value] |
None. |
metadata |
Meta data for the message. |
MetadataDto |
None. |
downlink_url |
Downlink url. |
string |
None. |
Request Formats
application/json, text/json, application/senml+json
Sample:
{ "app_id": "sample string 1", "dev_id": "sample string 2", "hardware_serial": "sample string 3", "port": 4, "counter": 1, "is_retry": true, "confirmed": true, "payload_raw": "sample string 7", "payload_fields": { "sample string 1": "sample string 2", "sample string 3": "sample string 4" }, "metadata": { "time": "2024-11-08T22:34:46.2988922+00:00", "frequency": 2.1, "modulation": "sample string 3", "data_rate": "sample string 4", "bit_rate": 5, "coding_rate": "sample string 6", "gateways": [ { "gtw_id": "sample string 1", "gtw_trusted": true, "timestamp": 3, "time": "2024-11-08T22:34:46.2988922+00:00", "channel": 5, "rssi": 6.1, "snr": 7.1, "rf_chain": 8, "latitude": 1.1, "longitude": 1.1, "altitude": 1.1, "location_source": "sample string 9" }, { "gtw_id": "sample string 1", "gtw_trusted": true, "timestamp": 3, "time": "2024-11-08T22:34:46.2988922+00:00", "channel": 5, "rssi": 6.1, "snr": 7.1, "rf_chain": 8, "latitude": 1.1, "longitude": 1.1, "altitude": 1.1, "location_source": "sample string 9" } ], "latitude": 1.1, "longitude": 1.1, "altitude": 1.1 }, "downlink_url": "sample string 8" }
application/xml, text/xml
Sample:
<UplinkMessageDto xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/AnalysisUK.Tinamous.www.ApiControllers.Models.TheThingsNetwork"> <AppId>sample string 1</AppId> <Confirmed>true</Confirmed> <Counter>1</Counter> <DevId>sample string 2</DevId> <DownlinkUrl>sample string 8</DownlinkUrl> <HardwareSerial>sample string 3</HardwareSerial> <IsRetry>true</IsRetry> <Metadata> <Altitude>1.1</Altitude> <BitRate>5</BitRate> <CodingRate>sample string 6</CodingRate> <DataRate>sample string 4</DataRate> <Frequency>2.1</Frequency> <Gateways> <GatewayDto> <Altitude>1.1</Altitude> <Channel>5</Channel> <GtwId>sample string 1</GtwId> <GtwTrusted>true</GtwTrusted> <Latitude>1.1</Latitude> <LocationSource>sample string 9</LocationSource> <Longitude>1.1</Longitude> <RfChain>8</RfChain> <Rssi>6.1</Rssi> <Snr>7.1</Snr> <Time>2024-11-08T22:34:46.2988922+00:00</Time> <Timestamp>3</Timestamp> </GatewayDto> <GatewayDto> <Altitude>1.1</Altitude> <Channel>5</Channel> <GtwId>sample string 1</GtwId> <GtwTrusted>true</GtwTrusted> <Latitude>1.1</Latitude> <LocationSource>sample string 9</LocationSource> <Longitude>1.1</Longitude> <RfChain>8</RfChain> <Rssi>6.1</Rssi> <Snr>7.1</Snr> <Time>2024-11-08T22:34:46.2988922+00:00</Time> <Timestamp>3</Timestamp> </GatewayDto> </Gateways> <Latitude>1.1</Latitude> <Longitude>1.1</Longitude> <Modulation>sample string 3</Modulation> <Time>2024-11-08T22:34:46.2988922+00:00</Time> </Metadata> <PayloadFields xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays"> <d2p1:KeyValueOfstringstring> <d2p1:Key>sample string 1</d2p1:Key> <d2p1:Value>sample string 2</d2p1:Value> </d2p1:KeyValueOfstringstring> <d2p1:KeyValueOfstringstring> <d2p1:Key>sample string 3</d2p1:Key> <d2p1:Value>sample string 4</d2p1:Value> </d2p1:KeyValueOfstringstring> </PayloadFields> <PayloadRaw>sample string 7</PayloadRaw> <Port>4</Port> </UplinkMessageDto>
application/x-www-form-urlencoded
Sample:
Sample not available.
Response Information
Resource Description
IHttpActionResultNone.
Response Formats
application/json, text/json, application/xml, text/xml, application/senml+json
Sample:
Sample not available.