Skip to content

Commit a4cd98b

Browse files
committed
Merge pull request #927 from SchumacherFM/catalogWebApiRouteRenameGet
GET: Unifying REST API searches with the interface method getList() (MAGETWO-32464)
2 parents a1ab120 + 20ffc3f commit a4cd98b

File tree

5 files changed

+14
-26
lines changed

5 files changed

+14
-26
lines changed

app/code/Magento/Catalog/etc/webapi.xml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
<resource ref="Magento_Catalog::products" />
2727
</resources>
2828
</route>
29-
<route url="/V1/products" method="PUT">
29+
<route url="/V1/products" method="GET">
3030
<service class="Magento\Catalog\Api\ProductRepositoryInterface" method="getList"/>
3131
<resources>
3232
<resource ref="Magento_Catalog::products" />
@@ -51,7 +51,7 @@
5151
<resource ref="Magento_Catalog::attributes_attributes" />
5252
</resources>
5353
</route>
54-
<route url="/V1/products/attributes" method="PUT">
54+
<route url="/V1/products/attributes" method="GET">
5555
<service class="Magento\Catalog\Api\ProductAttributeRepositoryInterface" method="getList" />
5656
<resources>
5757
<resource ref="Magento_Catalog::attributes_attributes" />
@@ -63,7 +63,7 @@
6363
<resource ref="Magento_Catalog::attributes_attributes" />
6464
</resources>
6565
</route>
66-
<route url="/V1/categories/attributes" method="PUT">
66+
<route url="/V1/categories/attributes" method="GET">
6767
<service class="Magento\Catalog\Api\CategoryAttributeRepositoryInterface" method="getList" />
6868
<resources>
6969
<resource ref="Magento_Catalog::attributes_attributes" />
@@ -99,7 +99,7 @@
9999
<resource ref="Magento_Catalog::products"/>
100100
</resources>
101101
</route>
102-
<route url="/V1/products/attribute-sets/sets/list" method="PUT">
102+
<route url="/V1/products/attribute-sets/sets/list" method="GET">
103103
<service class="Magento\Catalog\Api\AttributeSetRepositoryInterface" method="getList"/>
104104
<resources>
105105
<resource ref="Magento_Catalog::sets"/>
@@ -147,7 +147,7 @@
147147
<resource ref="Magento_Catalog::sets"/>
148148
</resources>
149149
</route>
150-
<route url="/V1/products/attribute-sets/groups/list" method="PUT">
150+
<route url="/V1/products/attribute-sets/groups/list" method="GET">
151151
<service class="Magento\Catalog\Api\ProductAttributeGroupRepositoryInterface" method="getList"/>
152152
<resources>
153153
<resource ref="Magento_Catalog::sets"/>

app/code/Magento/Customer/etc/webapi.xml

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -31,12 +31,6 @@
3131
<resource ref="Magento_Customer::group"/>
3232
</resources>
3333
</route>
34-
<route url="/V1/customerGroups/search" method="POST">
35-
<service class="Magento\Customer\Api\GroupRepositoryInterface" method="getList"/>
36-
<resources>
37-
<resource ref="Magento_Customer::group"/>
38-
</resources>
39-
</route>
4034
<route url="/V1/customerGroups/search" method="GET">
4135
<service class="Magento\Customer\Api\GroupRepositoryInterface" method="getList"/>
4236
<resources>
@@ -160,12 +154,6 @@
160154
<parameter name="customerId" force="true">%customer_id%</parameter>
161155
</data>
162156
</route>
163-
<route url="/V1/customers/search" method="POST">
164-
<service class="Magento\Customer\Api\CustomerRepositoryInterface" method="getList"/>
165-
<resources>
166-
<resource ref="Magento_Customer::customer"/>
167-
</resources>
168-
</route>
169157
<route url="/V1/customers/search" method="GET">
170158
<service class="Magento\Customer\Api\CustomerRepositoryInterface" method="getList"/>
171159
<resources>

