Hi, I am trying to get Last Updated date from confluence by using the api but was not able to get it. Can someone point me in the right direction?
Thanks
Hi, I am trying to get Last Updated date from confluence by using the api but was not able to get it. Can someone point me in the right direction?
Thanks
Hello @AbdullahFarooqCONT
Hello and welcome to developer’s community site
It’s considered good etiquette to explain how you’re doing something (which REST API endpoint you’re using), provide an example (the specific query or code), then what you’ve tried to resolve the problem yourself (which other endpoints / query combinations / documentation you’ve used).
Hi I am using this:
https://atlassian-python-api.readthedocs.io/confluence.html
and this:
I saw the following:
confluence.is_page_content_is_already_updated(page_id, body)
but what i want is to grab the date a document was last updated. This date is present in our confluence docs and the title is “Last Updated” . This last updated date is present in front of every document.
Hello @AbdullahFarooqCONT
You have provided a link to Atlassian’s entire Python module with hundreds of methods that can accesses many, many REST API endpoints, not just one specific REST API endpoint. Next, you have provided a link to 2,700+ lines of Python code, that does lots and lots of different things, not one specific thing.
Try reading reading the Confluence REST API documentation first, so that you know what all the endpoints are and what each ones does, such as the Get content history endpoint. Then, use a REST test tool, like Postman, to build a query to that one specific endpoint and make sure it is returning the data you want. Lastly, if you don’t want to build a native Python HTTP query using requests
, then you can try one or more external modules to see which one best suits your needs. Remember, not all modules support all REST API endpoints or features, they’re usually just a quick way to get most but not all things done
Personally, from the Atlassian Python module, I would have thought confluence.get_page_properties(page_id)
would have been the correct method to use, but I don’t use that module, I use Flask, so you’ll have to do your own testing.
Good luck.
Thanks a lot for your reply @sunnyape ! I will definitely test these out.