Forum Discussion

ttadej's avatar
ttadej
Advisor
7 years ago

API call for pending group requests?

This count is rendered in the group-stats component but I cannot find an API call to get this number. My objective is to make it easier to see a count of how many group requests are pending.. right now the pending/requests tab has no count and renders even if there aren't any pending requests.

 

My next idea would be to render the group-stats widget and just grab the text with Javascript, however the group-stats component is not rendering on the GroupMembersPage for me, only the GroupPage.

1 Reply

  • ttadej- As there is no API call for the pending request, I would suggest you to open an idea for this. 

     

    Regarding the component, some component works for respective pages, you can not use it any other page. A dirty hack which you can use.

     

    1. Make an ajax call to community-url/t5/groups/groupmemberspage/group-id/<id>/tab/pending from group page.

    2. It will return the HTML of the page, you will need to extract pending invites from the HTML, using some regex and jquery tricks and show it on a group page.

     

    I know this is a dirty hack to achieve this but the only way.

     

    Also, there is metrics for pending request https://prnt.sc/ixlk42 which you can get using REST API https://community.lithium.com/t5/Admin-Metrics/Retrieving-metrics-using-the-REST-API/ta-p/7671, however, not sure if you can achieve this for a single group.