AssetDatabase GetReferencedElements
- Last UpdatedJun 15, 2023
- 2 minute read
- PI System
- PI Web API Reference
- Developer
AssetDatabase GetReferencedElements
Retrieve referenced elements based on the specified conditions. By default, this method selects all referenced elements at the root level of the asset database.
Remarks
Users can search for the referenced elements based on specific search parameters. If no parameters are specified in the search, the default values for each parameter will be used and will return the elements that match the default search.
Request
GET assetdatabases/{webId}/referencedelements
URL Parameters
-
webId The ID of the resource to use as the root of the search. See WebID for more information.
-
nameFilter The name query string used for finding objects. The default is no filter. See Query String for more information.
-
descriptionFilter Specify that returned elements must have this description. The default is no description filter. See Query String for more information.
-
categoryName Specify that returned elements must have this category. The default is no category filter.
-
templateName Specify that returned elements must have this template or a template derived from this template. The default is no template filter.
-
elementType Specify that returned elements must have this type. The default type is 'Any'. See Element Type for more information.
-
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 per call (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 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 referenced elements matching the specified conditions.
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": {}
}