Options
All
  • Public
  • Public/Protected
  • All
Menu

Module "lib/request-handlers/records"

Index

Functions

Const getRecordById

  • getRecordById(_request: Request<ParamsDictionary, any, any, ParsedQs>, response: Response<any>): Promise<void>
  • GET a record by its ID

    Parameters

    • _request: Request<ParamsDictionary, any, any, ParsedQs>
    • response: Response<any>

    Returns Promise<void>

Const getRecords

  • getRecords(_request: Request<ParamsDictionary, any, any, ParsedQs>, response: Response<any>): Promise<void>
  • GET all records from a device

    Parameters

    • _request: Request<ParamsDictionary, any, any, ParsedQs>
    • response: Response<any>

    Returns Promise<void>

Const postRecord

  • postRecord(request: Request<ParamsDictionary, any, any, ParsedQs>, response: Response<any>): Promise<void>
  • allows to POST a record. Depends on lib/middlewares/deviceCheck

    Parameters

    • request: Request<ParamsDictionary, any, any, ParsedQs>
    • response: Response<any>

    Returns Promise<void>

Const postRecordsFromTTNHTTPIntegration

  • postRecordsFromTTNHTTPIntegration(request: Request<ParamsDictionary, any, any, ParsedQs>, response: Response<any>): Promise<void>
  • Special handler that allows posting data directly from the TTN network into the DB. We use the HTTP Integration from thethingsnetwork.org https://www.thethingsnetwork.org/docs/applications/http/

    Prerequisites:

    • You need to have an user account on thethingsnetwork.org
    • You need to have a user for this API
    • You need to have an API Token from this API
    • You need to setup a payload format decoder that adds the payload_fields.value property

    This will allow to POST data to this route.

    You should find more information on this in the README of the repo on GitHub

    Parameters

    • request: Request<ParamsDictionary, any, any, ParsedQs>
    • response: Response<any>

    Returns Promise<void>

Generated using TypeDoc