node-red-contrib-linode
Version:
Use Linode API to provides the ability to programmatically manage the full range of Linode products and services / Swagger with Node-Red.
55 lines (48 loc) • 3.23 kB
HTML
<p>Use Linode API to provides the ability to programmatically manage the full range of Linode products and services.</p>
<p>It is based on <a href="https://www.linode.com/docs/api">Linode API v4.102.0</a> and <a href="https://github.com/swagger-api/swagger-js">swagger-js</a>.</p>
<h3>Inputs</h3>
<dl class="message-properties">
<dt>Name
<span class="property-type">string</span>
</dt>
<dd> set a manuell name for the node. If no name is set, the node sets the selected operation name.</dd>
<dt>Container
<span class="property-type">string</span>
</dt>
<dd>The name of the container that will receive the Linode API object.</dd>
<dt>API tag
<span class="property-type">enum</span>
</dt>
<dd> Preselector for the operation. Grouped by the 'tags' in each operation. </dd>
<dt>Operation
<span class="property-type">enum</span>
</dt>
<dd> Selector for the OpenAPI operation. The selection name is set by the 'summary'. Behind the selector field is the (unique) operation id. By mouse-over it will show the full operation Description.</dd>
<dt class="optional">Parameters <span class="property-type">depending</span></dt>
<dd> If the selected operation has parameters, they will be listed here. The description can be found by mouse-over the parameter name. If the parameter is required, it will be marked with a red star behind the name.
For Json Objects with defined keys there will be 3 Buttons: 'set required' and 'set default' will build a json-object with the correct key names and the necessary type info as the value. 'show keys' show all possible key parameters with additional info by mouse-over the key name.</dd>
</dl>
<h3>Outputs</h3>
<dl class="message-properties">
<dt>Container <span class="property-type">object</span>
<dd> Returns the complete Linode API object.</dd>
</dt>
</dl>
<h3>Authentification</h3>
For authentification you can use the Node-Red to get your token. This token has to be set into msg.access_token.
<h3>Error handling</h3>
This handles how to react if the server returns a http status of 4xx or 5xx. You can find the last server response in msg.response.
<dl class="message-properties">
<dt>Standard <span class="property-type">string</span> </dt>
<dd> The flow will move on normally so you can choose how to handle this within your flow.</dd>
<dt> Other output <span class="property-type">string</span></dt>
<dd> The flow will move on in a second output.</dd>
<dt> Throw exception <span class="property-type">string</span></dt>
<dd> The flow will throw an exception. This exception can be catched by the 'catch' node.</dd>
</dl>
<h3>References</h3>
<ul>
<li><a href="https://www.npmjs.com/package/swagger-client">Based on npm swagger-client</a> - which does almost all the magic here</li>
<li><a href="https://gitlab.com/2WeltenChris/svelte-integration-red">SIR</a> - Node designed with svelte</li>
<li><a href="https://github.com/caputomarcos/node-red-contrib-linode">GitHub</a> - the nodes github repository</li>
</ul>