Hi Rachana, I advice to check below links to have a broad knowledge of consuming or publishin APi in Mendix.
https://video.mendix.com/watch/RMw45uwCAjYi2ej7ykAseu
https://academy.mendix.com/link/paths/133/Design-and-Publish-a-REST-API
https://academy.mendix.com/link/modules/138/lectures/1226/5.1-Consume-a-REST-Service