Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

To In order to speed up and simplify the end-user application development, LoRaWAN network operators and users can push raw data messages from Nwave parking sensors for further processing at Nwave Cloud API services and analytics.

Currently, Nwave Cloud provides an ingestion method through the HTTP interface. This is - the simplest way for development and debugging.Nwave provides an HTTP endpoint for the ingectionand most universal API interface type.

The dedicated HTTP endpoint URL is: https://in.lorawan.source.nwave.io/v1/ingest

The endpoint receives only POST requests and requires an authorization token. You can follow this guide to generating generate a token.

The basic request body can contain only required message object fields:

...

Info

received_at ideally must be the real time timestamp of message reception by a LoRaWAN station. This field is used for data analytics. If station reception time is not available (or not precise enough) the LNS broker time reception time shall be used.

...

Code Block
languagejson
{	
	"dev_eui": "00E8BF3B00100030",
	"received_at": "2021-12-15T08:09:56.936592Z",
	"uplink_message": {
		"f_port": 2,
		"f_cnt": 81,
		"f_payload": "0A1234",
		
		"trace_id": "e07d7812-869a-4f8d-bc17-2cd9c4bde94f",
		
		"bandwidth": 125000,
		"spreading_factor": 9,
		"codingdata_rate": "4/5SF9BW125",
		"frequency": "868300000",
		"confirmed": true,
		
		"rx_metadata": [
			{
				"gateway_eui": "0000024B0B03157A"
				"rssi": -115,
				"snr": -0.5,
				"location": {
					"latitude": 51.52485927633408,
					"longitude": -0.13254563502660632
				}
			},
			{
				...
			}
		]		
	}		
}

...

Code Block
languagebash
curl -XPOST -H 'x-Auth-Token: <Your API Key>' -d '{	
	"dev_eui": "00E8BF3B00100030",
	"received_at": "2021-12-15T08:09:56.936592Z",
	"uplink_message": {
		"f_port": 2,
		"f_cnt": 81,
		"f_payload": "0A1234",
		
		"trace_id": "e07d7812-869a-4f8d-bc17-2cd9c4bde94f"
	}		
}' 'https://in.lorawan.source.nwave.io/v1/ingest'
Swagger open api macro
displayOperationIdfalse
methodsnone,get,put,post,delete,options,head,patch,trace
validator
urlhttps://in.lorawan.source.nwave.io/docs/openapi.json
token
defaultModelRenderingexample
filter
password
expandlist
showCommonExtensionsfalse
filename
operations
maxDisplayedTags
attachfalse
showExtensionsfalse
displayRequestDurationfalse
username
order
{"openapi":"3.0.2","info":{"title":"Nwave HTTP ingestion","version":"1.0.0"},"paths":{"/v1/ingest":{"post":{"tags":["LoRaWAN Message Ingestion"],"summary":"Ingest Message","operationId":"ingest_message_v1_ingest_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IngestionMessageV1"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/v1/injest'components/schemas/SuccessfulResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"APIKeyHeader":[]}]}},"/v1/healthcheck":{"get":{"tags":["Service Healthcheck"],"summary":"Healthcheck","operationId":"healthcheck_v1_healthcheck_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BaseResponse"}}}}}}}},"components":{"schemas":{"BaseResponse":{"title":"BaseResponse","required":["reason"],"type":"object","properties":{"message":{"title":"Message","type":"string"},"reason":{"$ref":"#/components/schemas/ReasonEnum"},"data":{"title":"Data"}},"description":"HTTP base response model"},"HTTPValidationError":{"title":"HTTPValidationError","type":"object","properties":{"detail":{"title":"Detail","type":"array","items":{"$ref":"#/components/schemas/ValidationError"}}}},"IngestionMessageV1":{"title":"IngestionMessageV1","required":["dev_eui","received_at","uplink_message"],"type":"object","properties":{"dev_eui":{"title":"Dev Eui","type":"string"},"received_at":{"title":"Received At","type":"string","format":"date-time"},"uplink_message":{"$ref":"#/components/schemas/UplinkMessage"}}},"Location":{"title":"Location","type":"object","properties":{"latitude":{"title":"Latitude","type":"number"},"longitude":{"title":"Longitude","type":"number"}}},"ReasonEnum":{"title":"ReasonEnum","enum":["ok","created","invalid_field","no_data","not_found","not_implemented","restricted","server_error"],"type":"string","description":"Enum for response's reason"},"RxMetadata":{"title":"RxMetadata","type":"object","properties":{"gateway_ids":{"title":"Gateway Ids","type":"string"},"rssi":{"title":"Rssi","type":"integer"},"snr":{"title":"Snr","type":"integer","default":-99},"location":{"$ref":"#/components/schemas/Location"}}},"SuccessfulResponse":{"title":"SuccessfulResponse","required":["data"],"type":"object","properties":{"message":{"title":"Message","type":"string"},"reason":{"allOf":[{"$ref":"#/components/schemas/ReasonEnum"}],"default":"ok"},"data":{"$ref":"#/components/schemas/SuccessfulResponseData"}},"description":"HTTP successful response model"},"SuccessfulResponseData":{"title":"SuccessfulResponseData","required":["device_id","trace_id"],"type":"object","properties":{"device_id":{"title":"Device Id","type":"string"},"trace_id":{"title":"Trace Id","type":"string","format":"uuid"}},"description":"Successful response data model"},"UplinkMessage":{"title":"UplinkMessage","required":["f_cnt","f_port","f_payload"],"type":"object","properties":{"f_cnt":{"title":"F Cnt","type":"integer"},"f_port":{"title":"F Port","type":"integer"},"f_payload":{"title":"F Payload","type":"string"},"trace_id":{"title":"Trace Id","type":"string","format":"uuid"},"bandwidth":{"title":"Bandwidth","type":"integer"},"spreading_factor":{"title":"Spreading Factor","type":"integer"},"coding_rate":{"title":"Coding Rate","type":"string"},"frequency":{"title":"Frequency","type":"string"},"confirmed":{"title":"Confirmed","type":"boolean"},"rx_metadata":{"title":"Rx Metadata","type":"array","items":{"$ref":"#/components/schemas/RxMetadata"},"default":[{"snr":-99}]}}},"ValidationError":{"title":"ValidationError","required":["loc","msg","type"],"type":"object","properties":{"loc":{"title":"Location","type":"array","items":{"type":"string"}},"msg":{"title":"Message","type":"string"},"type":{"title":"Error Type","type":"string"}}}},"securitySchemes":{"APIKeyHeader":{"type":"apiKey","in":"header","name":"X-Auth-Token"}}}}