API Documentation

GET /authentication/github/

Start GitHub OAuth login and return authorization URL.

Status Codes:
Response JSON Object:
  • state (string)

  • url (string)

GET /authentication/github/callback/

Handle GitHub OAuth callback and set JWT cookie.

Status Codes:
Response JSON Object:
  • jwt (string)

GET /authentication/google/

Start Google OAuth login and return authorization URL.

Status Codes:
Response JSON Object:
  • state (string)

  • url (string)

GET /authentication/google/callback/

Handle Google OAuth callback and set JWT cookie.

Status Codes:
Response JSON Object:
  • jwt (string)

POST /authentication/log

Log in user and return a JWT token.

Request JSON Object:
  • email (string) – (required)

  • password (string) – (required)

Status Codes:
Response JSON Object:
  • jwt (string)

POST /authentication/logout

Log out user by deleting the JWT cookie.

Status Codes:
POST /authentication/sign

Register a new user and return a JWT token.

Request JSON Object:
  • email (string) – (required)

  • password (string) – (required)

  • username (string) – (required)

Status Codes:
Response JSON Object:
  • jwt (string)

GET /authentication/user

Get user’s profile using JWT from cookie.

Status Codes:
Request Headers:
  • token (jwt) – JWT token from cookie

Response JSON Object:
  • email (string)

  • username (string)

POST /translation/custom_update_cell

Manually update a specific cell with custom text.

Status Codes:
Request Headers:
  • token (jwt) – JWT token from cookie

  • idx (Column) – Column indexes list of csv file to update

  • idxt (Row) – Row indexes list of csv file to update

  • Text – Text to update cell

POST /translation/dowloand_csv

Download the user’s CSV file with translated values.

Status Codes:
Request Headers:
  • token (jwt) – JWT token from cookie

Response JSON Object:
  • file (file attached)

GET /translation/get_user_csv

Get the currently active CSV file for the authenticated user.

Status Codes:
Request Headers:
  • token (jwt) – JWT token from cookie

Response JSON Object:
  • file (string)

POST /translation/revert_cell

Revert a single translated cell back to its original state.

Request JSON Object:
  • column_idx (integer) – (required)

  • row_idx (integer) – (required)

Status Codes:
Request Headers:
  • token (jwt) – JWT token from cookie

  • idx (Row) – Column indexes list of csv file to revert

  • idx – Row indexes list of csv file to revert

POST /translation/translate_cells

Translate selected cells in a CSV file.

Request JSON Object:
  • column_idx_list[] (integer)

  • row_idx_list[] (integer)

  • source_language (string) – (required)

  • target_language (string) – (required)

Status Codes:
Request Headers:
  • token (jwt) – JWT token from cookie

  • list (Row idx) – Column indexes list of csv file to translate

  • list – Row indexes list of csv file to translate

  • language (Target) – Source language to translate from to || or “any” language

  • language – Target language to translate text to

Response JSON Object:
  • column_idx_list[] (integer)

  • row_idx_list[] (integer)

  • source_language (string) – (required)

  • target_language (string) – (required)

POST /translation/upload_csv

Upload a CSV file, parse it,store it in the database and delete from database user’s old csv.

Request JSON Object:
  • file (string) – (read only)

Status Codes:
Request Headers:
  • token (jwt) – JWT token from cookie

  • File (.csv) – File to be uploaded

Response JSON Object:
  • file_id (string)

  • file_title (string)

  • status (string)