Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
titleremoveChannel
pico_id = engine:getPicoIDByECI(eci)
/*
    "some_pico_id"
*/

...


getParent

List all the channels Get the parent's pico_id for the current or given pico_id.

ParameterDatatypeRequiredDefault
<pico_id><string>NOthe running pico_id


Code Block
titlenewChannel
parent_id = engine:getParent(pico_id)
/*
	"the parent's pico_id"
*/


listChildren

List the pico's children pico_ids.

ParameterDatatypeRequiredDefault
<pico_id><string>
YES
NOthe running pico_id


Code Block
titlenewChannel
children = engine:listChildren(pico_id)
/*
  [
    "child 0 pico_id",
    "child 1 pico_id",
    ...
  ]
*/


listChannels

List the pico's channels.

ParameterDatatypeRequiredDefault
<pico_id><string>NOthe running pico_id


Code Block
titlenewChannel
channels = engine:listChannels(pico_id)
/*
	[
      {
		        "id" : "eci-0...",
		
        "pico_id": <pico_id>,
        "name": "name 0",
		        "type": "type 0"
    	  },
      {
		
        "id" : "eci-1...",
		        "pico_id": <pico_id>,
        "name": "name 1",
		
        "type": "type 1"
 	     }
    ]
*/

listInstalledRIDs

List the rid's installed on the pico.

ParameterDatatypeRequiredDefault
<pico_id><string>NOthe running pico_id


Code Block
titlenewChannel
rids = engine:listInstalledRIDs(pico_id)
/*
  ["io.picolabs.pico", ...]

*/


listAllEnabledRIDs

List all enabled ruleset ids. No parameters are given.

...

newPico

Creates a new pico. No parameters are given.

ParameterDatatypeRequiredDefault
<parent_id><string>NOthe running pico_id


Code Block
titlenewPico
engine:newPico() setting(resp)
/*
	{
		"id" : <new_pico_id>,
        "parent_id" : <current pico_id>,
	}
*/

Note: newPico does not provide an eci. This action is used in conjunction with engine:createChannel to create a pico with both an id and eci. See wranglerNPE.krl for an example of how to fully create a pico according to a given prototype.


removePico

ParameterDatatypeRequired
<pico_id>
Default
<pico_id><string>
YES
NOthe running pico_id


Code Block
titleremovePico
engine:removePico(id)

...

Creates a new channel for a pico (identified to the engine by the pico_id parameter).

ParameterDatatypeRequiredDefault
<pico_id><string>
YES
NOthe running pico_id
<name><string>YES
<type><string>YES


Code Block
titlenewChannel
engine:newChannel(id,name = "channel_name", type = "channel_type") setting(resp)
/*
	{
		"id" : <new_eci>,
        "pico_id": <pico_id>,
		"name": "channel_name",
		"type": "channel_type"
 	}
*/

...

Installs ruleset(s) into a pico.  

ParameterDatatypeRequiredDefault
<pico_id><string>
YES
NOthe running pico_id
<rid>string | array

NO


<url><string>NO
<base><string>NO


The "base" key will have a value that contains the domain name where your krl file is located. ex:  "http://raw.githubusercontent.com"

...

uninstall a ruleset from a pico.  

ParameterDatatypeRequiredDefault
<pico_id><string>
YES
NOthe running pico_id
<rid>string | array

YES


This does not return anything

Code Block
titleunregisterRuleset
engine:uninstallRuleset( meta:picoId, rid = "myRuleset")


engine:uninstallRuleset( meta:picoId, ["rid.1", "rid.2"])

...