You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: versioned_docs/version-2.0.0/quickstart/express-postgresql-prisma.md
+65Lines changed: 65 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -178,8 +178,27 @@ The above command will start recording the API calls made to the application and
178
178
179
179
Make API Calls using [Hoppscotch](https://hoppscotch.io/), [Postman](https://www.postman.com/) or [cURL](https://curl.se/) command. Keploy with capture those calls to generate the test-suites containing testcases and data mocks.
180
180
181
+
### API Routes
182
+
181
183
#### Add Task
182
184
185
+
186
+
- **URL:**`/api/v1/task/add`
187
+
- **Method:**`POST`
188
+
- **Description:** Add a new task.
189
+
- **Request Body:**
190
+
```json
191
+
{
192
+
"author": "John Doe",
193
+
"title": "Complete the report",
194
+
"description": "Complete the quarterly report by end of the week",
195
+
"dueDate": "2024-08-01",
196
+
"status": "Pending",
197
+
"priority": 3
198
+
}
199
+
```
200
+
201
+
Using `curl`
183
202
```bash
184
203
curl -X 'POST' \
185
204
'http://localhost:3000/api/v1/task/add' \
@@ -198,6 +217,7 @@ curl -X 'POST' \
198
217
199
218
#### View All Tasks
200
219
220
+
Using `curl`
201
221
```bash
202
222
curl -X 'GET' \
203
223
'http://localhost:3000/api/v1/task/view' \
@@ -207,6 +227,15 @@ curl -X 'GET' \
207
227
208
228
#### View Task by ID
209
229
230
+
231
+
- **URL:**`/api/v1/task/view/:id`
232
+
- **Method:**`GET`
233
+
- **Description:** Retrieve a specific task by its ID.
234
+
- **Request Params:**`id` (task ID)
235
+
236
+
237
+
Using `curl`
238
+
210
239
```bash
211
240
curl -X 'GET' \
212
241
'http://localhost:3000/api/v1/task/view/1' \
@@ -216,6 +245,18 @@ curl -X 'GET' \
216
245
217
246
#### Change Task Priority
218
247
248
+
- **URL:**`/api/v1/task/change-priority/:id`
249
+
- **Method:**`PUT`
250
+
- **Description:** Update the priority of a specific task.
- **Description:** Update details of a specific task.
275
+
- **Request Params:**`id` (task ID)
276
+
- **Request Body:**
277
+
```json
278
+
{
279
+
"author": "John Doe",
280
+
"title": "Complete the report",
281
+
"description": "Complete the quarterly report by end of the week",
282
+
"dueDate": "2024-08-01",
283
+
"status": "Pending",
284
+
"priority": 3
285
+
}
286
+
```
287
+
288
+
Using `curl`
231
289
```bash
232
290
curl -X 'PUT' \
233
291
'http://localhost:3000/api/v1/task/update/2' \
@@ -245,12 +303,19 @@ curl -X 'PUT' \
245
303
246
304
#### Delete Task
247
305
306
+
- **URL:**`/api/v1/task/delete/:id`
307
+
- **Method:**`DELETE`
308
+
- **Description:** Delete a specific task.
309
+
- **Request Params:**`id` (task ID)
310
+
311
+
Using `curl`
248
312
```bash
249
313
curl -X 'DELETE' \
250
314
'http://localhost:3000/api/v1/task/delete/1' \
251
315
-H 'accept: application/json'
252
316
```
253
317
318
+
254
319
> 🐰 Test Data and Configuration: After recording the interactions, a `keploy` folder will be created containing the recorded test data. Additionally, a `keploy.yml` file will be created as the configuration file.
0 commit comments