Module: routes/v1_1

Router for TTN HTTP integrations API v1 and this API v1
License:
  • MIT
Source:

Members

(inner) 'POST /v1.1'

Accepts a POST request from the TTN HTTP integrations uplink API, version 1 as specified here, and decodes it's payload to store a set of measurements for a box. The box is identified by it's registered values app_id and dev_id. If a box specifies a port, it will only recieve measurements sent on that port.
Source:
Example
curl -X POST -H "content-type: application/json" -d \
  '{ "app_id": "asdf", "dev_id": "qwerty", "payload_raw": "kzIrIYzlOycAMgEA" }' \
  localhost:3000/v1.1

Methods

(private, inner) handleResponse(req, res, data)

send responses & do logging
Parameters:
Name Type Description
req Request
res Response
data Object Format: either String or { code: Number, msg: Any }
Source: