Project

General

Profile

How to attach a file to a custom field of issue via REST API?

Added by klaine tear about 6 years ago

Hi.

How can I attach a file to a custom field of issue via REST API?

I want to do like this.

Thank you for response.
Nest regards.

  1. POST octet-stream to /uploads.xml and get token and attachment id.
  2. PUT xml to /issues/[issue id].xml to attach a file.
    like this xml
 <issue>
  <custom_fields type="array">
   <custom_field id=XX>
    <value>[attachment id]</value>
   </custom_field>
  </custom_fields>
  <uploads type="array">
   <upload>
    <token>[token id]</ token>
    <filename>[filename]</filename>
    <cotainer_type>CustomValue</cotainer_type>
    <content_type>[content type]</content_type>
   </upload>
  </uploads>
 </issue>

Replies (1)

RE: How to attach a file to a custom field of issue via REST API? - Added by Heloisa Kopsch about 6 years ago

Hi Klaine, any news?
I'm trying the same, but no success.

    (1-1/1)