<commit_before># Teikei API Reference

## Sessions (Login / Logout)

- POST /api/v1/sessions
   create a new session (login)
   data : username / password
   success: 200

   curl -X POST -i http://localhost:3000/api/v1/sessions.json -d "user[email]=<EMAIL>&user[password]=password"


- DELETE /api/v1/sessions/:ID
   destroy the session (logout)
   data : -
   success: 204

   curl -X DELETE -i http://localhost:3000/api/v1/sessions/1.json

## Places

- GET /api/v1/places
   return all places (i.e. depots and farms combined)
   data  : -
   success : 200

   curl -X GET http://localhost:3000/api/v1/places.json


## Farms

- GET /api/v1/farms
    return all farms
    data  : -
    success : 200

    curl -X GET http://localhost:3000/api/v1/farms.json

- GET /api/v1/farms/:ID<commit_msg>Add documentation for API login/logout.<commit_after># Teikei API Reference

## Sessions (Login / Logout)

- POST /api/v1/sessions
   create a new session (login)
   data : username / password
   success: 200

   curl -X POST -i http://localhost:3000/api/v1/sessions.json -d "user[email]=<EMAIL>&user[password]=password"

- DELETE /api/v1/sessions
   destroy the session (logout)
   data : user_id
   success : 204

   curl -X DELETE -i http://localhost:3000/api/v1/USER_ID/sessions.json

## Places

- GET /api/v1/places
   return all places (i.e. depots and farms combined)
   data  : -
   success : 200

   curl -X GET http://localhost:3000/api/v1/places.json


## Farms

- GET /api/v1/farms
    return all farms
    data  : -
    success : 200

    curl -X GET http://localhost:3000/api/v1/farms.json

- GET /api/v1/farms/:ID
{'fraction_non_alphanumeric': 0.13255240443896424, 'fraction_numerical': 0.04623921085080148, 'mean_word_length': 2.647191011235955, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '2514202', 'n_tokens_mistral': 655, 'n_tokens_neox': 586, 'n_words': 150}