Forums

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

REST API call returning incorrect data in automation rule

Rohan Shastri
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
February 3, 2025 edited

Hi All,

Need help with REST API to search accountID for customer email ID.

 

I have added web request in Automation rule to get the account ID of customer email ID typed in issue body while creating a issue.

 

When web request run, it is returning a entire issue details instead returning the accountID for email ID 

 

API URL: 

https://abc.atlassian.net/rest/api/3/user/search?query=abc@xyz.com

 

expected value: 

 

[
  {
    "self": "https://abc.atlassian.net/rest/api/3/user?accountId=qm:xxx-xxx-xxxx",
    "accountId": "qm:xxx-xxx-xxx-xxx",
    "accountType": "customer",
    "emailAddress": "abc@xyz.com",
    "avatarUrls": {
      "48x48": "https://avatar-management--avatars.us-west-2.prod.public.atl-paas.net/default-avatar.png",
      "24x24": "https://avatar-management--avatars.us-west-2.prod.public.atl-paas.net/default-avatar.png",
      "16x16": "https://avatar-management--avatars.us-west-2.prod.public.atl-paas.net/default-avatar.png",
      "32x32": "https://avatar-management--avatars.us-west-2.prod.public.atl-paas.net/default-avatar.png"
    },
    "displayName": "ABC",
    "active": true,
    "timeZone": "America/New_York",
    "locale": "en_US"
  }
]

Value returned:

XML/JSON detailed about the issue created


Can someone pls help me to find what I am missing here.

1 answer

0 votes
Tuncay Senturk
Community Champion
February 5, 2025

Hi @Rohan Shastri 

I don't think the REST call to /rest/api/4=3/user/search would return the details of the created issue; there must be some mistakes in your configuration. Try testing the API in Postman or using curl (or a browser) to ensure the expected response is returned, then use it in your automation rule. I would suggest ensuring the HTTP method and API headers are correct, but from this point of view, I can't offer further suggestions as I don't see much information about your automation rule.

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
TAGS
AUG Leaders

Atlassian Community Events