webapi.xml 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. <?xml version="1.0"?>
  2. <!--
  3. /**
  4. * Copyright © Magento, Inc. All rights reserved.
  5. * See COPYING.txt for license details.
  6. */
  7. -->
  8. <routes xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Webapi:etc/webapi.xsd">
  9. <route method="GET" url="/V1/testmodule4/:id">
  10. <service class="Magento\TestModule4\Service\V1\DataObjectServiceInterface" method="getData" />
  11. <resources>
  12. <resource ref="Magento_TestModule4::resource1" />
  13. </resources>
  14. </route>
  15. <route method="GET" url="/V1/testmodule4/scalar/:id">
  16. <service class="Magento\TestModule4\Service\V1\DataObjectServiceInterface" method="scalarResponse" />
  17. <resources>
  18. <resource ref="Magento_TestModule4::resource1" />
  19. </resources>
  20. </route>
  21. <route method="POST" url="/V1/testmodule4/:id">
  22. <service class="Magento\TestModule4\Service\V1\DataObjectServiceInterface" method="updateData" />
  23. <resources>
  24. <resource ref="Magento_TestModule4::resource2" />
  25. </resources>
  26. </route>
  27. <route method="POST" url="/V1/testmodule4/:id/nested">
  28. <service class="Magento\TestModule4\Service\V1\DataObjectServiceInterface" method="nestedData" />
  29. <resources>
  30. <resource ref="Magento_TestModule4::resource3" />
  31. </resources>
  32. </route>
  33. <route method="POST" url="/V1/testmodule4/extensibleDataObject/:id">
  34. <service class="Magento\TestModule4\Service\V1\DataObjectServiceInterface" method="extensibleDataObject" />
  35. <resources>
  36. <resource ref="Magento_TestModule4::resource3" />
  37. </resources>
  38. </route>
  39. </routes>