<commit_before># Thalia

Rest Wrapper for terminus

#Operations

## Utility Operations

|Resource|Verb|Payload|Terminus Command|
|--------|----|-------|----------------|
|/terminus/cli/version|GET||`terminus cli version`|


**GET** 

Returns terminus version, wraps `terminus cli version`

**GET** /terminus/auth

Returns logged in user information or 404 if not logged in, wraps `terminus auth whoami`

**POST** /terminus/auth/login

**POST** /terminus/auth/logout

## Site Operations
**GET** /terminus/site/{siteName}

**GET** /terminus/site/{siteName}/{fieldName}

{fieldName} is optional. Returns site information or 404 if site not found, wraps `terminus site info`

**GET** /terminus/site/{siteName}/env


**DELETE** /terminus/site/{siteName}

Deletes site. Wraps `terminus site delete`

**GET** /terminus/site/{siteName}/env/{envName}

**GET** /terminus/site/{siteName}/env/{envName}/{fieldName}

{fieldName} is optional. Returns  environment information or 404 if site not found, wraps `terminus site environment-info`

**POST** /terminus/site/{siteName}/env/{envName}

**DELETE** /terminus/site/{siteName}/env/{envName}

**GET** /terminus/sites

**POST** /terminus/sites/{siteName}

Returns 201 if site is created, 409 if site already exists, wraps `terminus sites create`<commit_msg>trying it in tables for readability<commit_after># Thalia

Rest Wrapper for terminus

#Operations

## Utility Operations

|Verb|Resource|Payload|Terminus Command|Notes|
|--------|----|-------|----------------|-----|
|GET|/terminus/cli/version||`terminus cli version`|Returns terminus version|
|GET|/terminus/auth||`terminus auth whoami`|Returns logged in user information|
|POST|/terminus/auth/login||`terminus auth login`||
|POST|/terminus/auth/logout||`terminus auth logout`||


## Site Operations
|Verb|Resource|Payload|Terminus Command|Notes|
|--------|----|-------|----------------|-----|
|GET|/terminus/site/{siteName}/?{optional:fieldName}||`terminus site info`||
|GET|/terminus/site/{siteName}/env||`terminus site environments`||
|DELETE|/terminus/site/{siteName}||`terminus site delete`||
|GET|/terminus/site/{siteName}/env/{envName}?{optional:fieldName}||`terminus site environment-info`||
|POST|/terminus/site/{siteName}/env/{envName}||`terminus site create-env`||
|DELETE|/terminus/site/{siteName}/env/{envName}||`terminus site delete-env`||

##Sites Operations (Don't judge me, it's pragmatic)

|Verb|Resource|Payload|Terminus Command|Notes|
|--------|----|-------|----------------|-----|
|GET|/terminus/sites||`terminus sites list`||
|POST|/terminus/sites/{siteName}||`terminus sites create`||
{'fraction_non_alphanumeric': 0.2173076923076923, 'fraction_numerical': 0.0057692307692307696, 'mean_word_length': 4.3408624229979464, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 1, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '996391', 'n_tokens_mistral': 877, 'n_tokens_neox': 786, 'n_words': 188}