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.
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.
Online 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.