Upload file to confluence page using REST API- Groovy

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

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.

 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"

Suggest an answer

Log in or Sign up to answer
Community showcase
Published yesterday in Jira

How you can achieve compact and easy-to-maintain workflows in your JIRA( Server)

This approach requires you to have the JIRA administrative rights. The main aim of this article is to help you achieve an organized, easy-to-maintain workflows in your JIRA instance thereby, reducin...

188 views 0 0
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you