4.0 API - shiling/sg-dev-meetups GitHub Wiki

Yii2 PHP Backend Alternative -> Can PHP Beat Node.js?

  • User

Health check

GET /api/health

Auth Health check

GET /api/health-auth headers: Authorization: Bearer

Login

POST /api/auth/login

Request Body

{
  "email": "",
  "password": ""
}

Response Body

{
  "token": ""
}

Token claims:

  • email
  • role

SHOULD token be in request header or in cookie? cookie more secure, but requires all to be in same domain... Need to decide.

LY: use in header. No need to be too secure. MVP

1 Users

2 Groups

Get /group   #Search group by etc 

Get /group/:id   #group view

Post /group

Post /group/:id/join    #join as a member
` { userID } `
    

GET /group/tags   #array of tags 

Get /group/:id/members

Get /group/:id/events

Get /group/:id/isMember    #check if id is a member of a group
⚠️ **GitHub.com Fallback** ⚠️