1
0
mirror of https://github.com/node-red/node-red.git synced 2023-10-10 13:36:53 +02:00

Updated Editor Runtime API (markdown)

Nick O'Leary 2018-03-20 13:06:58 +00:00
parent e0ec520977
commit 7cb2427788

@ -101,7 +101,6 @@ This is a snapshot of how the api is split across source files, and how each of
![](images/runtime-api/nr-api-runtime-map-1.png)
<details>
| | | |
|------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| api/admin/flow.js | `GET /flow/:id`<br/>`POST /flow`<br/>`DELETE /flow/:id`<br/>`PUT /flow/:id` | runtime.log.audit<br/>runtime.nodes.getFlow(id)<br/>runtime.nodes.addFlow(flow)<br/>runtime.nodes.updateFlow(id,flow)<br/>runtime.nodes.removeFlow(id) |
@ -122,4 +121,13 @@ This is a snapshot of how the api is split across source files, and how each of
</details>
### Internal API - v2
The existing API has some issues:
- as seen in the image above, a lots of overlapping links between the editor api and the runtime api
- the editor api knows about the user making a request, the runtime api doesn't
In order to provide a clean api between the two, some simplification is needed. The detail is still being worked on, but essentially a new runtime api needs to be defined that provides a higher level of abstraction of the existing internal API. The new api will also allow a user object to be passed on all calls.
![](images/runtime-api/nr-api-runtime-map-2.png)