Is there a API in PopRestStore which can get All the Products

I’m exploring PopRestStore REST Api’s, can anyone help me find API giving all the products like API exists for getting products from a particular category but I want all the products irrespective of their category.

Link: GitHub - moqui/PopRestStore: REST API for eCommerce and an in-browser eCommerce application built with Vue JS

Thanks in advance!

Here are three different options:

  1. The /products/SearchProducts should be able to pull all products by not specifying an id: Swagger UI
  2. Using the Master Entity API’s product endpoint should work (although you may need to configure artifacts to allow your user to reach it): Swagger UI
  3. If you want to get all the products in a store you can expose a REST endpoint with the popstore.ProductServices.get#ViewAllowProducts service exposed (which is what is used in PopRestStore to get all products)
    PopRestStore/ProductServices.xml at 3a4efbdce07ab9b1f3a4b2dbac9854651667b159 · moqui/PopRestStore · GitHub

Welcome to the Moqui Forum, and let me know if you need more help!

Hi Michael,
/products/SearchProducts must pull all the products but it is only returning an empty list when no id is passed.
and I tried to use ViewAllProduct service but the swagger UI is not working
error: "Parameter productList of service popstore.ProductServices.get#ViewAllowProducts is an array type but has no child parameter (should have one, name ignored), may cause error in Swagger, etc
What I’m doing wrong?

@ohma You’re not doing anything wrong. It’s the nature of software to not work, because the amount of permutations of input primarily include an outcome that is not intended.

With this PR the REST API should work as intended:

Thanks, @michael, your code worked but @jonesde has commented that it is not meaningful. @jonesde can you help me get all the products and categories also?