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
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.