Versions Compared

Key

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

...

The "url" key will complete the path appended to the base. ex: "/username/repository1/file.txt"

If the "pico_id" and "rid" keys are provided like in engine:installRuleset, the following directive error is given: {"error" : "registerRuleset expects, pico_id and rid or url+base"}.

Attempting to register a ruleset that is already in existence will pull the ruleset from the given base/url and act as an update action, overwriting the current file with the one from the remote repository.

Code Block
titleregisterRuleset
response = engine:registerRuleset({"url": url, "base": base}).klog("Response Structure: ")
/*
 Response Structure:
	"myRuleset"
 Simply returns the rulesetID as a string. The rulesetID is the ruleset's name. 
*/

...

Do not provide the "rid" key if you want to retrieve the krl file from a remote repository (just provide the "base" and "url" keys). If you provide the "rid" key at all, this function will assume the ruleset is already registered with the engine and will simply throw an error if it is not found, ignoring the "base" and "url" as if they were not submitted. If the "base" and "url" are provided, then the krl file will be registered to the engine (if not already) and then installed on the pico with the given "pico_id".

...