Skip to content

API Documentation

Evan Langlais edited this page Feb 16, 2019 · 10 revisions
Clone this wiki locally

Authorization

Authorize User - POST /auth

BODY:

  • email
  • password

RETURNS:

  • message - "Authorized" if successful
  • token - The JWT token that will be used as bearer token for all other functions

Users

GET /user/me

A simple function to return the authorized user's information to test authentication token

AUTHORIZATION: bearer

RETURNS: User object saved in the JWT


Admin

Register New User - POST /admin/register

AUTHORIZATION: bearer + admin role (not implemented yet)

BODY:

  • email
  • password
  • organization_id
  • first_name
  • last_name

RETURNS:

  • message - "Created User" if successful
  • user_id - Newly created user's id