-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathapi_localhost.http
136 lines (101 loc) · 2.23 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
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
@host = http://localhost:5001/api/v2
@token = 832be2bcb454b8a051d0ee870ddf1027
@session = bvaask7jt8q31pgv7nj8ufhipt
####
GET {{host}}/token?userId=2
Content-Type: application/json
Authorization: Bearer {{token}}
####
#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=2
Content-Type: application/json
Authorization: Bearer {{token}}
###
# send message
POST {{host}}/chat
Content-Type: application/json
Authorization: Bearer {{token}}
{
"content": "có",
"chatId": 3,
"role": 0,
"courseId": 3
}
###
# send message
POST {{host}}/chat
Content-Type: application/json
Authorization: Bearer {{token}}
{
"content": "những chương tôi cần xem lại",
"chatId": 3,
"role": 4,
"courseId": 11
}
###
# send message
POST {{host}}/chat
Content-Type: application/json
Authorization: Bearer {{token}}
{
"content": "Các tác phẩm chữ nôm nổi tiếng",
"chatId": 3,
"role": 1,
"courseId": 5
}
###
# delete chat
DELETE {{host}}/chat?chatid=3
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
Authorization: Bearer {{token}}
###
POST {{host}}/reminder
Content-Type: application/json
{
"name": "assign",
"mod_id": 1,
"title": "Tổng kết các triều đại từ sơ khai đến hậu hiện đại",
"user_id": 2,
"user": "Phat",
"course_id": 3,
"course": "Lịch sử Việt Phục",
"type_action": "was opened",
"time_action": "2024-10-14 00:57:02",
"time_reminder": "2024-10-14 00:57:02"
}
####
POST {{host}}/verify
Content-Type: application/json
{
"password": "1307x2Npk.",
"username": "phat"
}