RobCoInc / server

API Server
0 stars 0 forks source link
express javascript node nodejs rest-api

server

Build Status

This repository contains the Node server and its endpoints provided by the Suplex API.

Endpoints


List of current (hopefully) endpoints that are available. Please see https://github.com/RobCoInc/server/issues/7 if you require another endpoint that does not exist.

Table Of Contents

  1. Users
    1. GET
      1. Get All Users
      2. Get User by Email
      3. Get User by ID
    2. POST
      1. Add a User
  2. Companys
    1. GET
      1. Get All Companys
    2. POST
      1. Add a Company

Get all Users

Type: GET

Description: Returns all users

URL:

http://localhost/api/users

Get User by Email

Type: GET

Description: Returns the user with a specified email address

Params:

  1. Email

URL:

http://localhost/api/users/getUserByEmail/[email]

Get User by ID

Type: GET

Description: Returns the user with a specified id

Params:

  1. ID

URL:

http://localhost/api/users/getUserById/[id]

Add a User

Type: POST

Description: Adds a new user to the user table

Params:

  1. _id (Not required, auto increment is used)
  2. password
  3. email
  4. firstName
  5. lastName
  6. companyId
  7. cellNumber
  8. isAdmin
  9. isBasic

URL:

http://localhost/api/users

Get all Companys

Type: GET

Description: Returns all companys

URL:

http://localhost/api/companys

Add a Company

Type: POST

Description: Adds a new company to the company table

Params:

  1. _id (Not required, auto increment is used)
  2. companyName
  3. secureNum
  4. level
  5. location
  6. email

URL:

http://localhost/api/companys