# api.scene.getData with runtime id

**URL:** <https://discourse.mcneel.com/t/api-scene-getdata-with-runtime-id/119227>\
**Category:** ShapeDiver\
**Tags:** mac, javascript, api\
**Created:** [February 25, 2021, 9:54am UTC](https://discourse.mcneel.com/t/api-scene-getdata-with-runtime-id/119227 "2021-02-25T09:54:19Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![jonatan.bergstrom](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/jonatan.bergstrom/32/155562_2.png) [@jonatan.bergstrom](https://discourse.mcneel.com/u/jonatan.bergstrom)\
**Post date:** [February 25, 2021, 9:54am UTC](https://discourse.mcneel.com/t/api-scene-getdata-with-runtime-id/119227/1 "2021-02-25T09:54:19Z")

</div>

Hello,  
I have built a react application that loads multiple plugins into a scene via “registerCommPluginAsync” after which i need to get som params(outputs) from that model to manage the camera.

I have been looking through the [documentation](https://viewer.shapediver.com/v2/2.22.0/doc/module-ApiSceneInterface-ApiSceneInterface.html) and it seems as tho one can filter quarries on the plugin-id/runtime-id. the outputs i am looking for has the same name in every instance that i load but i was expecting to be able to filter them based on the runtimeId. from what i gather in the documentation i should be able to do this by for example  
`this.api.scene.getData({name: 'cameraTargetVector'}, _runtimeId)`  
i have also tried  
`this.api.scene.getData({name: 'cameraTargetVector, plugin: _runtimeId'})`  
with the same result. am I mistaken in believing i can filter data this way or is my queries wrong?  
I managed to get it working by running  
`this.api.scene.get({name: 'cameraTargetVector'}, _runtimeId).data[0].content[0].data`  
but it feels like a workaround.

---

<div class="post-metadata">

**Author:** ![mathieu1](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/mathieu1/32/491677_2.png) [@mathieu1](https://discourse.mcneel.com/u/mathieu1)\
**Post date:** [March 5, 2021, 8:58am UTC](https://discourse.mcneel.com/t/api-scene-getdata-with-runtime-id/119227/2 "2021-03-05T08:58:13Z")

</div>

The getData function is just a shortcut for the get function which doesn’t let you filter by runtime Id, therefore it is currently only useful if there is a single plugin loaded. What you call a workaround is actually the only right way to achieve what you want at the moment. Do I understand correctly that the solution worked in your case? Let me know if you need anything else.

---

<div class="post-metadata">

**Author:** ![jonatan.bergstrom](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/jonatan.bergstrom/32/155562_2.png) [@jonatan.bergstrom](https://discourse.mcneel.com/u/jonatan.bergstrom)\
**Post date:** [March 5, 2021, 9:23am UTC](https://discourse.mcneel.com/t/api-scene-getdata-with-runtime-id/119227/3 "2021-03-05T09:23:46Z")

</div>

Aha, ok. Yes, thank you, it works for me.  
However don’t the documentation [here](https://viewer.shapediver.com/v2/2.22.0/doc/module-ApiSceneInterface-ApiSceneInterface.html#getData) say that you should be able to do just that?
