Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

SOLVED: Invalid Web Request URL in A4J

Derek Fields _RightStar_
Community Champion
March 24, 2026

I am trying to make a REST call in an Automation to the Organizations API to retrieve information about a user.

My URL looks like this:

https://api.atlassian.com/admin/v2/orgs/<org_id>/directories/-/users?searchTerm=<email>

I have removed the org_id and email for obvious reasons

When I put this URL into Postman, it works as expected. When I put the URL into "Send Web Request" action in A4J, I get an "Invalid web request url" error.

Any ideas why it fails in A4J but works in Postman?

3 answers

1 vote
Derek Fields _RightStar_
Community Champion
March 25, 2026

I went to open a ticket with Atlassian and, amazingly, the AI led me to the answer. I'm not exactly sure of what is happening in the back end. It appears that the back-end is performing a URL encoding of the search parameters after getting the URL. However, even passing in the unencoded email string (abc@def.com) didn't work. 

I modified the URL to be 

https://api.atlassian.com/admin/v2/orgs/<orgId>/directories/-/users?searchTerm={{#urlEncode}}<email>{{/}}

This worked. I suspect that the URL-encoder in the back-end is ignoring the smart value that is passed. So, it URL-encodes only query parameters that are not inside a smart value block. This doesn't explain why passing in the unencoded string didn't work. 

0 votes
Trudy Claspill
Community Champion
March 24, 2026

Hello @Derek Fields _RightStar_ 

Can you provide a link to the endpoint documentation? I'm not finding an endpoint that uses "searchTerm"

https://developer.atlassian.com/cloud/admin/organization/rest/api-group-users/#api-group-users

Are you using a smart value to insert the email into the endpoint? If so did you encode the value?

Can you provide a screen images of the Send web request acton?

Derek Fields _RightStar_
Community Champion
March 25, 2026

@Trudy Claspill - Documentation is The Organizations REST API REST API - you need to unhide the extra parameters to see the searchTerm option. I hardcoded the URL into the Web Request action exactly as it works in Postman including the escaped characters.

0 votes
Tinker Fadoua
Community Champion
March 24, 2026

Hi @Derek Fields _RightStar_ 

It is a deja vu situation. Postman works just fine but not within A4J which always makes me think that either a configuration at the server level or Jira are the blockers.

May be a good question for other champions in slack.

Best,

Fadoua

Derek Fields _RightStar_
Community Champion
March 25, 2026

@Tinker Fadoua - I thought of posting on Slack. I thought that this forum would get more views from a wider audience. 

I agree that there is probably something going on in the A4J implementation. I will open a bug report with Atlassian.

Like Tinker Fadoua likes this

Suggest an answer

Log in or Sign up to answer