Hi everybody!
I need to iterate through a JSON and then use the username to make a web request to /rest/api/3/user/search?query=<username> to get all accountIDs
When I tried to do this, the parameter sends all the JSON usernames to one web request
Here is my automation:
Without seeing more information about your rule, or the audit log details showing the rule execution, I hypothesize the problem is in your advanced branch...and that you are not supplying a source / smart value expression that can be split into a list.
If you post the details of that branch, it may help the community to offer more suggestions.
Kind regards,
Bill
Thanks for the help @bill
Here is more information about my branch:
the Url is like https://domain.atlassian.net/rest/api/3/user/search?query={{employeeData.name}}
And the audit log return this error:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Your advanced branch is referencing {{webResponse.body.shifts}} content. Let's try some basic "walking the rule" diagnostics...
(1) Do you have another web request action before that branch which is populating the webResponse? If not, the branch has no data to process.
(2) If yes for above, have you selected the option to "Delay execution of subsequent rule actions" for that web request action? If not, it is possible the web request did not finish before the rule continued.
(3) If yes for above, have you checked the results of that call before proceeding with the rule? If not, it is possible the web request failed and provided no data for the advanced branch.
(4) If yes for above, have you written the results of the web request action to the audit log to confirm they contain what you expect? If not, you may not be selecting the correct information for the advanced branch. The error messages you are seeing seem to indicate this is related to the problem.
(5) If yes for above, have you checked if the web response feeding the advanced branch contains characters which require escaping? If not, please review the documentation for the in-line URL encoding when building your call: https://support.atlassian.com/cloud-automation/docs/jira-smart-values-text-fields/#URL-encoding
And so on, for other possible causes of this symptom.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Today only! Share what you’re the most excited about for Team ‘25 or just dance out the beginning of a new quarter with us.
Comment the postOnline forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.