-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrest.http
More file actions
56 lines (42 loc) · 957 Bytes
/
Copy pathrest.http
File metadata and controls
56 lines (42 loc) · 957 Bytes
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
@baseUrl = http://localhost:1198
### API status
GET {{baseUrl}}/
### Health
GET {{baseUrl}}/health
### Register user
POST {{baseUrl}}/api/auth/register
Content-Type: application/json
{
"name": "Notes User",
"email": "notes-user@example.com",
"password": "password123"
}
### Login user
POST {{baseUrl}}/api/auth/login
Content-Type: application/json
{
"email": "notes-user@example.com",
"password": "password123"
}
### Create note
POST {{baseUrl}}/api/notes
Content-Type: application/json
{
"title": "First note",
"content": "Note content goes here."
}
### Get my notes
GET {{baseUrl}}/api/notes
### Get one note
GET {{baseUrl}}/api/notes/PASTE_NOTE_ID_HERE
### Update note
PUT {{baseUrl}}/api/notes/PASTE_NOTE_ID_HERE
Content-Type: application/json
{
"title": "Updated note",
"content": "Updated note content."
}
### Delete note
DELETE {{baseUrl}}/api/notes/PASTE_NOTE_ID_HERE
### Logout user
POST {{baseUrl}}/api/auth/logout