How to pass parameters to UIMAPI "callback" function
search cancel

How to pass parameters to UIMAPI "callback" function

book

Article ID: 417930

calendar_today

Updated On:

Products

DX Unified Infrastructure Management (Nimsoft / UIM)

Issue/Introduction

You are using UIMAPI and want to execute the "callback" API function to run a probe callback that takes one or more parameters as input to the callback.

 

Environment

DX UIM - 23.4+
UIMAPI 

 

Resolution

To use parameters for the "callback" function you have to embed them as follows in the request body:

{
  "timeout": 0,
  "parameters": [
    {
      "name": "parameter1",
      "type": "string",
      "value": "value"
    },
    {
      "name": "parameter2",
      "type": "string",
      "value": "value"
}
    
  ],
  "pds": "string"
}

 

For example, to run the callback "hubsec_setup_put" on the hub, which takes two parameters:

key =  ???
value =  ???

If you want to pass the key "ignore_ip" and the value "no", as follows:

You would use the following request body:

{
  "timeout": 0,
  "parameters": [
    {
      "name": "key",
      "type": "string",
      "value": "ignore_ip"
    },
    {
      "name": "value",
      "type": "string",
      "value": "no"
}
   
   
  ],
  "pds": "string"
}

Additional Information

UIMAPI Call Reference