-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconsents.http
66 lines (53 loc) · 2.23 KB
/
consents.http
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
60
61
62
63
64
65
66
@baseUrl = http://localhost:3000/v1/consents
@token = eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1dWlkIjoiY2M5ZGQ5NTItZjkyNS00ZjE2LWI2NDAtZTJhZTQ4NzQxMzk4IiwiaWF0IjoxNjM4MjgwMzc4LCJleHAiOjE2MzgyODEyNzgsImlzcyI6InN1cHBvcnRAZ3Jhbml0ZS5jb20iLCJqdGkiOiI1ODE0NWQyYi01NGJiLTRkYmYtOWNkOS1kYTljYThlODVhODcifQ.n_MAPVqUN-VMS5nP8iW31HOU7zjdlm-EMC30wf_vIrQ
########################################################################
########### AUTH ###########
########################################################################
### Authenticates a user
POST {{baseUrl}}/auth/login HTTP/1.1
Accept: application/json
Content-Type: application/json
{
"email": "john.doe@example.com",
"password": "myS3cretP@55w0rd!"
}
########################################################################
########### EVENT ###########
########################################################################
### Creates a new consent event for the authenticated user
POST {{baseUrl}}/events HTTP/1.1
Accept: application/json
Content-Type: application/json
Authorization: Bearer {{token}}
{
"id": "email_notifications",
"enabled": true
}
########################################################################
########### HEALTH ###########
########################################################################
### Get health status
GET {{baseUrl}}/health HTTP/1.1
Accept: application/json
Content-Type: application/json
########################################################################
########### USER ###########
########################################################################
### Get the authenticated user's profile
GET {{baseUrl}}/user HTTP/1.1
Accept: application/json
Content-Type: application/json
Authorization: Bearer {{token}}
### Delete the authenticated user's account
DELETE {{baseUrl}}/user HTTP/1.1
Accept: application/json
Content-Type: application/json
Authorization: Bearer {{token}}
### Register a new user
POST {{baseUrl}}/users/registration HTTP/1.1
Accept: application/json
Content-Type: application/json
{
"email": "john.doe@example.com",
"password": "myS3cretP@55w0rd!"
}