Skip to content
sfiquet edited this page Mar 20, 2018 · 4 revisions

The API

Content

  • Users API
  • Projects API

Format

For now the only format supported will be JSON.

Users API

Endpoints

  • /api/users
  • /api/users/:id

Data

Proposed structure for user:

  • displayName: string
  • name: string
  • stack: array of strings, similar to keywords in project
  • dateCreated: date the account was created, read-only
  • projectsOwned: array of projects they created
  • projectsJoined: array of projects they joined as a team member
  • email: string in email format
  • github: string in url format?
  • dateFormat: preferred format for displaying dates (do we need this?)

HTTP requests

/api/users

POST: create a user (register)

Not needed

GET: get the list of all users - not needed

PUT: bulk update of users - not needed

DELETE: delete all users - not needed

/api/users/:id

GET: get a specific user's details

Possible future work

PUT: update a specific user

DELETE: delete a specific user

Not needed

POST

Projects API

Endpoints

  • /api/projects
  • /api/projects/:id

Data

Structure of a project:

  • title: string - not too long, should fit on one to two lines on screen
  • author: should identify the user who created it
  • keywords: array of strings
  • description: text
  • repository: text (url)

HTTP requests

/api/projects

GET: get a list of all projects

POST: create a new project

Not needed

PUT: bulk update of projects - not needed

DELETE: delete all projects - not needed

/api/projects/:id

GET: get a specific project

Future work

PUT: update a specific project

DELETE: delete a specific project

Not needed

POST