13
13
-H "Content-Type:application/json" \
14
14
-d '{"username":"username", "password":"userpassword"}' -->
15
15
16
- <!-- Example: curl -X POST "http://mystore.com/index.php/rest/V1/blog/post/create/ " \
16
+ <!-- Example: curl -X POST "http://mystore.com/index.php/rest/V1/blog/post" \
17
17
-H "Authorization: Bearer XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" \
18
18
-H "Content-Type:application/json" \
19
- -d '{"data":"{\"param_1 \":\"value_1\",\"param_2 \":\"value_2\" ,\"param_n \":\"value_n \"}"}' -->
20
- <route url =" /V1/blog/post/create " method =" POST" >
19
+ -d '{"data":"{\"title \":\"value_1\",\"content \":"Test",\"is_active\":1 ,\"store_ids \":\"0 \"}"}' -->
20
+ <route url =" /V1/blog/post" method =" POST" >
21
21
<service class =" Magefan\Blog\Api\PostManagementInterface" method =" create" />
22
22
<resources >
23
23
<resource ref =" Magefan_Blog::post" />
24
24
</resources >
25
25
</route >
26
- <!-- Example: curl -X POST "http://mystore.com/index.php/rest/V1/blog/post/update/postId/ " \
26
+ <!-- Example: curl -X PUT "http://mystore.com/index.php/rest/V1/blog/post/:id " \
27
27
-H "Authorization: Bearer XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" \
28
28
-H "Content-Type:application/json" \
29
- -d '{"data":"{\"param_1 \":\"new_value_1 \",\"param_2 \":\"new_value_2\" ,\"param_n \":\"new_value_n \"}"}' -->
30
- <route url =" /V1/blog/post/update/ :id/ " method =" POST " >
29
+ -d '{"data":"{\"title \":\"value_1 \",\"content \":"Test2",\"is_active\":1 ,\"store_ids \":\"0 \"}"}' -->
30
+ <route url =" /V1/blog/post/:id" method =" PUT " >
31
31
<service class =" Magefan\Blog\Api\PostManagementInterface" method =" update" />
32
32
<resources >
33
33
<resource ref =" Magefan_Blog::post" />
34
34
</resources >
35
35
</route >
36
- <!-- Example: curl -X GET "http://mystore.com/m2_21/ index.php/rest/V1/blog/post/delete/postId/ " \
36
+ <!-- Example: curl -X DELETE "http://mystore.com/index.php/rest/V1/blog/post/:id " \
37
37
-H "Authorization: Bearer XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" -->
38
- <route url =" /V1/blog/post/delete/ :id/ " method =" GET " >
38
+ <route url =" /V1/blog/post/:id" method =" DELETE " >
39
39
<service class =" Magefan\Blog\Api\PostManagementInterface" method =" delete" />
40
40
<resources >
41
41
<resource ref =" Magefan_Blog::post" />
42
42
</resources >
43
43
</route >
44
- <!-- Example: curl -X POST "http://mystore.com/index.php/rest/V1/blog/category/create/ " \
44
+ <!-- Example: curl -X POST "http://mystore.com/index.php/rest/V1/blog/category" \
45
45
-H "Authorization: Bearer XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" \
46
46
-H "Content-Type:application/json" \
47
47
-d '{"data":"{\"param_1\":\"value_1\",\"param_2\":\"value_2\",\"param_n\":\"value_n\"}"}' -->
48
- <route url =" /V1/blog/category/create " method =" POST" >
48
+ <route url =" /V1/blog/category" method =" POST" >
49
49
<service class =" Magefan\Blog\Api\CategoryManagementInterface" method =" create" />
50
50
<resources >
51
51
<resource ref =" Magefan_Blog::category" />
52
52
</resources >
53
53
</route >
54
- <!-- Example: curl -X POST "http://mystore.com/index.php/rest/V1/blog/category/update/categoryId/ " \
54
+ <!-- Example: curl -X PUT "http://mystore.com/index.php/rest/V1/blog/category/:id " \
55
55
-H "Authorization: Bearer XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" \
56
56
-H "Content-Type:application/json" \
57
57
-d '{"data":"{\"param_1\":\"new_value_1\",\"param_2\":\"new_value_2\",\"param_n\":\"new_value_n\"}"}' -->
58
- <route url =" /V1/blog/category/update/ :id/ " method =" POST " >
58
+ <route url =" /V1/blog/category/:id" method =" PUT " >
59
59
<service class =" Magefan\Blog\Api\CategoryManagementInterface" method =" update" />
60
60
<resources >
61
61
<resource ref =" Magefan_Blog::category" />
62
62
</resources >
63
63
</route >
64
- <!-- Example: curl -X GET "http://mystore.com/m2_21/ index.php/rest/V1/blog/post/ category/categoryId/ " \
64
+ <!-- Example: curl -X DELETE "http://mystore.com/index.php/rest/V1/blog/category/:id " \
65
65
-H "Authorization: Bearer XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" -->
66
- <route url =" /V1/blog/category/delete/ :id/ " method =" GET " >
66
+ <route url =" /V1/blog/category/:id" method =" DELETE " >
67
67
<service class =" Magefan\Blog\Api\CategoryManagementInterface" method =" delete" />
68
68
<resources >
69
69
<resource ref =" Magefan_Blog::category" />
70
70
</resources >
71
71
</route >
72
- </routes >
72
+ </routes >
0 commit comments