Forums

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

Send Web Request - Method Errors

Michael Melton August 25, 2024 edited

I am working on a workflow that will post to an API and am able to work with this API successfully with Bruno and other programs/languages. 

However, I can't seem to get this to work with Jira Send Web Request in workflow specifically. It is actually quite baffling the behavior... 

When I validate the rule with it set to 'POST', and sourcing a ticket that would trigger the flow, it works! 

validation_success_when_post.PNG

So then I go to trigger this workflow outside of the validation within the rule itself and I get the below error in the audit log:

error_in_audit_log.PNG


So then I go back in the workflow and update the action from POST to PUT based on this message and change no other settings. Then when I go to validate I get an error that PUT isn't allowed, but to me this is expected because the API really expects a POST.


validation_error_when_put.PNG

Has anyone experienced this behavior before? 

UPDATE:

I notice if I replace the smart value I am trying to use and replace with a value it works fine. I have tried the smart value like this {{issue.fs_rm_ticket_id}} and {{issue.fs_rm_ticket_id.urlEncode}} and both fail with the same invalid method error.

1 answer

1 accepted

1 vote
Answer accepted
František Špaček _MoroSystems_
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
August 25, 2024

Hi,

 

could you please give use the rest of the API call you are trying to make? It seems its connected with the smart value you are trying to put there. Also, it would be good to know which API function you are trying to call (its not visible in the screenshots).

 

Best would be to add log action before the call is happening and put the whole URL address with the smart value there to see, what is called in reality.

 

Have a nice day.

Michael Melton August 26, 2024

Okay, so I did that and it is pulling the field in as empty which is odd, as it is getting assigned earlier in the workflow by copying from the parent. 

I changed this to {{issue.parent.fs_rm_ticket_id.urlEncode}} and this fixed the issue. 

My assumption is the workflow hasn't fully finished / saved by the time the POST occurs.

Either way, using the log action helped, appreciate the tip!

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
TAGS
atlassian, team '25 europe, atlassian event, barcelona 2025, jira, confluence, atlassian intelligence, rovo, ai-powered collaboration, developer tools, agile teams, digital transformation, teamwork solutions, atlassian conference, product announcements

🌆 Team '25 Europe registration is now open!

Join the largest European gathering of the Atlassian Community and reimagine what’s possible when great teams and transformative technology come together. Plus, grab your Super Fan ticket now and save over €1,000 on your pass before prices rise on 3 June.

Register now
AUG Leaders

Atlassian Community Events