-
Notifications
You must be signed in to change notification settings - Fork 0
/
endpoints.txt
48 lines (37 loc) · 1.68 KB
/
endpoints.txt
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
GET http://localhost:5000/ - splash page
GET http://localhost:5000/remotetasks -list all tasks on MongoDB
GET http://localhost:5000/localtasks -list all tasks on local tasklist.json file
GET http://localhost:5000/localtasks/2?id - find task with id of 2 in local store
GET http://localhost:5000/remotetasks/2?id - NOT WORKING
GET http://localhost:5000/download - Save remote tasks to local database
POST ALL local tasks to remote mongo
curl -X POST \
http://localhost:5000/ \
-H 'cache-control: no-cache' \
-H 'content-type: application/json'
POST new task manually from CLI
curl -X POST \
http://localhost:5000/tasks \
-H 'cache-control: no-cache' \
-H 'content-type: application/json' \
-d '{"id": "id", "task": "task_name", "done": "false"}'
PATCH - check/uncheck remote task as resolved by id has
curl -X PATCH \
http://localhost:5000/remoteresolve/59ce541864ac702536647fdd?id \
-H 'cache-control: no-cache' \
-H 'content-type: application/json'
PATCH - check/uncheck ALL remote task as resolved
curl -X PATCH \
http://localhost:5000/remoteresolveall \
-H 'cache-control: no-cache' \
-H 'content-type: application/json'
DELETE a remote task by _id
curl -X DELETE \
http://localhost:5000/remotetasks/59ce517c8f190121c4b6ede1?id \
-H 'cache-control: no-cache' \
-H 'content-type: application/json'
DELETE all remote
curl -X DELETE \
http://localhost:5000/remotedeleteall \
-H 'cache-control: no-cache' \
-H 'content-type: application/json'