app/code/Magento/Eav/etc/webapi.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
-->
77
<routes xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
88
xsi:noNamespaceSchemaLocation="../../../../../app/code/Magento/Webapi/etc/webapi.xsd">
9-
<route url="/V1/eav/attribute-sets/list" method="PUT">
9+
<route url="/V1/eav/attribute-sets/list" method="GET">
1010
<service class="Magento\Eav\Api\AttributeSetRepositoryInterface" method="getList"/>
1111
<resources>
1212
<resource ref="Magento_Catalog::sets"/>

app/code/Magento/Sales/etc/webapi.xml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
<resource ref="Magento_Sales::sales" />
1313
</resources>
1414
</route>
15-
<route url="/V1/orders" method="PUT">
15+
<route url="/V1/orders" method="GET">
1616
<service class="Magento\Sales\Api\OrderRepositoryInterface" method="getList"/>
1717
<resources>
1818
<resource ref="Magento_Sales::sales" />
@@ -78,7 +78,7 @@
7878
<resource ref="Magento_Sales::sales" />
7979
</resources>
8080
</route>
81-
<route url="/V1/invoices" method="PUT">
81+
<route url="/V1/invoices" method="GET">
8282
<service class="Magento\Sales\Api\InvoiceRepositoryInterface" method="getList"/>
8383
<resources>
8484
<resource ref="Magento_Sales::sales" />
@@ -126,7 +126,7 @@
126126
<resource ref="Magento_Sales::sales" />
127127
</resources>
128128
</route>
129-
<route url="/V1/creditmemos" method="PUT">
129+
<route url="/V1/creditmemos" method="GET">
130130
<service class="Magento\Sales\Api\CreditmemoRepositoryInterface" method="getList"/>
131131
<resources>
132132
<resource ref="Magento_Sales::sales" />
@@ -168,7 +168,7 @@
168168
<resource ref="Magento_Sales::sales" />
169169
</resources>
170170
</route>
171-
<route url="/V1/shipments" method="PUT">
171+
<route url="/V1/shipments" method="GET">
172172
<service class="Magento\Sales\Api\ShipmentRepositoryInterface" method="getList"/>
173173
<resources>
174174
<resource ref="Magento_Sales::sales" />
@@ -228,7 +228,7 @@
228228
<resource ref="Magento_Sales::sales" />
229229
</resources>
230230
</route>
231-
<route url="/V1/transactions" method="PUT">
231+
<route url="/V1/transactions" method="GET">
232232
<service class="Magento\Sales\Api\TransactionRepositoryInterface" method="getList"/>
233233
<resources>
234234
<resource ref="Magento_Sales::sales" />

app/code/Magento/Tax/etc/webapi.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
<resource ref="Magento_Tax::manage_tax"/>
3131
</resources>
3232
</route>
33-
<route url="/V1/taxRate/search" method="PUT">
33+
<route url="/V1/taxRate/search" method="GET">
3434
<service class="Magento\Tax\Api\TaxRateRepositoryInterface" method="getList"/>
3535
<resources>
3636
<resource ref="Magento_Tax::manage_tax"/>
@@ -60,7 +60,7 @@
6060
<resource ref="Magento_Tax::manage_tax"/>
6161
</resources>
6262
</route>
63-
<route url="/V1/taxRules/search" method="PUT">
63+
<route url="/V1/taxRules/search" method="GET">
6464
<service class="Magento\Tax\Api\TaxRuleRepositoryInterface" method="getList"/>
6565
<resources>
6666
<resource ref="Magento_Tax::manage_tax"/>
@@ -90,7 +90,7 @@
9090
<resource ref="Magento_Tax::manage_tax"/>
9191
</resources>
9292
</route>
93-
<route url="/V1/taxClass/search" method="PUT">
93+
<route url="/V1/taxClass/search" method="GET">
9494
<service class="Magento\Tax\Api\TaxClassRepositoryInterface" method="getList"/>
9595
<resources>
9696
<resource ref="Magento_Tax::manage_tax"/>

0 commit comments

Comments
 (0)