-
Notifications
You must be signed in to change notification settings - Fork 0
/
rest.http
111 lines (75 loc) · 2.32 KB
/
rest.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
### get courses
GET http://localhost:7800/api/courses HTTP/1.1
### get questions
GET http://localhost:7800/api/questions HTTP/1.1
### get answers
GET http://localhost:7800/api/answers HTTP/1.1
### get all questions votes
GET http://localhost:7800/api/votes/question HTTP/1.1
### get all answers votes
GET http://localhost:7800/api/votes/answer HTTP/1.1
### get/generate user uuid
GET http://localhost:7800/api/user/uuid HTTP/1.1
### post new question with courseId params
POST http://localhost:7800/api/questions/3 HTTP/1.1
Content-Type: application/json
{
"user_uuid": "c6fdc5f4-afda-4cf4-b9e9-95b7f2951e42",
"title": "Sample Question Fortran",
"details": "Sample details fortran"
}
### post new answer with courseId params and question_id search params
POST http://localhost:7800/api/answers/2?question_id=1 HTTP/1.1
Content-Type: application/json
{
"user_uuid": "c6fdc5f4-afda-4cf4-b9e9-95b7f2951e42",
"details": "Sample details fortran"
}
### add new question vote
POST http://localhost:7800/api/vote/question?question_id=1 HTTP/1.1
Content-Type: application/json
{
"user_uuid": "c6fdc5f4-afda-4cf4-b9e9-95b7f2951e42"
}
### add new answer vote
POST http://localhost:7800/api/vote/answer?answer_id=1 HTTP/1.1
Content-Type: application/json
{
"user_uuid": "c6fdc5f4-afda-4cf4-b9e9-95b7f2951e42"
}
### generate LLM answers
POST http://localhost:7800/llm/ HTTP/1.1
Content-Type: application/json
{
"question": "How to write Hello, world! in Fortran?"
}
### update question withautomatedanswer with questionId param
PATCH http://localhost:7800/api/question/2 HTTP/1.1
Content-Type: application/json
{
"withautomatedanswer": true
}
### update question vote with questionId params
PATCH http://localhost:7800/api/question/votes/2 HTTP/1.1
Content-Type: application/json
{
"votes": 3
}
### update answer vote with answerId params
PATCH http://localhost:7800/api/answer/votes/2 HTTP/1.1
Content-Type: application/json
{
"votes": 2
}
######################################
## Dockerize and in K8s
#### all courses dockerize
GET http://localhost:7777/courses HTTP/1.1
### LLM Get request
GET http://127.0.0.1:7001 HTTP/1.1
### generate LLM answers dockerize
POST http://127.0.0.1:7001/ HTTP/1.1
Content-Type: application/json
{
"question": "How to write Hello, world! in Fortran?"
}