Customize rest api response levels (object vs id)

Hey, how to use it on repeatable components and dynamic zone?