Hello everyone,
I’m trying to go through a workflow to make a counter on access requests: if the number of people who have the right exceeds 1000: we block.
The trigger is easy, for the count I go through the API call: /v3/search/count. it returns the number of people who have the right via a search:
{“indices”:[“identities”], “query”:{“query”:“@access(id:xxxxxxxxxxxxxxxxxxxxxxxxx)”}}
My problem comes when I retrieve this famous X-Total-Count from my operator: I’ve tried to retrieve it via JSON PATH :
I already try other stuff but none seems to work. I also find some people having trouble with this kind of stuff : Response Header count value in Workflow.
PS : I need an int to go with the compare numbers Operator.
Hello @baoussounda , thanks a lot I manage to retrieve it but I still have an issue : it’s a string not a number so the Compare Numbers Operator doesn’t work.
As the results are strings, I tried defining 2 variables for each of my test data, and you can see that they are in the same format, with very similar data: (the 2 verify Data Types are set to “is a string”).
Hello @anagha,
yes I already try that on both Operator (Compare String and Compare Numbers). It is the default “Open Variable Selector” who selected both syntax.
Hello @baoussounda,
defineVariable are still strings
The Input is :
“defineVariable1”: { “countMAX”: “10” },
“defineVariable2”: { “X-Total-Count”: “5” },
For this JSONPATH to work, it would have to be INTs and therefore with an input like this :
“defineVariable1”: { “countMAX”: 10 },
“defineVariable2”: { “X-Total-Count”: 5 },
it seems I can’t meet my needs with workflow atm until variable management is simplified.
I create an idea for variables modification : https://ideas.sailpoint.com/ideas/GOV-I-3391
As you can see between test 2 & 4 the values are different depending on the quotation marks and therefore the string demarcation.
Test 3 is strange because I thought the “lesser than” would have calculated the size of the string. But this seems to be another cacul (I couldn’t find the information online)