Decoder

The 'decoder' API allows viewing, creating, modifying, and deleting decoders associated with one or more devices. Administrator or super administrator permissions are required.

GET /decoders

The GET /decoders endpoint provides a paginated list of decoders, which can be filtered by the following fields:

  • 'id' (optional): decoder identifier.
  • 'name' (optional): decoder name.
  • 'network' (optional): network to which the decoder belongs; there are three possibilities: 'Lora', 'NBIOT', or 'Wifi'.
  • 'vendor' (optional): company selling the decoder.
  • 'model' (optional): model of the decoder.
  • 'softwareVersion' (optional): software version of the decoder.
  • 'code' (optional): code to decode messages from the device or devices to which it is associated.
  • 'lnsId' (optional): LNS identifier of the decoder.
  • 'codecIdHex' (optional): hexadecimal identifier of the decoder.
  • 'description' (optional): description of the decoder.

GET /decoders/{id}

The GET /decoders/{id} endpoint provides the decoder by its id.

POST /decoders

The POST /decoders endpoint creates a new decoder and must have the following format:

{
  "name": "decoder1",
  "network": "Lora",
  "vendor": "vendor",
  "model": "model1",
  "softwareVersion": "1.0",
  "code": "function doSomething(){}",
  "codecIdHex": "01",
  "description": "this is a decoder"
}
  • 'name' (required): name of the decoder.
  • 'network' (required): network to which the decoder belongs; there are three possibilities: 'Lora', 'NBIOT', or 'Wifi'.
  • 'vendor' (optional): company selling the decoder.
  • 'model' (optional): model of the decoder.
  • 'softwareVersion' (optional): software version of the decoder.
  • 'code' (required): code to decode messages from the device or devices to which it is associated.
  • 'codecIdHex' (optional): hexadecimal identifier of the decoder.
  • 'description' (optional): description of the decoder.

PUT /decoders/{id}

The PUT /decoder/{id} endpoint serves to modify a decoder by its id. The data that can be modified are as follows:

  • 'vendor' (optional): company selling the decoder.
  • 'model' (optional): model of the decoder.
  • 'softwareVersion' (optional): software version of the decoder.
  • 'code' (required): code to decode messages from the device or devices to which it is associated.

DELETE /decoders/{id}

The DELETE /decoders/{id} endpoint deletes the decoder by its id.