PI Web API NameFilter usage

HI ALL,

 

I would like to filter results on my streams interpolateattimes query created following below link

 

https://docs.aveva.com/bundle/pi-web-api-reference/page/help/controllers/stream/actions/getinterpolatedattimes.html

 

Below is sample response from query. Now, I want to filter results where Good is True. In the above document it is mentioned that we could use FilterExpression using '.' notation but I am unable to achieve it. can you provide exact syntax please?

 

Sample response:

{

"Items": [

{

"Timestamp": "2014-07-22T14:00:00Z",

"UnitsAbbreviation": "m",

"Good": true,

"Questionable": false,

"Substituted": false,

"Annotated": false,

"Value": 12.3

},

{

"Timestamp": "2014-07-22T14:00:00Z",

"UnitsAbbreviation": "m",

"Good": true,

"Questionable": false,

"Substituted": false,

"Annotated": false,

"Value": 12.3

}

],

"Links": {}

}

 

Parents
  • Thanks (Missing Content)​ .

     

    I've tried that. For most of the attributes, it shows "The Configured data reference for Attribute does not support filter expression". Even for PI tag referenced attributes giving bad values which are supposed to be filtered are showing "Performance equation parsing error". Is there any way we can handle these?

     

    Below is the result after trying:

     

    {

     "Items": [

      {

       "Name": "UnitOfMeasure",

       "Path": "\\\\AFServer\\AFDatabase\\Equipment1|UnitOfMeasure",

       "Items": [

        {

         "Timestamp": "2023-10-22T22:00:00Z",

         "Value": null,

         "Good": false,

         "Errors": [

          {

           "FieldName": "Value",

           "Message": [

            "The configured data reference for 'Attribute 'UnitOfMeasure' in Element 'Equipment1' in Element 'Asset1'' does not support filter expressions."

           ]

          }

         ]

        }

       ]

      },

      {

       "Name": "StorageLocation",

       "Path": "\\\\AFServer\\AFDatabase\\Equipment1|StorageLocation",

       "Items": [

        {

         "Timestamp": "2023-10-22T22:00:00Z",

         "Value": null,

         "Good": false,

         "Errors": [

          {

           "FieldName": "Value",

           "Message": [

            "The configured data reference for 'Attribute 'StorageLocation' in Element 'Equipment1' in Element 'Asset1'' does not support filter expressions."

           ]

          }

         ]

        }

       ]

      },

      {

       "Name": "ProductCode(SICC)",

       "Path": "\\\\AFServer\\AFDatabase\\Equipment1|ProductCode(SICC)",

       "Items": [

        {

         "Timestamp": "2023-10-22T22:00:00Z",

         "Value": null,

         "Good": false,

         "Errors": [

          {

           "FieldName": "Value",

           "Message": [

            "The configured data reference for 'Attribute 'ProductCode(SICC)' in Element 'Equipment1' in Element 'Asset1'' does not support filter expressions."

           ]

          }

         ]

        }

       ]

      },

      {

       "Name": "Plant",

       "Path": "\\\\AFServer\\AFDatabase\\Equipment1|Plant",

       "Items": [

        {

         "Timestamp": "2023-10-22T22:00:00Z",

         "Value": null,

         "Good": false,

         "Errors": [

          {

           "FieldName": "Value",

           "Message": [

            "The configured data reference for 'Attribute 'Plant' in Element 'Equipment1' in Element 'Asset1'' does not support filter expressions."

           ]

          }

         ]

        }

       ]

      },

      {

       "Name": "MeasurementPoint",

       "Path": "\\\\AFServer\\AFDatabase\\Equipment1|MeasurementPoint",

       "Items": [

        {

         "Timestamp": "2023-10-22T22:00:00Z",

         "Value": null,

         "Good": false,

         "Errors": [

          {

           "FieldName": "Value",

           "Message": [

            "The configured data reference for 'Attribute 'MeasurementPoint' in Element 'Equipment1' in Element 'Asset1'' does not support filter expressions."

           ]

          }

         ]

        }

       ]

      },

      {

       "Name": "Mass",

       "Path": "\\\\AFServer\\AFDatabase\\Equipment1|Mass",

       "Items": [

        {

         "Timestamp": "2023-10-22T22:00:00Z",

         "Value": null,

         "Good": false,

         "Errors": [

          {

           "FieldName": "Value",

           "Message": [

            "[-12301] Performance Equation parsing error"

           ]

          }

         ]

        }

       ]

      }

     ]

    }

