StreamSet GetChannel
- Last UpdatedJun 15, 2023
- 2 minute read
- PI System
- PI Web API Reference
- Developer
StreamSet GetChannel
Opens a channel that will send messages about any value changes for the attributes of an Element, Event Frame, or Attribute. See Channels for more information.
Request
GET streamsets/{webId}/channel
URL Parameters
-
webId The ID of an Element, Event Frame or Attribute, which is the base element or parent of all the stream attributes. See WebID for more information.
-
nameFilter The name query string used for filtering attributes. The default is no filter. See Query String for more information.
-
categoryName Specify that included attributes must have this category. The default is no category filter.
-
templateName Specify that included attributes must be members of this template. The default is no template filter.
-
searchFullHierarchy Specifies if the search should include attributes nested further than the immediate attributes of the searchRoot. The default is 'false'.
-
showExcluded Specified if the search should include attributes with the Excluded property set. The default is 'false'.
-
showHidden Specified if the search should include attributes with the Hidden property set. The default is 'false'.
-
includeInitialValues Specified if the channel should send a message with the current values of all the streams after the connection is opened. The default is 'false'.
-
heartbeatRate Specifies the maximum number of consecutive empty messages that can be elapsed with no new data updates from the PI System, after which the client receives an empty payload. It helps to check if the connection is still alive. Zero/negative values correspond to no heartbeat, and the default value is no heartbeat.
-
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.
Status Codes
101: Switches to the Web Socket protocol.
409: Unsupported operation on the given AF object.
Sample Response Body
{
"Items": [
{
"WebId": "I1AbEDqD5loBNH0erqeqJodtALAYIKyyz2F5BGAxQAVXYRDBAGyPedZG1sUmxOOclp3Flwg",
"Name": "Water",
"Path": "\\\\MyAssetServer\\MyDatabase\\MyElement|Water",
"Value": {
"Timestamp": "2014-07-22T14:00:00Z",
"UnitsAbbreviation": "m",
"Good": true,
"Questionable": false,
"Substituted": false,
"Annotated": false,
"Value": 12.3
},
"Links": {
"Self": "https://localhost.osisoft.int/piwebapi/attributes/I1AbEDqD5loBNH0erqeqJodtALAYIKyyz2F5BGAxQAVXYRDBAGyPedZG1sUmxOOclp3Flwg"
}
},
{
"WebId": "I1AbEDqD5loBNH0erqeqJodtALAYIKyyz2F5BGAxQAVXYRDBAGyPedZG1sUmxOOclp3Flwg",
"Name": "Water",
"Path": "\\\\MyAssetServer\\MyDatabase\\MyElement|Water",
"Value": {
"Timestamp": "2014-07-22T14:00:00Z",
"UnitsAbbreviation": "m",
"Good": true,
"Questionable": false,
"Substituted": false,
"Annotated": false,
"Value": 12.3
},
"Links": {
"Self": "https://localhost.osisoft.int/piwebapi/attributes/I1AbEDqD5loBNH0erqeqJodtALAYIKyyz2F5BGAxQAVXYRDBAGyPedZG1sUmxOOclp3Flwg"
}
}
],
"Links": {}
}