Forum Discussion
irfansofttech
Helper
Is there any API playground or API web Ui testing feature available? So that I can figure our the issue. I got 500 in response
Parshant
8 years agoBoss
Hi irfansofttech,
Before making a Community API v2 Create, Update, or Delete call, use the /allowed endpoint to ensure that the current user is allowed to perform the action. You can use the response, for example, to determine whether or not to display a button to give kudos or write a product review.
Say you need to make a POST call to add a kudo to an image (image ID=74):
https://api.lithium.com/community/2.0/<mytenantid>/images/74/kudos
check to see if that call was allowed:
https://api.lithium.com/community/2.0/<mytenantid>/allowed?method=post&path=images/74/kudos
Depending on the result (true or false), you might choose to gray out the give kudos button, not show it at all, display a message if the user cannot perform the action, or some other option.
Note that you do not use the /allowed endpoint for Read/GET calls. LiQL queries automatically return results based on the privileges and permission of the user making the call.
Before making a Community API v2 Create, Update, or Delete call, use the /allowed endpoint to ensure that the current user is allowed to perform the action. You can use the response, for example, to determine whether or not to display a button to give kudos or write a product review.
Say you need to make a POST call to add a kudo to an image (image ID=74):
https://api.lithium.com/community/2.0/<mytenantid>/images/74/kudos
check to see if that call was allowed:
https://api.lithium.com/community/2.0/<mytenantid>/allowed?method=post&path=images/74/kudos
Depending on the result (true or false), you might choose to gray out the give kudos button, not show it at all, display a message if the user cannot perform the action, or some other option.
Note that you do not use the /allowed endpoint for Read/GET calls. LiQL queries automatically return results based on the privileges and permission of the user making the call.
Related Content
- 30 days ago
- 7 years ago
- 10 months ago
- 5 months ago
- 9 years ago