400 Response with webhook PUT to add attachments

Peter Gagne October 17, 2024

I'm able to confirm (200 Response) with my credentials, however when I extend the request to perform an action, I'm getting a 400 Response.   I've read some links from earlier posts, but I'm still struggling to get this to work.  This wanna-be programmer would be greatly appreciate any help!!  :0) 

My web request looks like this:

1st.png2nd.png

 

 

1 answer

1 accepted

0 votes
Answer accepted
Tessa Tuteleers
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
October 18, 2024

Hi @Peter Gagne , 

Good to hear your credentials are working, that's a great start. 

You have chosen a pretty complicated request with adding attachments, so I will be adding some reading material and as you are a (wanna-be in your words :) ) programmer, I will try to guide but let you figure some things out on your own.

  • You can find all public APIs for Jira documented in their Jira Cloud platform REST API overview, and lucky for you it has a posssibility for adding attachments here
    • Check the HTTP method
    • Check the format of the body you have to send
  • You can't just pick an attachment from your disk on your PC and upload it in a rule for a few reasons: 
    • If you run the API from automation, how will the rule get access to you local C drive?
    • Read up on multipart/form-data in here to check how you should send attachments

Please let us know how it works! 

- Tessa

Peter Gagne October 21, 2024

Thank you @Tessa Tuteleers !!   I was stuck on keeping it so simple, it prevented me from thinking outside the box.  I now realize the approach I need to take and appreciate your setting me on the right path.

Like Tessa Tuteleers likes this

Suggest an answer

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

Atlassian Community Events