-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathapi.apib
More file actions
46 lines (32 loc) · 1.19 KB
/
Copy pathapi.apib
File metadata and controls
46 lines (32 loc) · 1.19 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
FORMAT: 1A
HOST: https://localhost:8000/api/v1/accounts
# Accounts API
An API for user sign-in/sign-up
# Data Structures
## Account Request (object)
+ name: John (string, required) - User name
+ email: johndoe@example.com (string, required) - User email
+ password: 123myPass (string, required) - User password
## Account Response (object)
+ id: 5c1044f6cf88d14b4778f628 (string, fixed) - Unique identifier
+ name: John (string, required) - User name
+ email: johndoe@example.com (string, required) - User email
+ password: $2a$14$GXNIJWf976sce (string, required) - User hashed password
# Accounts [/accounts]
Account collection
+ Attributes (Account Response)
## Create Account [POST /]
+ Request Create Account (application/json)
+ Attributes
+ Account Request
+ Response 201
+ Attributes
+ Account Response
## Login Account [POST /login]
+ Request Create Account (application/json)
+ Attributes
+ email: johndoe@example.com (string, required) - User email
+ password: $2a$14$GXNIJWf976sce (string, required) - User hashed password
+ Response 201
+ Attributes
+ token: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJlbWFpbCI6 (string) - JWT signed token