diff --git a/etc/webapi.xml b/etc/webapi.xml new file mode 100755 index 0000000000000000000000000000000000000000..50ca8f2c7e3fe645fa139799a522d859f7648e97 --- /dev/null +++ b/etc/webapi.xml @@ -0,0 +1,22 @@ +<?xml version="1.0"?> +<routes xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Webapi:etc/webapi.xsd"> + <!-- Category Widget --> + <route url="/V1/categorywidget/:sliderId" method="GET"> + <service class="NicolasBejean\CategoryWidget\Api\CategoryWidgetRepositoryInterface" method="getById"/> + <resources> + <resource ref="NicolasBejean_CategoryWidget::global"/> + </resources> + </route> + <route url="/V1/categorywidget/search" method="GET"> + <service class="NicolasBejean\CategoryWidget\Api\CategoryWidgetRepositoryInterface" method="getList"/> + <resources> + <resource ref="NicolasBejean_CategoryWidget::global"/> + </resources> + </route> + <route url="/V1/categorywidget/:categoryWigetId" method="DELETE"> + <service class="NicolasBejean\CategoryWidget\Api\CategoryWidgetRepositoryInterface" method="deleteById"/> + <resources> + <resource ref="NicolasBejean_CategoryWidget::delete"/> + </resources> + </route> +</routes>