Hi Priyadharshini,
In the published REST API, you can consume the Teamcenter API and load the data in non-persistent objects, including associations. Optionally, you can transform data into another data structure, i.e. loop through all the data and create the non-persistent objects in the structure you want to expose in your REST API. You can either define a JSON snippet yourself or use a Message Definition to develop your Export Mapping used in the published REST API.
Any specific issues you encounter?
Good luck!
Johan