hub.custom.nodes.list
- List of components. The command provides information about Custom Scripts (Nodes) installed.
Edit
Field | Type | Required | Default | Description |
---|---|---|---|---|
id | string | – | Filter records by node’s database record identifier. | |
ids | array of strings | – | Filter database records by database list of record identifiers. | |
name | string | – | Filter nodes by full plugin name (full match). | |
shortName | string | – | Filter nodes by short name (not prefixed version of a plugin name). | |
author | string | – | Filter records by an author (full match). | |
showMeta | bool | – | false | If true, show the node’s plugin configuration options. |
showAdvanced | bool | – | false | Filter records by an author (full match). |
Edit
Edit
Field | Type | Required | Description |
---|---|---|---|
_id | string | + | An identifier of a node |
plugin | string | + | A full name of a node’s plugin (corresponds to a config.json/id field) |
shortName | string | + | A short name of a node’s plugin (if a plugin has a prefix, this field will show its name without the prefix) |
meta | object | – | A node’s metadata object |
configuration | object | – | A node’s configuration object. Describes parameters of a plugin configuration request |
Edit
Field | Type | Required | Description |
---|---|---|---|
name | string | + | Name of a node’s plugin. |
description | string | + | Text description of a plugin |
author | string | + | Name of an author |
prefix | string | – | Autogenerated prefix for a plugin; name of a plugin will contain |
type | string | + | The type of a plugin, should be equal to for Data Source Nodes |
language | string | + | The value, constant. |
size | int | – | The size of plugin files |
placement | array of strings | – | A list of places the devices that belong to the plugin can appear in the UI. Example: |
Edit
Field | Type | Required | Description |
---|---|---|---|
type | string | + | Type of configuration, one of , . Default value: . |
script | string, path | – | Path to a file through which configuration is provided. should be an absolute path like: . |
inputs | array of objects | – | Each object in the array provides a description of parameters for the configuration script. |
Edit
Field | Type | Required | Description |
---|---|---|---|
field | string | + | Name of a field to use in parameters of a configuration script |
name | string | + | Human-readable name of a field, for UI |
description | string | + | Description of a field |
required | boolean | + | Indicates that a configuration parameter is a required field. All required fields are mandatory for a configuration call. If the field is false, the field is optional and can be omitted. Default is true. |
type | string | + | Type of a field, one of , , , . |
format | string | – | Format of a string (like for IPv4 IP addresses; will be provided by Cloud later). |
Edit
Edit
Edit
{
"method": "hub.custom.nodes.list",
"id": "_ID_",
"params": {}
}
Edit
{
"method": "hub.custom.nodes.list",
"id": "_ID_",
"params": {
"showMeta": true,
"showAdvanced": true
}
}
Edit
{
"method": "hub.custom.nodes.list",
"id": "_ID_",
"params": {
"id": "8765918273645",
"showMeta": true,
"showAdvanced": true
}
}
Edit
{
"method": "hub.custom.nodes.list",
"id": "_ID_",
"params": {
"ids": ["Id1", "Id2"],
"name": "Name",
"author": "Author",
"showMeta": true,
"showAdvanced": true
}
}
Edit
{
"method": "hub.custom.nodes.list",
"id": "_ID_",
"params": {
"author": "John Doe"
}
}
Edit
Code | Message | Data |
---|---|---|
-32600 | The format of any required field is wrong | rpc.params.invalid.{FIELD} |
Edit
Response contains nodes:
Field | Type | Required | Description |
---|---|---|---|
nodes | array of objects | + | An array of node information objects |
Edit
{
"id": "_ID_",
"error": null,
"result": {
"nodes": [
{
"_id": "61a8becb0000007e25311f48",
"configuration": {
"inputs": [
{
"description": "Fake Account Username",
"field": "username",
"name": "Username",
"required": true,
"type": "string"
},
{
"description": "Fake Account Password",
"field": "password",
"format": "password",
"name": "Password",
"required": true,
"type": "string"
}
],
"placement": "device,plugin",
"script": "HUB:node_test_plugin/configs/account",
"type": "static"
},
"meta": {
"author": "Ezlo Cloud Device Integration team",
"description": "This plugin will create a fake switch with an item upon installation.",
"language": "lua",
"name": "Node test plugin (updated)",
"placement": [
"static",
"custom"
],
"prefix": "",
"size": 32767,
"type": "node"
},
"plugin": "node_test_plugin",
"shortName": "node_test_plugin",
"version": "1.0"
}
]
}
}