Issue Creating Juggler Action via API for RUT956

Dear Support Team,

I’m encountering a problem while attempting to create a juggler action through the API for the RUT956 router (Firmware Version 7.6.0; API Version 1). My goal is to configure certain parameters via the API, but I’ve hit a snag.

Endpoint Used:

Request Body:

“post”: “1”,
“ui_params”: “1”,
“text”: “{\n\t"serialNumber": "%sn",\n\t"adc0": "%g1",\n\t"din1": "%g2",\n\t"din2": "%g3",\n\t"dout1": "%g4",\n\t"dout2": "%g5",\n\t"iio": "%g6",\n\t"relay0": "%g7"\n}”,
“type”: “http”,
“ui_name”: “testaction”,
“verify”: “1”

Error received:

“success”: false,
“errors”: [
“source”: “ui_name”,
“code”: 103,
“error”: “Option is required when creating a configuration.”,
“section”: “.anonymous”

According to the documentation, the ui_name field is mandatory and I’ve provided it under the attribute “ui_name”: “testaction”, assuming this is the correct way to name the action. However, the error suggests that a required option is missing.

Could you please clarify if my understanding of the ui_name (as mapped to $uci_name) parameter is correct? Or if there’s another issue with my request that’s causing this error? Your guidance on how to correctly create a juggler action would be greatly appreciated.

Thank you for your assistance.

Best regards,

Alejandro Haag


Apologies for the delayed response.

Are you including the ‘data’ key in the JSON body?

Please, try the following:

    "data": {
    "post": "1",
    "ui_params": "1",
    "text": "{\n\t'serialNumber': '%sn',\n\t'adc0': '%g1',\n\t'din1': '%g2',\n\t'din2': '%g3',\n\t'dout1': '%g4',\n\t'dout2': '%g5',\n\t'iio': '%g6',\n\t'relay0': '%g7'\n}",
    "type": "http",
    "ui_name": "testaction",
    "verify": "1",

Kind Regards,

This topic was automatically closed after 15 days. New replies are no longer allowed.