-
Notifications
You must be signed in to change notification settings - Fork 1
/
api_localhost.http
96 lines (75 loc) · 1.66 KB
/
api_localhost.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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
@host = http://localhost:5001/api/v2
@token = 75921f4e01b6caad0dc2d0f966b876da
#health check
GET {{host}}
###
#GET TOKEN
GET {{host}}/token?userId=3
### update all document --- BE CAREFUL
GET {{host}}/document/all
### update all document into postgres --- BE CAREFUL
GET {{host}}/documentpostgre/all
### update all document into postgres --- BE CAREFUL
GET {{host}}/documentpostgre?id=21
Content-Type: application/json
Authorization: Bearer {{token}}
###
# get chat history
GET {{host}}/chat?chatid=3
Content-Type: application/json
Authorization: Bearer fds
###
# send message
POST {{host}}/chat
Content-Type: application/json
Authorization: Bearer {{token}}
{
"content": "make a poetry about cloud",
"chatId": 1,
"role": 3,
"courseId": 11
}
###
# send message
POST {{host}}/chat
Content-Type: application/json
Authorization: Bearer {{token}}
{
"content": "Tôi đang có những khóa học nào",
"chatId": 2,
"role": 2,
"courseId": 11
}
###
# delete chat
DELETE {{host}}chat?chatid=2
Authorization: Bearer {{token}}
###
GET {{host}}/get_user_info
Content-Type: application/json
Authorization: Bearer {{token}}
### SET UP TIME REMINDER
POST {{host}}/settime
Content-Type: application/json
{
"user_id": 2,
"status": 1,
"time": "22:54"
}
### GET UP TIME REMINDER
GET {{host}}/gettime
Content-Type: application/json
###
POST {{host}}/reminder
Content-Type: application/json
{
"name": "quiz",
"title": "câu hỏi ôn tập",
"user_id": 3,
"user": "Phat",
"course_id": 2,
"course": "Nôm",
"type_action": "was created",
"time_action": "2024-10-14 00:57:02",
"time_reminder": "2024-10-14 00:57:02"
}