I have the scenario where I have to create panel that contains list of all app parts (SharePoint-Hosted app) added to the SharePoint 2013 host pages, but within the SharePoint-Hosted app itself meaning that I have to use client side code (javascript). I can get host web page url (trought client script - document.referer) where the app part (ClientWebPart) is added. However I also need the ClientWebPart ID so I can verify (trough the LimitedWebPartManager) that this ClientWebPart exists on the host web page.
Does anyone knows how to get the ClientWebPart ID upon adding the sharepoint 2013 app part (ClientWebPart) on the SharePoint 2013 host web page by using client script (javascript) since I have to get this for my list located in the SharePoint-Hosted app?
Please do not get confused with the addional sharepoint app tokens _WPID_
and _WPQ_
which appear to be different things than the ClientWebPart ID that can be retrieved trough the LimitedWebPartManager.