How to pull data from Cumulocity IOT apis with JAVA

Hi, I have created a few devices on cumulocity IOT trial version and I want to fetch the details of the devices. Now I know that cumulocity has multiple APIs to do this but Idk how to fetch the data because I am new to iot. I read the microservice SDK of cumulocity but I am not getting to the solution.
My use case is that I want to fetch data from cumulocity and display it on my console window through code and i am using Java for this. Then I will send this data to MongoDB. It’s just for practice but I am lost. Please guide me through this

Best Regards,