<1> Import required packages for our coding. JavaImporter is used to import packages.
You can import any numbe of packages with comma separated.
<2> Add our imports with loop
<3> Create a HashMap to add our query filter values.
<4> Adding a filter orderBy as lastSeen
<5> Adding another filter order as desc
<6> Adding another filter pageLimit as 5
<7> Store queried results in the variable nodes, can be used in templates(refer templates section)mcApi already binded with script engine, you can use it to query/set values from/to MyController.

<1> Import HashMap should be used to send filter queries
<2> Import Long used to send java Long type
<3> Create filter with pageLimit of 20
<4> Query MyController with McApi and store result in gateways
<5> Print result in mycontroller/log/mycontroller.log file.