WEB-JSON: Manipulate JSON objects for WEB Simulation

  1. Table of Contents
  2. Overview
  3. This update package add a JSON toolkit to manipulate JSON objects in WEB module simulations, eg. for REST API responses.

  4. Prerequisites
  5. To run this simulation, you must have installed the following optional modules as documented in the online documentation:

    • WEB Services

  6. Usage
  7. Assign the sample_json.rul to a web-service agent, ie. one that has the WEB protocol enabled in the Advanced tab of the Agent Configuration dialog.

    When you start the agent, you can query it's REST API, eg. if the agent is running at address 10.0.0.1 then it returns to curl

    % curl http://10.0.0.1/api/node/class/topSystem.json
    {"totalCount":"4",
     "imdata":[
      {"topSystem":{"attributes":{"address":"192.8.1.100",
       "fabricDomain":"ACI Fabric1","currentTime":"2018-12-10T13:56:06.931-0500",
       "name":"Leaf-1-100"}}},
      {"topSystem":{"attributes":{"address":"192.8.1.101",
       "currentTime":"2018-12-10T13:56:06.953-0500","fabricDomain":"ACI Fabric1",
       "name":"Leaf-1-101"}}},
      {"topSystem":{"attributes":{"address":"192.8.1.102",
       "currentTime":"2018-12-10T13:56:06.953-0500","fabricDomain":"ACI Fabric1",
       "name":"Leaf-1-102"}}},
      {"topSystem":{"attributes":{"address":"192.8.1.103",
       "currentTime":"2018-12-10T13:56:06.954-0500","fabricDomain":"ACI Fabric1",
       "name":"Leaf-1-103"}}}]}
    

  8. Compatibility