Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Post JIRA Attachment to external API as multipart/form-data

Mohamed Saad Taha January 8, 2024

Dears,

I am using jira datacenter automation to sent attachement as multipart/form-data

How can I achieve this ?

BR,

1 answer

0 votes
Eugenio Onofre
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
January 12, 2024

Hi @Mohamed Saad Taha

I would suggest the below steps:

  1. Add a 'Send Webhook' Action: After the trigger, add an action to send a webhook.
  2. Configure Webhook Details:
    • Method: Choose "POST".
    • URL: Enter the URL where the attachment should be sent.
    • Headers: Set the Content-Type to multipart/form-data.
    • Body: Here's where things get a bit tricky. You need to construct the body of the request to include the attachment. Typically, this would involve referencing the attachment in a way that the receiving server can understand and process it. Use smart values to reference the attachment. Jira smart values allow you to access and manipulate issue data, including attachments.
      The body of the request should follow the multipart/form-data format. You might need to write a script or use an integration tool if the automation rule interface doesn't support this format natively.

Please remember to accept this answer in case it helps you resolve your question as it may also help other community members in the future.

Regards,
Eugenio

Moheeb Qupty April 18, 2024

Hi @Eugenio Onofre 

Can give example of how this is implemented in the a webhook request form in Jira?

If we put the Content-Type as multipart/form-data 

How the body format? is it JSON/XML?

Thank you. 

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events