-
Notifications
You must be signed in to change notification settings - Fork 0
/
API-design.txt
59 lines (57 loc) · 1.17 KB
/
API-design.txt
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
47
48
49
50
51
52
53
54
55
56
57
58
59
/user
/signup
[POST]
(creates new user, sends user confirmation code email)
{user-email, user-password }
POSSIBLE ERRORS:
IMPLEMENTED?
/confirm-signup
[POST]
(allows user to enter code to confirm their signup)
{user-confirmation}
/login
[POST]
(logs a user in)
{user-email, user-password }
=> user-id, id-token
/logout
<[POST]>
(logs a user out)
{id-token }
/refresh
<[POST]>
(refreshes logged in user's session)
{id-token, refresh-token}
=> id-token
/forgot-password
<[POST]>
(sends 'forgot password' email to logged in user)
{id-token }
/forgot-password
<[PUT]>
(resets logged in user's password)
{id-token, user-password}
/delete
<[DELETE]>
(deletes logged in user)
{id-token }
/library
/
<[POST]>
(creates a new image)
/
<[DELETE]>
(delete an existing image)
/
<[PUT]>
(update the name of an existing image)
/
<[GET]>
(retrieves all existing images from S3)
{user-id }
=> all existing images
/search
<[GET]>
(retrieves JSON containing matching terms from DB)
{terms }
=> results