forked from Azure-Samples/copilot-openai-todo
-
Notifications
You must be signed in to change notification settings - Fork 0
/
api.http
29 lines (21 loc) · 735 Bytes
/
api.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
##################################################################
# VS Code with REST Client extension is needed to use this file.
# Download at: https://aka.ms/vscode/rest-client
##################################################################
@api_host = http://localhost:3000
@user_id = test123
@task_id = 123
### Get all tasks for a user
GET {{api_host}}/api/users/{{user_id}}/tasks
### Create task
POST {{api_host}}/api/users/{{user_id}}/tasks
content-type: application/json
{ "title": "test API" }
### Get task
GET {{api_host}}/api/tasks/{{task_id}}
### Update task
PATCH {{api_host}}/api/tasks/{{task_id}}
content-type: application/json
{ "completed": true }
### Delete task
DELETE {{api_host}}/api/tasks/{{task_id}}