Reply
  • Thanks (Missing Content)​ .

     

    I've tried that. For most of the attributes, it shows "The Configured data reference for Attribute does not support filter expression". Even for PI tag referenced attributes giving bad values which are supposed to be filtered are showing "Performance equation parsing error". Is there any way we can handle these?

     

    Below is the result after trying:

     

    {

     "Items": [

      {

       "Name": "UnitOfMeasure",

       "Path": "\\\\AFServer\\AFDatabase\\Equipment1|UnitOfMeasure",

       "Items": [

        {

         "Timestamp": "2023-10-22T22:00:00Z",

         "Value": null,

         "Good": false,

         "Errors": [

          {

           "FieldName": "Value",

           "Message": [

            "The configured data reference for 'Attribute 'UnitOfMeasure' in Element 'Equipment1' in Element 'Asset1'' does not support filter expressions."

           ]

          }

         ]

        }

       ]

      },

      {

       "Name": "StorageLocation",

       "Path": "\\\\AFServer\\AFDatabase\\Equipment1|StorageLocation",

       "Items": [

        {

         "Timestamp": "2023-10-22T22:00:00Z",

         "Value": null,

         "Good": false,

         "Errors": [

          {

           "FieldName": "Value",

           "Message": [

            "The configured data reference for 'Attribute 'StorageLocation' in Element 'Equipment1' in Element 'Asset1'' does not support filter expressions."

           ]

          }

         ]

        }

       ]

      },

      {

       "Name": "ProductCode(SICC)",

       "Path": "\\\\AFServer\\AFDatabase\\Equipment1|ProductCode(SICC)",

       "Items": [

        {

         "Timestamp": "2023-10-22T22:00:00Z",

         "Value": null,

         "Good": false,

         "Errors": [

          {

           "FieldName": "Value",

           "Message": [

            "The configured data reference for 'Attribute 'ProductCode(SICC)' in Element 'Equipment1' in Element 'Asset1'' does not support filter expressions."

           ]

          }

         ]

        }

       ]

      },

      {

       "Name": "Plant",

       "Path": "\\\\AFServer\\AFDatabase\\Equipment1|Plant",

       "Items": [

        {

         "Timestamp": "2023-10-22T22:00:00Z",

         "Value": null,

         "Good": false,

         "Errors": [

          {

           "FieldName": "Value",

           "Message": [

            "The configured data reference for 'Attribute 'Plant' in Element 'Equipment1' in Element 'Asset1'' does not support filter expressions."

           ]

          }

         ]

        }

       ]

      },

      {

       "Name": "MeasurementPoint",

       "Path": "\\\\AFServer\\AFDatabase\\Equipment1|MeasurementPoint",

       "Items": [

        {

         "Timestamp": "2023-10-22T22:00:00Z",

         "Value": null,

         "Good": false,

         "Errors": [

          {

           "FieldName": "Value",

           "Message": [

            "The configured data reference for 'Attribute 'MeasurementPoint' in Element 'Equipment1' in Element 'Asset1'' does not support filter expressions."

           ]

          }

         ]

        }

       ]

      },

      {

       "Name": "Mass",

       "Path": "\\\\AFServer\\AFDatabase\\Equipment1|Mass",

       "Items": [

        {

         "Timestamp": "2023-10-22T22:00:00Z",

         "Value": null,

         "Good": false,

         "Errors": [

          {

           "FieldName": "Value",

           "Message": [

            "[-12301] Performance Equation parsing error"

           ]

          }

         ]

        }

       ]

      }

     ]

    }

Children
No Data