Hi,
There is a lot information available on the docs from Mendix:
https://docs.mendix.com/howto8/integration/publish-rest-service#1-introduction
https://docs.mendix.com/refguide8/published-rest-services#1-introduction
https://docs.mendix.com/refguide8/published-rest-operation#3-example
There is even a learning path available: https://academy.mendix.com/link/path/33/Create-a-REST-API-(Micro-Learning)-.
Good luck learning.
Cheers,
Jeffrey