# Request: Give access to node/flow/global context from the Editor

**URL:** <https://discourse.nodered.org/t/request-give-access-to-node-flow-global-context-from-the-editor/18912>\
**Category:** Core Development\
**Created:** [8 December 2019 14:23 UTC](https://discourse.nodered.org/t/request-give-access-to-node-flow-global-context-from-the-editor/18912 "2019-12-08T14:23:35Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![TotallyInformation](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/totallyinformation/32/31_2.png) [@TotallyInformation](https://discourse.nodered.org/u/TotallyInformation)\
**Post date:** [8 December 2019 14:23 UTC](https://discourse.nodered.org/t/request-give-access-to-node-flow-global-context-from-the-editor/18912/1 "2019-12-08T14:23:35Z")

</div>

It seems odd that the only part of Node-RED not able to access node/flow/global context variables are the Editor node configuration panels.

It would be really useful for a node configuration panel to be able to work with the context variables and might potentially be another communications channel between the Node-RED runtime and the Editor.

Is this something being considered or would it be considered as a new feature?

---

<div class="post-metadata">

**Author:** ![knolleary](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/knolleary/32/3_2.png) [@knolleary](https://discourse.nodered.org/u/knolleary)\
**Post date:** [8 December 2019 15:14 UTC](https://discourse.nodered.org/t/request-give-access-to-node-flow-global-context-from-the-editor/18912/2 "2019-12-08T15:14:19Z")

</div>

Context is part of the runtime state of flows and isnt typically used when you are editing them. So it depends on the use case for it.

We already have ways for the editor and runtime to communicate, so I'd be wary of adding another that could confuse matters of when to use which.

In reality, there is now a rest API for retrieving context values, as used by the context sidebar. We haven't published the details as a public API yet, although I know some people are already using it.

---

<div class="post-metadata">

**Author:** ![TotallyInformation](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/totallyinformation/32/31_2.png) [@TotallyInformation](https://discourse.nodered.org/u/TotallyInformation)\
**Post date:** [8 December 2019 15:35 UTC](https://discourse.nodered.org/t/request-give-access-to-node-flow-global-context-from-the-editor/18912/3 "2019-12-08T15:35:50Z")

</div>

> [@knolleary](#):
>
> depends on the use case for it

I can appreciate that. I am thinking about how the front and back ends communicate with respect to configuration and information sharing. The ability to share particularly a node context variable could be really useful in avoiding having to create an additional API as I have done in uibuilder for example. I could likely have avoided several API's by using a node context variable.

> [@knolleary](#):
>
> confuse matters of when to use which

Again, I appreciate this. However, I suspect that the use of the context variables is actually easier to understand than having to create custom API's?

> [@knolleary](#):
>
> rest API for retrieving context values

That is actually what I was hoping for 😀

---

<div class="post-metadata">

**Author:** ![knolleary](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/knolleary/32/3_2.png) [@knolleary](https://discourse.nodered.org/u/knolleary)\
**Post date:** [8 December 2019 15:38 UTC](https://discourse.nodered.org/t/request-give-access-to-node-flow-global-context-from-the-editor/18912/4 "2019-12-08T15:38:29Z")

</div>

> [@TotallyInformation](#):
>
> The ability to share particularly a node context variable could be really useful in avoiding having to create an additional API as I have done in uibuilder for example

A node's context only exists once the node has been deployed. So you still have to consider the case of a freshly added node in the editor that has not yet been deployed.

---

<div class="post-metadata">

**Author:** ![TotallyInformation](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/totallyinformation/32/31_2.png) [@TotallyInformation](https://discourse.nodered.org/u/TotallyInformation)\
**Post date:** [8 December 2019 16:21 UTC](https://discourse.nodered.org/t/request-give-access-to-node-flow-global-context-from-the-editor/18912/5 "2019-12-08T16:21:38Z")

</div>

OK, good point.
