1313 -H "Content-Type:application/json" \
1414 -d '{"username":"username", "password":"userpassword"}' -->
1515
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" \
1717 -H "Authorization: Bearer XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" \
1818 -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" >
2121 <service class =" Magefan\Blog\Api\PostManagementInterface" method =" create" />
2222 <resources >
2323 <resource ref =" Magefan_Blog::post" />
2424 </resources >
2525 </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 " \
2727 -H "Authorization: Bearer XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" \
2828 -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 " >
3131 <service class =" Magefan\Blog\Api\PostManagementInterface" method =" update" />
3232 <resources >
3333 <resource ref =" Magefan_Blog::post" />
3434 </resources >
3535 </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 " \
3737 -H "Authorization: Bearer XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" -->
38- <route url =" /V1/blog/post/delete/ :id/ " method =" GET " >
38+ <route url =" /V1/blog/post/:id" method =" DELETE " >
3939 <service class =" Magefan\Blog\Api\PostManagementInterface" method =" delete" />
4040 <resources >
4141 <resource ref =" Magefan_Blog::post" />
4242 </resources >
4343 </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" \
4545 -H "Authorization: Bearer XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" \
4646 -H "Content-Type:application/json" \
4747 -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" >
4949 <service class =" Magefan\Blog\Api\CategoryManagementInterface" method =" create" />
5050 <resources >
5151 <resource ref =" Magefan_Blog::category" />
5252 </resources >
5353 </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 " \
5555 -H "Authorization: Bearer XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" \
5656 -H "Content-Type:application/json" \
5757 -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 " >
5959 <service class =" Magefan\Blog\Api\CategoryManagementInterface" method =" update" />
6060 <resources >
6161 <resource ref =" Magefan_Blog::category" />
6262 </resources >
6363 </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 " \
6565 -H "Authorization: Bearer XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" -->
66- <route url =" /V1/blog/category/delete/ :id/ " method =" GET " >
66+ <route url =" /V1/blog/category/:id" method =" DELETE " >
6767 <service class =" Magefan\Blog\Api\CategoryManagementInterface" method =" delete" />
6868 <resources >
6969 <resource ref =" Magefan_Blog::category" />
7070 </resources >
7171 </route >
72- </routes >
72+ </routes >
0 commit comments