<commit_before>Newts REST
==========

Quickstart
----------
Building::

    $ mvn clean package

Initialize the database (Cassandra must be running)::

    $ java -jar target/newts-rest-<version>-SNAPSHOT.jar init config.yaml

Starting the REST server from the build directory::

    $ java -jar target/newts-rest-<version>-SNAPSHOT.jar server config.yaml

To get started reading/writing data, try::

    $ curl \
        -D - \
        -X POST \
        -H "Content-Type: application/json" \
        -d @samples.txt \
        http://0.0.0.0:8080/samples

    $ curl -D - -X GET 'http://0.0.0.0:8080/samples/localhost%3Achassis%3Atemps?start=1998-07-09T12:05:00-0500&end=1998-07-09T13:15:00-0500'; echo
    $ curl -D - -X GET 'http://0.0.0.0:8080/measurements/temps/localhost%3Achassis%3Atemps?end=1998-07-09T13:15:00-0500&start=1998-07-09T12:05:00-0500&resolution=15m'; echo

To search::

    $ curl -D - -X GET 'http://0.0.0.0:8080/search?q=americas'

    
API
---

See the Wiki_ for a complete API reference.

.. _Wiki: https://github.com/OpenNMS/newts/wiki/RestAPI
.. _ISO 8601: http://en.wikipedia.org/wiki/Iso8601
<commit_msg>use slash resource delims in example url<commit_after>Newts REST
==========

Quickstart
----------
Building::

    $ mvn clean package

Initialize the database (Cassandra must be running)::

    $ java -jar target/newts-rest-<version>-SNAPSHOT.jar init config.yaml

Starting the REST server from the build directory::

    $ java -jar target/newts-rest-<version>-SNAPSHOT.jar server config.yaml

To get started reading/writing data, try::

    $ curl \
        -D - \
        -X POST \
        -H "Content-Type: application/json" \
        -d @samples.txt \
        http://0.0.0.0:8080/samples

    $ curl -D - -X GET 'http://0.0.0.0:8080/samples/%2Flocalhost%2Fchassis%2Ftemps?start=1998-07-09T12:05:00-0500&end=1998-07-09T13:15:00-0500'; echo
    $ curl -D - -X GET 'http://0.0.0.0:8080/measurements/temps/%2Flocalhost%2Fchassis%2Ftemps?end=1998-07-09T13:15:00-0500&start=1998-07-09T12:05:00-0500&resolution=15m'; echo

To search::

    $ curl -D - -X GET 'http://0.0.0.0:8080/search?q=americas'

    
API
---

See the Wiki_ for a complete API reference.

.. _Wiki: https://github.com/OpenNMS/newts/wiki/RestAPI
.. _ISO 8601: http://en.wikipedia.org/wiki/Iso8601

{'fraction_non_alphanumeric': 0.16804527644754028, 'fraction_numerical': 0.10361340879407924, 'mean_word_length': 2.8363939899833057, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 8, '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': '4690472', 'n_tokens_mistral': 1019, 'n_tokens_neox': 867, 'n_words': 168}