
{
"message.request.id": "",
"openapi.header.content-type": "application/json;charset=UTF-8",
"openapi.header.x-total-count": "66",
"openapi.status_code": "200"
}

$.addGenerator(gen);
$.setPortCallback("input",onInput);
sysparm_limit = $.config.getInt("sysparm_limit");
sysparm_offset = 0;
function gen(ctx) {
var msg = {};
msg.Attributes = {};
msg.Attributes["openapi.query_params.sysparm_limit"] = sysparm_limit.toString();
msg.Attributes["openapi.query_params.sysparm_offset"] = sysparm_offset.toString();
$.output(msg);
}
function onInput(ctx,s) {
var msg = {};
msg.Attributes = {};
sysparm_offset = sysparm_offset + sysparm_limit;
msg.Attributes["openapi.query_params.sysparm_limit"] = sysparm_limit.toString();
msg.Attributes["openapi.query_params.sysparm_offset"] = sysparm_offset.toString();
$.output(msg);
}import json
def on_input(in_message):
dict = json.loads(in_message.body.decode("utf-8"))
if dict["result"]:
api.send("output", json.dumps(dict["result"]))
else:
api.send("stop", None)
api.set_port_callback("input", on_input)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 33 | |
| 28 | |
| 24 | |
| 14 | |
| 13 | |
| 12 | |
| 11 | |
| 11 | |
| 9 | |
| 8 |