2 Replies Latest reply on Mar 16, 2018 3:46 PM by MarcLemus

    Streamsets results filtering using URL parameters

    MarcLemus

      Is there a way to use URL parameters to filter results from the streamsets controller (or any other controller that gets lots of data)?

       

      My URL looks like this: /piwebapi/streamsets/E0a-d7vCFPlEyp1po5MeDg-QdEGJt2Py5xGA2AAMKW2h4wQU1EQ0RFVkZBMDFcVFNPX1RBTktTX1BST0RVQ1RcVEFOS1MgUFJPRFVDVCBHUk9VUFxDUlVERSBPSUw/value?searchFullHierarchy=true&selectedFields=Items.Name;Items.Value.Value;Items.Value.Good;Items.Value.Timestamp;Items.Value.UnitsAbbreviation;Items.Path 

       

       

      A portion of JSON returned looks like this:

          {

            "Name": "Level",

            "Path": "\\\\AFServer\\ElementParent1\\ElementParent2\\CRUDE OIL|ENTRY16|Level",

            "Value": {

              "Timestamp": "2018-03-06T15:41:43Z",

              "Value": {

                "Name": "--",

                "Value": 393,

                "IsSystem": true

              },

              "UnitsAbbreviation": "",

              "Good": false

            }

          },

          {

            "Name": "Level",

            "Path": "\\\\AFServer\\ElementParent1\\ElementParent2\\CRUDE OIL|ENTRY17|Level",

            "Value": {

              "Timestamp": "2017-08-14T19:09:06Z",

              "Value": "30.53125",

              "UnitsAbbreviation": "",

              "Good": true

            }

          },

          {

            "Name": "Level",

            "Path": "\\\\AFServer\\ElementParent1\\ElementParent2\\CRUDE OIL|ENTRY18|Level",

            "Value": {

              "Timestamp": "2017-08-14T19:09:06Z",

              "Value": "10.66667",

              "UnitsAbbreviation": "",

              "Good": true

            }

          },

          {

            "Name": "Level",

            "Path": "\\\\AFServer\\ElementParent1\\ElementParent2\\CRUDE OIL|ENTRY19|Level",

            "Value": {

              "Timestamp": "2017-08-14T19:09:06Z",

              "Value": "27.58333",

              "UnitsAbbreviation": "",

              "Good": true

            }

          },

          {

            "Name": "Level",

            "Path": "\\\\AFServer\\ElementParent1\\ElementParent2\\CRUDE OIL|ENTRY20|Level",

            "Value": {

              "Timestamp": "2018-03-06T15:41:43Z",

              "Value": {

                "Name": "--",

                "Value": 393,

                "IsSystem": true

              },

              "UnitsAbbreviation": "",

              "Good": false

            }

          },

       

      I do not want any of these records, and I have successfully implemented this in my client javascript:

      result.Items[i].Value.Good == false

      results.Items[i].Value.Value !== 'Null'

       

       

       

      Ideally, another URL parameter, for example &filters(Value.Good==true would be useful.