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

Next challenges

Recent achievements

  • Global
  • Personal

Recognition

  • Give kudos
  • Received
  • Given

Leaderboard

  • Global

Trophy case

Kudos (beta program)

Kudos logo

You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.

View group

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

How do a I get a list of all attachment versions using the Confluence Rest API?

Hi,

I'm trying to figure out how to get a list of all the versions of an attachment using the rest api.  In particular, the version number, date and time of each version.  I've tried variations on the rest api url, but haven't had much luck.  I'm probably making a simple mistake.

Things I've tried:

rest/api/content/<Attachment ID>/history

rest/api/content/<Page ID with attachments>/descendant?expand=attachment

rest/api/content/<Page ID with attachments>/child/attachment?expand=container,operations,children,restrictions,history,version,descendants,space

Thank you,

R

3 answers

Is this possible?

0 votes

Hello R,

From reviewing your notes and the endpoints you’ve attempted, you should be able to get what you need from the last endpoint you listed. This endpoint should be able to provide what you’re looking for with the expands:

GET /rest/api/content/{id}/child/attachment

Example of what to use: http://example.com/confluence/rest/api/content/1234/child/attachment?filename=myfile.txt&expand=version

This should give your information in a format which will include version and when (this is the date).

Please let us know if this example is helpful in getting your attachment information.

Regards,
Stephen Sifers

thats not working, also i need to list old versions to download and migrate to other platform. I tried all i saw

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Posted in Confluence

What do you think is the most *delightful* Confluence feature? Comment for a prize!

- Create your own custom emoji 🔥 - "Shake for Feedback" on mobile 📱 - An endless supply of GIFs via GIPHY 🤩 Is there anything quite as nice as a pleasant surprise? Comment below with what...

429 views 23 9
Join discussion

Community Events

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

Find an event

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

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you