<commit_before>This file documents the HaaS REST API in detail.

# How to read

Each possible API call had a entry below containing:

* an HTTP method and URL path, including possible `<parameters>` in the
  path to be treated as arguments.
* Optionally, a summary of the request body (which will always be a JSON
  object).
* A human readable description of the semantics of the call
* A summary of the response body for a successful request. Many calls do
  not return any data, in which case this is omitted.
* A list of possible errors.

In addition to the error codes listed for each API call, HaaS may return
a `400 Bad Request` if something is wrong with the request (e.g.
malformed request body), or `401 Unauthorized` if the user does not have
permission to execute the supplied request.

Below is an example.

## my_api_call

`POST /url/path/to/<thing>`

Request Body:

    {
        "some_field": "a value",
        "this-is-an-example": true,
        "some-optional-field": { (Optional)
            "more-fields": 12352356,
            ...<commit_msg>Fix a grammar issue<commit_after>This file documents the HaaS REST API in detail.

# How to read

Each possible API call has an entry below containing:

* an HTTP method and URL path, including possible `<parameters>` in the
  path to be treated as arguments.
* Optionally, a summary of the request body (which will always be a JSON
  object).
* A human readable description of the semantics of the call
* A summary of the response body for a successful request. Many calls do
  not return any data, in which case this is omitted.
* A list of possible errors.

In addition to the error codes listed for each API call, HaaS may return
a `400 Bad Request` if something is wrong with the request (e.g.
malformed request body), or `401 Unauthorized` if the user does not have
permission to execute the supplied request.

Below is an example.

## my_api_call

`POST /url/path/to/<thing>`

Request Body:

    {
        "some_field": "a value",
        "this-is-an-example": true,
        "some-optional-field": { (Optional)
            "more-fields": 12352356,
            ...
{'fraction_non_alphanumeric': 0.07313642756680731, 'fraction_numerical': 0.013127051101734646, 'mean_word_length': 3.217391304347826, 'pattern_counts': {'":': 8, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 0, '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': '1598586', 'n_tokens_mistral': 621, 'n_tokens_neox': 583, 'n_words': 307}