Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Celebration

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,558,920
Community Members
 
Community Events
184
Community Groups

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 08, 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 09, 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 09, 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
AUG Leaders

Atlassian Community Events