如何使用 Pi Vision Web Api 获取返回的过滤数据
How to get filtered data returned using Pi Vision Web Api
我正在尝试过滤使用 Pi 的网络时返回的数据 api。例如,假设我有这个 url 结构,https://machinename/piwebapi/tables/tableId/data,其中 returns 以下 table 数据:
{
"Columns": {
"Model": "String",
"4WD": "Boolean",
"TopSpeed": "Int32"
},
"Rows": [
{
"Model": "CarModel1",
"4WD": true,
"TopSpeed": 100
},
{
"Model": "CarModel2",
"4WD": false,
"TopSpeed": 80
}
]
}
我想按 4WD 过滤此数据:正确。
我已尝试通读此处的文档并使用许多不同的查询,但我没有看到基于值进行过滤的查询。 https://techsupport.osisoft.com/documentation/pi-web-api/help//controllers/table/actions/getdata.html
我也尝试过使用搜索查询,它可以根据值进行过滤,但是当 table 是 AF 对象时,我无法使 url 结构起作用。 https:///machinename/piwebapi/tables/search?databaseWebId=databaseId
是否可以像这样过滤 url 结构,https://machinename/piwebapi/tables/tableId/data,以获得特定值?
的一些帖子,目前似乎不支持通过 PI Web API 过滤 table 数据
I see as well no way to specify any where conditions when querying AF Table data. To my understanding, the reason of having AF Tables is to supply AF Attributes with values, either fixed or condition based.
AF 中的表通常旨在为 AF 属性提供值 - 您的用例是否允许您搜索 AF 填充的 AF 属性值 table?
如果没有,您可以通过JavaScript在客户端过滤返回的AF table数据。我会小心使用这种方法,因为您需要注意该 AF table 中有多少数据将返回给客户端以进行进一步过滤。
如果您的 table 是链接 table(table 或由 SQL 服务器托管但在 AF 中可用的视图),您可以使用创建 AF table 表示时的参数,然后 leverage those parameters 在 PI Web API 调用
我正在尝试过滤使用 Pi 的网络时返回的数据 api。例如,假设我有这个 url 结构,https://machinename/piwebapi/tables/tableId/data,其中 returns 以下 table 数据:
{
"Columns": {
"Model": "String",
"4WD": "Boolean",
"TopSpeed": "Int32"
},
"Rows": [
{
"Model": "CarModel1",
"4WD": true,
"TopSpeed": 100
},
{
"Model": "CarModel2",
"4WD": false,
"TopSpeed": 80
}
]
}
我想按 4WD 过滤此数据:正确。
我已尝试通读此处的文档并使用许多不同的查询,但我没有看到基于值进行过滤的查询。 https://techsupport.osisoft.com/documentation/pi-web-api/help//controllers/table/actions/getdata.html
我也尝试过使用搜索查询,它可以根据值进行过滤,但是当 table 是 AF 对象时,我无法使 url 结构起作用。 https:///machinename/piwebapi/tables/search?databaseWebId=databaseId
是否可以像这样过滤 url 结构,https://machinename/piwebapi/tables/tableId/data,以获得特定值?
I see as well no way to specify any where conditions when querying AF Table data. To my understanding, the reason of having AF Tables is to supply AF Attributes with values, either fixed or condition based.
AF 中的表通常旨在为 AF 属性提供值 - 您的用例是否允许您搜索 AF 填充的 AF 属性值 table?
如果没有,您可以通过JavaScript在客户端过滤返回的AF table数据。我会小心使用这种方法,因为您需要注意该 AF table 中有多少数据将返回给客户端以进行进一步过滤。
如果您的 table 是链接 table(table 或由 SQL 服务器托管但在 AF 中可用的视图),您可以使用创建 AF table 表示时的参数,然后 leverage those parameters 在 PI Web API 调用