First of all you will need to configure connection between Windchill and ThingWorx. You can find documentation in the PTC Windchill Extension Guide.
As part of this you need to deploy Windchill Rest Services (WRS) and Windchill patch for ThingWorx. The REST API is self documented in Windchill. To enable the icon you have to set the Client Customization preference to yes in the Windchill UI.
Unfortunately currently there is no REST services to execute Windchill Query Builder report directly and currently is not possible to extend this out-of-the-box Windchill REST WebService.
So you will have to build and test InfoEngine task to invoke such report and then in ThingWorx invoke your custom I*E task using the ExecuteTask service on the WindchillConnector thing. See "Using Info*Engine Tasks when Developing Your Application" in "PTC Windchill® Extension Guide".