Forums

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

Upload Attachment via API v2

kelko (Gregor) Karzelek
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!
May 8, 2023

I want to add attachments to a Confluence page via automated processes. I found documentation for the v1 API (https://confluence.atlassian.com/confkb/using-the-confluence-rest-api-to-upload-an-attachment-to-one-or-more-pages-1014274390.html)

 

But what is the way to go when using v2 APIs? In the documentation for v2 API (https://developer.atlassian.com/cloud/confluence/rest/v2/) I found a group of endpoints for attachments (https://developer.atlassian.com/cloud/confluence/rest/v2/api-group-attachment/#api-group-attachment) but all of those are only GET. No PUT or POST.

 

Am I missing something?

1 answer

1 accepted

0 votes
Answer accepted
Ken McClean
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
May 9, 2023

The v1 API is still valid, as far as I know. This documentation includes the methods that should work for you:

https://developer.atlassian.com/cloud/confluence/rest/v1/api-group-content---attachments/#api-group-content---attachments

kelko (Gregor) Karzelek
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!
May 9, 2023

OK, so only GET /child/attachment is deprecated and v2 should be used (as marked on said docu page), but the other verbs / resources are still the way to go. I see.

 

I thought whole of v1 API is deprecated.

 

Thanks!

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
TAGS
atlassian, team '25 europe, atlassian event, barcelona 2025, jira, confluence, atlassian intelligence, rovo, ai-powered collaboration, developer tools, agile teams, digital transformation, teamwork solutions, atlassian conference, product announcements

🌆 Team '25 Europe registration is now open!

Join the largest European gathering of the Atlassian Community and reimagine what’s possible when great teams and transformative technology come together. Plus, grab your Super Fan ticket now and save over €1,000 on your pass before prices rise on 3 June.

Register now
AUG Leaders

Atlassian Community Events