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

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

Download metadata from confluence files

I need to download the metada from each file that is in a Confluence Space or Page.

If this could be done with an API REST method it would be very helpfull.

I had search for one method in the Confluences API REST docs but I dind't found it

1 answer

Hi Daniel,

maybe I can help you by showing Metadata for Confluence to you.
With it, you can add metadata to pages.
This metadata can be added as sets to whole spaces or global.

This metadata can be exported as a JSON file.
But that is only the user way to export it.
You can also use the included REST API to read the metadata using CQL.

If you have any questions feel free to contact us.

Kind regards
Julia

Hi Julia!

 

Thanks for the answer!

 

I have a question. Does this solution requires mandatory use of CQL? I trying to do this with Python so I'm wondering if I will need to code the CQL on Python too.

Hi Daniel,

I'm not really sure if the Metadata app Julia suggested is that what you are looking for.

Could you describe in more detail what you are trying to do? Do you refer to page attachments with the "file that is in a Confluence Space or Page"? If so, what metadata do you want to retrieve for the attachments?

 

Regards

Ronny

Hello, Ronny!

 

What I'm trying to do is to download the metadata for each file that is on a Confluence Page. I have communicated with Atlassian Support and they gave to me this url 

https://<confluence_base_URL>/rest/api/content/<content ID>?expand=space,history,body.view,metadata.labels


And it was working fine until I noticed that it only works with a Confluence Admin user and pass, which, in the prod enviroment, we don't have.

 

What I'm trying to do is to download the metada from each file from each page that a regular user have permissions to read and edit. For example:

 

I have permissions to see and edit the Knowledge space, so I download the metadata of its pages and then I download the metadata of each files in those page, which, as I said before, I already have permissions to see and edit, but the user who made the API REST call is not an admin.

Hello Daniel,

I'm not really sure that I fully understand your comment, but I'm pretty sure that the Metadata app suggested by Julia won't help you because it is a tool to add additional structured metadata to pages/blogposts in Confluence :) . 

 

You try to use the above mentioned URL to get information of Confluence pages and this works but only if you are using the login credentials of an admin user? If you use a normal user login you always get a 403 error response although the user has access to the page (i.e. he can open it in the browser)? In that case you could try to get in contact with the Atlassian support again.

Apart from that I still don't get what you mean with "metadata of each files in those page". If you refer to the attachments of a page you could try the dedicated endpoint for attachments: https://<confluence_base_URL>/rest/api/content/<content ID>/child/attachment (see https://docs.atlassian.com/ConfluenceServer/rest/7.11.0/#api/content/{id}/child/attachment).

Regards

Ronny

Suggest an answer

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

Confluence Mythbusters: Does Atlassian even use Confluence?

Hi, Confluence collaborators! As part of #Confluence-Collaboratory month, we’ve created a very special Mythsbusters segment, where we're dive into an interesting myth and uncover the truth behind i...

1,367 views 7 28
Read article

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