Hi Vineeth,
Are you having trouble generating the Json or are you getting any issues while calling the rest activity.
For Creating Json :
Create JSON structure and Add your Json Structure ( Documentation : Json Structure)
Create an export mapping using the Json structure
Create a microflow and create the necessary object mapped in the Export mapping, set the association, values and in the last, Use Export to mapping Activity to convert the Mendix objects into Json String and then Pass the String to the Body in the body section of the Rest activity
or
In the body of the rest activity you can directly use Export mapping.
Please find below a similar question I have answered in the past : https://community.mendix.com/link/space/connectors/questions/139446
Hope this helps !!