I've tried looking through various PI Square posts, and the AFSDK reference, but it seems to be a little more complicated to just add a new delivery endpoint. I'm assuming it's something simple, but can't see how i would do it.
Just so i'm clear, i'm sorry i wasn't before, this is where i was looking to add endpoints:
This is what worked for me:
AFNotificationContactTemplate newEndpoint = new AFNotificationContactTemplate(myPISystem, stringName);newEndpoint.DeliveryChannelPlugIn = myPISystem.DeliveryChannelPlugIns["Email"];newEndpoint.DeliveryChannel.ConfigString = "ToEmail=myEmailAddress@site.com";newEndpoint.CheckIn();
I believe your question refers to creating a custom delivery endpoint for PI Notifications. I am afraid, this is not an option with the current PI Notification implementation but there are different choices available for configuration. Please refer to Configuration of notifications delivery endpoints.
A delivery endpoint is represented as an AFNotificationContactTemplate in the AF SDK. If you configure the endpoint in PI System Explorer and then reference when configuring a notification rule for an element, then you can export the element with all reference checked and see the property values for the AFNotificationContactTemplate. This will help you see what values should be set when using the AF SDK to create the AFNotificationContactTemplate in your own code.
Retrieving data ...