Posting Attachments to Jira and Confluence

823 views
Skip to first unread message

Elliot Swart

unread,
May 12, 2014, 1:30:35 PM5/12/14
to atlassian-...@googlegroups.com
I have been using the atlassian-connect-express project as a baseline for my application. I have successfully been able to use the JIRA and Confluence REST api's to read data (and have correctly defined my scopes, but I have been unable to use either JIRA's or confluence's REST api to upload an attachment.Neither the example in the SequenceDiagramr code (using JSON RPC) or the example in the atlassian-connect-express homepage has worked for me.

What I am looking for is example node.js code that:

1) uses either the Jira endpoint: /rest/api/2/issue/{issueIdOrKey}/attachment or Confluence endpoint/rest/api/content/{pageId}/child/attachment
2) Uploads a file "helloworld.txt" with the contents 'hello world', or simply uploads the contents 'hello world' to either a JIRA issue or Confluence page

Thanks so much for your help,
Elliot

b...@site9.com

unread,
May 12, 2014, 2:48:22 PM5/12/14
to atlassian-...@googlegroups.com
Hi Elliot,

I had a working solution for JIRA based on Peter Bronlow's code ( see thread below ). It still works fine on my dev. environment, and was working in production up until last week, so it might just be temporary glitch in the OnDemand infrastructure. I filed a defect if you want to track it.

Reply all
Reply to author
Forward
0 new messages