You might not be able to achieve this via OOTB apis however, there are few ways to achieve this
You could create a custom workflow that accepts the manager name (and/or workitem name) and returns the number of pending workitems for the same.
Abd then utilise the OOTB SCIM api to launch a workflow.
Create a REST plugin that provides an endpoint and based on the input (manager name and/or workgroup), fetches the pending workitem and returns it in a json format.
Please keep in mind to make sure that you add authorization on top of the rest endpoints via capabilities and sprights so that only allowed identities can call the endpoint.
There you go communityrestapi.1.0.zip (77.4 KB)
you have to grant to the proxy user communityRoleRESTAllow sp_right and than you can use postman to count approvals,
Thanks for your input, While importing this plugin, getting below error.
ERROR https-jsse-nio-8443-exec-5 sailpoint.plugin.PluginInstaller:263 - An error occurred during plugin installation sailpoint.tools.GeneralException: Invalid object name ‘DUAL’.
I tried to make the changes in below files
db > install > install.sqlserver > removed this query
db > uninstall > uninstall.sqlserver > removed this query
db > upgrade > upgrade.sqlserver > removed this query
Again converted plugin folder .zip
Tried to import the plugin.
But it is giving error “unable to locate the manifest file”.
I think i need to make the changes in plugin project and then using the ant build i need to compile this plugin.
There should be actually no DB files in this plugin as they are not required - I just build new version of the plugin - try this one communityRestAPI.1.0.zip (15.2 KB)
The whole plugin will be published in CoLab - waiting for approval from Sailpoint and it will be there open source, there are couple of more usefull endpoints which can be used and new ones are being created
The method you are using has the following content