Forum Discussion
13 Replies
- DamianI12 years agoLithium Alumni (Retired)Hello,
We are checking on this with our PM and will get back to you with more information.
Kind regards,
Damian - DamianI12 years agoLithium Alumni (Retired)
Hello,
Please, excuse us for this delay. It seems that we currently do not have an API call to support this use case.
We suggest that you create an Idea on our own Lithosphere Idea Exchange (http://lithosphere.lithium.com/t5/Suggest-Your-Ideas/idb-p/Lithium_Ideas). Our Product Management team actively reviews these Ideas and engages with our customers for their feedback. Additionally, you can discuss other ideas, find workarounds and see what Ideas our other customers have here.
Please let us know if you have any further questions or concerns.
Kind regards,
Damian - JeffSp12 years agoLithium Alumni (Retired)
For reference, here's how to get all reviews for a product, including sort options: http://lithosphere.lithium.com/t5/rest-api/bd-p/developers-rest-api?leaf-id=Product.reviews#Product.reviews.messages ?
-- Jeff
- MichaelD12 years agoLithium Alumni (Retired)The 13.6 release added a rest api to fetch all products:
/restapi/vc/products/all
Hope this helps! - thilo11 years agoMentor
Hi,
We're also looking for this functionality.
I found this call on the API (1)
http://community.lithium.com/community-name/restapi/vc/ratings/key/[key] /ratings/leaderboard
According to the documentation this should return the targets sorted by their average rating, right?
But I didn't manage to issue this call on our lithium instance. I always get a Error code 303 "access denied".
1) Could you explain what the parameter "key" means for this call
and
2) Are there any settings restricting this call or what do I have to do to make it work? I also tried to issue the call with an Administrator user which led to the same result.
Thanks a lot!
Kind regards
thilo
MichaelD : The call to returns all products, but there's no rating information.
/restapi/vc/products/all
I also don't think the products are order by rating, right?
- MichaelD11 years agoLithium Alumni (Retired)The rest endpoint for returning all products currently has no relationship to rating. This means no rating information is returned with the call and the order in which products are returned has no relationship to the rating of the product.
- MichaelD11 years agoLithium Alumni (Retired)A product is not required to have associated rating information. This is the reason that the /restapi/vc/products/all was implemented such that all products would be returned independent of the rating.
Once you have obtained the id for a product you will be able to call the endpoint /restapi/vc/products/id/34/ratings/key/key to obtain the rating information for the product.
Presently the rest API does not provide a single endpoint for obtaining a list of products ordered by ratings. But the two endpoints discussed here can be used to build such a list.
I hope this helps. MichaelD gosh! as we're having something around 200k products, this would mean we'd have to more than 200k calls to retrieve the top 10 products? (case: live request - no caching)
Thanks for your FAST replies, very helpful.
Related Content
- 3 months ago
- 6 months ago