AssetDatabase FindElementAttributes
- Last UpdatedJun 15, 2023
- 3 minute read
- PI System
- PI Web API Reference
- Developer
AssetDatabase FindElementAttributes
Retrieves a list of element attributes matching the specified filters from the specified asset database.
Request
GET assetdatabases/{webId}/elementattributes
URL Parameters
-
webId The ID of the asset database to use as the root of the search. See WebID for more information.
-
elementNameFilter The element name filter string used for finding objects. The default is no filter. See Query String for more information.
-
elementDescriptionFilter The element description filter string used for finding objects. Only the first 440 characters of the description will be searched. For Asset Servers older than 2.7, a 400 status code (Bad Request) will be returned if this parameter is specified. The default is no filter. See Query String for more information.
-
elementCategory Specify that the owner of the returned attributes must have this category. The default is no filter.
-
elementTemplate Specify that the owner of the returned attributes must have this template or a template derived from this template. The default is no filter.
-
elementType Specify that the element of the returned attributes must have this AFElementType. The default is no filter.
-
attributeNameFilter The attribute name filter string used for finding objects. The default is no filter. See Query String for more information.
-
attributeDescriptionFilter The attribute description filter string used for finding objects. Only the first 440 characters of the description will be searched. For Asset Servers older than 2.7, a 400 status code (Bad Request) will be returned if this parameter is specified. The default is no filter. See Query String for more information.
-
attributeCategory Specify that returned attributes must have this category. The default is no filter.
-
attributeType Specify that returned attributes' value type must be this value type. The default is no filter.
-
searchFullHierarchy Specifies if the search should include objects nested further than immediate children of the given resource. The default is 'false'.
-
sortField The field or property of the object used to sort the returned collection. The default is 'Name'. See Sort Field for more information.
-
sortOrder The order that the returned collection is sorted. The default is 'Ascending'. See Sort Order for more information.
-
startIndex The starting index (zero based) of the items to be returned. The default is 0.
-
maxCount The maximum number of objects to be returned (the page size). The default is 1000.
-
selectedFields List of fields to be returned in the response, separated by semicolons (;). If this parameter is not specified, all available fields will be returned. See Selected Fields for more information.
-
webIdType Optional parameter. Used to specify the type of WebID. Useful for URL brevity and other special cases. Default is the value of the configuration item "WebIDType". See WebID Type for more information.
-
associations Associated values to return in the response, separated by semicolons (;). This call supports DataReference to return attributes with data references. If this parameter is not specified, DataReference values are not returned. See Associations for more information.
Status Codes
200: a list of matching attributes.
Sample Response Body
{
"Items": [
{
"WebId": "I1AbEDqD5loBNH0erqeqJodtALAYIKyyz2F5BGAxQAVXYRDBAGyPedZG1sUmxOOclp3Flwg",
"Id": "75de231b-b591-49b1-b138-e725a77165c2",
"Name": "Water",
"Description": "2008 Water Use",
"Path": "\\\\MyAssetServer\\MyDatabase\\CityName\\EngineeringProcess\\Equipment\\MachineName|Water(2008)",
"Paths": [
"\\\\MyAssetServer\\MyDatabase\\MyElement|MyAttribute",
"\\\\MyAssetServer\\MyDatabase\\ReferencingElement\\MyElement|MyAttribute"
],
"Type": "Int32",
"TypeQualifier": "",
"DefaultUnitsName": "liter",
"DisplayDigits": -5,
"DataReferencePlugIn": "Table Lookup",
"ConfigString": "SELECT [Water Use] FROM [Energy Use 2008] WHERE [Asset ID] = '%Element%'",
"IsConfigurationItem": false,
"IsExcluded": false,
"IsHidden": false,
"IsManualDataEntry": false,
"HasChildren": false,
"CategoryNames": [
"Energy Savings Targets"
],
"Step": false,
"TraitName": "LimitLoLo",
"DefaultUnitsNameAbbreviation": "L",
"Span": 100.0,
"Zero": 0.0,
"DataReference": null,
"Links": {
"Self": "https://localhost.osisoft.int/piwebapi/attributes/I1AbEDqD5loBNH0erqeqJodtALAYIKyyz2F5BGAxQAVXYRDBAGyPedZG1sUmxOOclp3Flwg"
}
},
{
"WebId": "I1AbEDqD5loBNH0erqeqJodtALAYIKyyz2F5BGAxQAVXYRDBAGyPedZG1sUmxOOclp3Flwg",
"Id": "75de231b-b591-49b1-b138-e725a77165c2",
"Name": "Water",
"Description": "2008 Water Use",
"Path": "\\\\MyAssetServer\\MyDatabase\\CityName\\EngineeringProcess\\Equipment\\MachineName|Water(2008)",
"Paths": [
"\\\\MyAssetServer\\MyDatabase\\MyElement|MyAttribute",
"\\\\MyAssetServer\\MyDatabase\\ReferencingElement\\MyElement|MyAttribute"
],
"Type": "Int32",
"TypeQualifier": "",
"DefaultUnitsName": "liter",
"DisplayDigits": -5,
"DataReferencePlugIn": "Table Lookup",
"ConfigString": "SELECT [Water Use] FROM [Energy Use 2008] WHERE [Asset ID] = '%Element%'",
"IsConfigurationItem": false,
"IsExcluded": false,
"IsHidden": false,
"IsManualDataEntry": false,
"HasChildren": false,
"CategoryNames": [
"Energy Savings Targets"
],
"Step": false,
"TraitName": "LimitLoLo",
"DefaultUnitsNameAbbreviation": "L",
"Span": 100.0,
"Zero": 0.0,
"DataReference": null,
"Links": {
"Self": "https://localhost.osisoft.int/piwebapi/attributes/I1AbEDqD5loBNH0erqeqJodtALAYIKyyz2F5BGAxQAVXYRDBAGyPedZG1sUmxOOclp3Flwg"
}
}
],
"Links": {}
}