Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Reading product data (Magnolia REST API)

Code Block
// not useful for front-end clients:
GET /nodes/v1/shopProducts/[path_to_shop_products]/?depth=[depth]&excludeNodeTypes=[node,types,to,exclude]
// better (contains what is really needed):
GET /v1/shop/{shopName}/products?category={category}
  • Standard Magnolia REST API?
  • depth describes how many levels down in the JCR tree you want to go (from the starting point)
  • excludeNodeTypes is probably only necessary when you fetch all products right from the root > you can exclude "technical" nodes like rep:Activities,rep:system,rep:AccessControl...

NOTE: Probably custom api needed here as well as the nodes endpoint returns data which is not very useful for a frontend app.Missing: There should also be an easy way to get all products of a product category! The standard "nodes" Magnolia REST endpoint does not really return what would be needed by a front-end app: Too much clutter, image uuids instead of links, cannot be limited to a category... Therefore a "products" method in the shop endpoint is more useful:

  • returns the list of products
  • optionally limited to the products of a category

Search...

TBD

Shopping cart actions

...