File tree Expand file tree Collapse file tree 1 file changed +11
-2
lines changed
docs/api/admin/methods/post/nodes Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -19,12 +19,13 @@ Requires permission: <code>nodes.write</code>
1919Header | Value
2020----------------|-------
2121` Authorization ` | ` Bearer [token] ` - if authentication is enabled
22- ` Content-type ` | ` application/json `
22+ ` Content-type ` | ` application/json ` - if installing from a npm repository
23+ ` Content-type ` | ` multipart/form-data ` - if installing a tgz package
2324
2425
2526### Arguments
2627
27- The request body must be a JSON string with the following fields:
28+ When installing a package from a npm repository the request body must be a JSON string with the following fields:
2829
2930Field | Description
3031---------|-----------------------
@@ -36,6 +37,14 @@ Field | Description
3637}
3738{% endhighlight %}
3839
40+ If installing a tgz package the request body must be a ` multipart/form-data `
41+
42+ The following ` curl ` example will install ` node-red-contrib-foo ` .
43+
44+ {% highlight shell %}
45+ curl -X POST http://localhost:1880/nodes -H "Content-Type: multipart/form-data" -F "tarball=@node-red-contrib-foo-1 .0.3.tgz;type=application/x-compressed-tar;filename=node-red-contrib-foo-1.0.3.tgz"
46+ {% endhightlight %}
47+
3948### Response
4049
4150Status Code | Reason | Response
You can’t perform that action at this time.
0 commit comments