Element ExecuteSearchByAttribute
- Last UpdatedJun 15, 2023
- 2 minute read
- PI System
- PI Web API Reference
- Developer
Element ExecuteSearchByAttribute
Execute a "Search Elements By Attribute Value" operation.
Request
GET elements/searchbyattribute/{searchId}
URL Parameters
-
searchId The encoded search Id of the "Search Elements By Attribute Value" operation.
-
nameFilter The name query string used for finding objects. The default is no filter. See Query String for more information.
-
descriptionFilter 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.
-
categoryName Specify that the owner of the returned attributes must have this category. 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.
-
searchFullHierarchy Specifies if the search should include objects nested further than the immediate children of the searchRoot. 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 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 Paths to return all paths to the element. If this parameter is not specified, paths are not returned. See Associations for more information.
Status Codes
200: a list of matching Elements.
400: Invalid search Id or search parameters.
Sample Response Body
{
"Items": [
{
"WebId": "I1EmDqD5loBNH0erqeqJodtALAYIKyyz2F5BGAxQAVXYRDBA",
"Id": "cbb28260-853d-11e4-80c5-00155d844304",
"Name": "MachineName",
"Description": "Manufacturing Equipment MachineName",
"Path": "\\\\MyAssetServer\\MyDatabase\\CityName\\EngineeringProcess\\Equipment\\MachineName",
"Paths": null,
"TemplateName": "MachineName",
"HasChildren": false,
"CategoryNames": [
"Equipment Assets"
],
"ExtendedProperties": {},
"Errors": null,
"Links": {
"Self": "https://localhost.osisoft.int/piwebapi/elements/I1EmDqD5loBNH0erqeqJodtALAYIKyyz2F5BGAxQAVXYRDBA"
}
},
{
"WebId": "I1EmDqD5loBNH0erqeqJodtALAYIKyyz2F5BGAxQAVXYRDBA",
"Id": "cbb28260-853d-11e4-80c5-00155d844304",
"Name": "MachineName",
"Description": "Manufacturing Equipment MachineName",
"Path": "\\\\MyAssetServer\\MyDatabase\\CityName\\EngineeringProcess\\Equipment\\MachineName",
"Paths": null,
"TemplateName": "MachineName",
"HasChildren": false,
"CategoryNames": [
"Equipment Assets"
],
"ExtendedProperties": {},
"Errors": null,
"Links": {
"Self": "https://localhost.osisoft.int/piwebapi/elements/I1EmDqD5loBNH0erqeqJodtALAYIKyyz2F5BGAxQAVXYRDBA"
}
}
],
"Links": {}
}