Skip to content

Commit e8072cb

Browse files
authored
Merge pull request #316 from hardillb/install-tgz-package
Add description of TGZ install options
2 parents 056f55a + eeb3c1d commit e8072cb

File tree

1 file changed

+11
-2
lines changed
  • docs/api/admin/methods/post/nodes

1 file changed

+11
-2
lines changed

docs/api/admin/methods/post/nodes/index.md

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,13 @@ Requires permission: <code>nodes.write</code>
1919
Header | 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

2930
Field | 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

4150
Status Code | Reason | Response

0 commit comments

Comments
 (0)