-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathToDoListWebApiTest.txt
97 lines (76 loc) · 1.53 KB
/
ToDoListWebApiTest.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
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
testowe jsony do mojego WebApi
Login
POST /login
{
"email" : "kk",
"Password" : "kk"
}
Logout
POST /logout
{
"SessionId": 51
}
Register a new user
POST /users
{
"FirstName" : "OJEJU",
"LastName" : "AHA",
"email" : "email_test",
"password_test" : "password_test"
}
Create a new todolist
POST /todolists
{
"SessionId" : 51,
"ListName" : "ZupelnieNowaListaZWebApi"
}
Get todolist's list
GET /todolists
http://localhost:54750//api/todolists?sessionId=51
Get single todolist
GET /todolists/{id}
http://localhost:54750//api/todolists/30?sessionId=868
Add a task to todolist
POST /todolists/{todolistid}/tasks
http://localhost:54750//api/todolists/{todolistid}/tasks
{
"Task" : {
"TaskName" : "WebApiTaskName1",
"TaskDesc" : "WebApiTaskDesc1",
"ParentListId" : 30
},
"SessionId" :
}
Update a todolist
PUT /todolists/{id}
http://localhost:54750//api/todolists/{id}
{
"List" : {
"ListId" : 30,
"ListName" : "ZupelnieNowa3teraz4"
},
"SessionId" : 868
}
Delete a todolist
DELETE /todolists/{id}
http://localhost:54750//api/todolists/{id}
{
"SessionId" : 868
}
Update a task
PUT /todolists/{todolistid }/tasks/{taskid}
http://localhost:54750//api/todolists/{listid}/tasks/{taskid}
{
"Task" : {
"TaskId" : 49,
"TaskName" : "WebApiTaskName1popr",
"TaskDesc" : "WebApiTaskDesc1popr"
},
"SessionId" : 868
}
Delete a task
DELETE /todolists/{todolistid}/tasks/{taskid}
http://localhost:54750//api/todolists/{listid}/tasks/{taskid}
{
"SessionId" : 868
}