Share via

Rest API Get with a condition

Shiv Sharma 1 Reputation point MVP
2020-07-29T03:58:42.09+00:00

I have two columns :

1- ManagerEmail- This contains the manager emails

2- Status - values saved in this are Pending , Approved , Rejected.

Requirement : Want to fetch only those manager's emails whose status value pending count is more then 25 )

As i have to send mail those manager whose pending status exceed 25 request. I have mail code but i am confuse in Rest API End Point query for this senario

Community Center | Not monitored
0 comments No comments

1 answer

Sort by: Most helpful
  1. Vahid Ghafarpour 23,605 Reputation points
    2023-09-18T18:34:56.6033333+00:00

    You can structure your query as:

    GET /your-api-endpoint?filter=Status eq 'Pending'&$count=true&$apply=groupby((ManagerEmail),aggregate(Status, countdistinct as PendingCount))&$filter=PendingCount gt 25&$select=ManagerEmail

    Was this answer helpful?

    0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.