<commit_before>[https://david-dm.org/DoSomething/mb-logging-api.svg](https://david-dm.org/DoSomething/mb-logging-api.svg)

mb-logging-api
==============

An API to send logging data for persistant storage. Currently the persistant storage is a MongoDB.

###Endpoints

* GET /api - report basic details about the API
* GET /api/v1
* POST to /api/v1/imports
  * @param type string
    ex. &type=user : The type of import, helps to define what collection the
     POST is added to.
  * @param exists integer
    &exists=1 : Flag to log entries of existing Drupal, Mailchimp and Mobile
    Commons users in the userImportModel.
  * @param source string
    &source=niche : Unique name to identify the source of the import data.
* POST to /api/v1/imports/summaries
   * @param type string
     ex. &type=user : The type of import.
   * @param source string
     &source=niche.com : Unique name to identify the source of the import data.
<commit_msg>Include params in examples<commit_after>![https://david-dm.org/DoSomething/mb-logging-api.svg](https://david-dm.org/DoSomething/mb-logging-api.svg)

mb-logging-api
==============

An API to send logging data for persistant storage. Currently the persistant storage is a MongoDB.

###Endpoints

* GET /api - report basic details about the API
* GET /api/v1
* POST to /api/v1/imports?type=[user]&exists=[1]&source=[niche]
  * @param type string
    ex. &type=user : The type of import, helps to define what collection the
     POST is added to.
  * @param exists integer
    &exists=1 : Flag to log entries of existing Drupal, Mailchimp and Mobile
    Commons users in the userImportModel.
  * @param source string
    &source=niche : Unique name to identify the source of the import data.
* POST to /api/v1/imports/summaries?type=[user]&source=[niche]
   * @param type string
     ex. &type=user : The type of import.
   * @param source string
     &source=niche.com : Unique name to identify the source of the import data.

{'fraction_non_alphanumeric': 0.1103202846975089, 'fraction_numerical': 0.004575495678698526, 'mean_word_length': 3.5555555555555554, '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': '1283776', 'n_tokens_mistral': 609, 'n_tokens_neox': 597, 'n_words': 223}