Forums

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

Upload file to confluence page using REST API- Groovy

Raj Pathak
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
October 19, 2017

Hi

I was wondering how I would go about uploading a specific file from a directory on my local machine to a specific confluence page using the REST API, I couldn't seem to find that in the documentation. 

If I could be guided towards that, that would be very helpful! 

2 answers

0 votes
Kalyan December 19, 2018
 curl -v -S -u $USERNAME:$PASSWORD -X POST -H "X-Atlassian-Token: no-check" -F "file_0=@code/pydoc/manage_connections.html" "https://alm-group.atlassian.net/wiki/spaces/PROJECT/pages/830833705/PyDoc"
0 votes
Hasnae
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
December 21, 2017

You might want to have a look at the following documentation of the attachment REST Api :

https://docs.atlassian.com/atlassian-confluence/REST/6.5.2/#content/{id}/child/attachment-createAttachments

Hope this helps.

Suggest an answer

Log in or Sign up to answer
TAGS
atlassian, likes for trees, atlassian community, social impact, tree planting campaign, community kudos, atlassian giving, environmental impact, sustainability, likes for good, atlassian social responsibility, community challenge

Make every click count—help us plant 50,000 trees! 🌳

Want to make your everyday Community actions directly contribute to reforestation? The Atlassian Community can achieve this goal by liking a post, attending an ACE, sending your peers kudos, and so much more!

Help us plant more trees
AUG Leaders

Atlassian Community Events