<commit_before># Backend Administration

To use this functionality you have to set Device/Node Application to *backend*
and enter some *Group* name for this device/node.

![alt tag](https://raw.githubusercontent.com/gotthardp/lorawan-server/master/doc/images/admin-handler.png)

## Handlers

To create a new handler you need to set:
 * *Group* name
 * *Format* to either *Raw* content or *JSON*
 * *Parse Uplink* and *Build Downlink* functions (for the JSON format only)
 * *Connector* identifier (see the next chapter)

The *Parse Uplink* is an Erlang function that converts a binary to a list that
gets JSON encoded into the `fields` attribute. It shall be a
[Fun Expression](http://erlang.org/doc/reference_manual/expressions.html#funs)
with two parameters, which matches the
[binary data](http://erlang.org/doc/programming_examples/bit_syntax.html)
and returns an
[Erlang representation of JSON](https://github.com/talentdeficit/jsx#json---erlang-mapping).<commit_msg>Minor doc fix<commit_after># Backend Administration

To use this functionality you have to set Device/Node Application to *backend*
and enter some *Group* name for this device/node. The device/node *Group*
must correspond to the Handler *Group* name.

![alt tag](https://raw.githubusercontent.com/gotthardp/lorawan-server/master/doc/images/admin-handler.png)

## Handlers

To create a new handler you need to set:
 * *Group* name
 * *Format* to either *Raw* content or *JSON*
 * *Parse Uplink* and *Build Downlink* functions (for the JSON format only)
 * *Connector* identifier (see the next chapter)

The *Parse Uplink* is an Erlang function that converts a binary to a list that
gets JSON encoded into the `fields` attribute. It shall be a
[Fun Expression](http://erlang.org/doc/reference_manual/expressions.html#funs)
with two parameters, which matches the
[binary data](http://erlang.org/doc/programming_examples/bit_syntax.html)
and returns an
[Erlang representation of JSON](https://github.com/talentdeficit/jsx#json---erlang-mapping).
{'fraction_non_alphanumeric': 0.10432190760059612, 'fraction_numerical': 0.0, 'mean_word_length': 5.0845921450151055, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 4, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2077460', 'n_tokens_mistral': 601, 'n_tokens_neox': 591, 'n_words': 219}