Skip to content

Latest commit

 

History

History
207 lines (108 loc) · 4.76 KB

DOCS.md

File metadata and controls

207 lines (108 loc) · 4.76 KB

express-rest-api-boilerplate v0.0.0

Auth

Authenticate with Email and Password

POST /auth

Headers

Name Type Description
Authorization String

Basic authorization with email and password.

Authenticate with Apple

POST /auth/apple

Parameters

Name Type Description
access_token String

Apple user accessToken.

Authenticate with Facebook

POST /auth/facebook

Parameters

Name Type Description
access_token String

Facebook user accessToken.

Authenticate with Github

POST /auth/github

Parameters

Name Type Description
access_token String

Github user accessToken.

Authenticate with Google

POST /auth/google

Parameters

Name Type Description
access_token String

Google user accessToken.

Authenticate with Vk

POST /auth/vk

Parameters

Name Type Description
access_token String

Vk user accessToken.

User

Create user

POST /users

Parameters

Name Type Description
access_token String

Master access_token.

email String

User's email.

password String

User's password.

name String optional

User's name.

picture String optional

User's picture.

role String optional

User's role.

Delete user

DELETE /users/:id

Parameters

Name Type Description
access_token String

User access_token.

Retrieve current user

GET /users/me

Parameters

Name Type Description
access_token String

User access_token.

Retrieve user

GET /users/:id

Retrieve users

GET /users

Parameters

Name Type Description
access_token String

User access_token.

q String optional

Query to search.

page Number optional

Page number.

limit Number optional

Amount of returned items.

sort String[] optional

Order of returned items.

fields String[] optional

Fields to be returned.

Update password

PUT /users/:id/password

Headers

Name Type Description
Authorization String

Basic authorization with email and password.

Parameters

Name Type Description
password String

User's new password.

Update user

PUT /users/:id

Parameters

Name Type Description
access_token String

User access_token.

name String optional

User's name.

picture String optional

User's picture.