Help
  • Explore Community
  • Get Started
  • Ask the Community
  • How-To & Best Practices
  • Contact Support
Notifications
Login / Register
Community
Community
Notifications
close
  • Forums
  • Knowledge Center
  • Events & Webinars
  • Ideas
  • Blogs
Help
Help
  • Explore Community
  • Get Started
  • Ask the Community
  • How-To & Best Practices
  • Contact Support
Login / Register
Sustainability
Sustainability

Join our "Ask Me About" community webinar on May 20th at 9 AM CET and 5 PM CET to explore cybersecurity and monitoring for Data Center and edge IT. Learn about market trends, cutting-edge technologies, and best practices from industry experts.
Register and secure your Critical IT infrastructure

Subscriptions using SOAP RESTful EWS Gateway

SmartConnector Forum

Schneider Electric support forum about SmartConnector applications for integration of other building management systems (BMS) into EcoStruxure Building Operation.

cancel
Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
Showing results for 
Show  only  | Search instead for 
Did you mean: 
  • Home
  • Schneider Electric Community
  • EcoStruxure Building
  • SmartConnector
  • SmartConnector Forum
  • Subscriptions using SOAP RESTful EWS Gateway
Options
  • Subscribe to RSS Feed
  • Mark Topic as New
  • Mark Topic as Read
  • Float this Topic for Current User
  • Bookmark
  • Subscribe
  • Mute
  • Printer Friendly Page
Invite a Co-worker
Send a co-worker an invite to the portal.Just enter their email address and we'll connect them to register. After joining, they will belong to the same company.
You have entered an invalid email address. Please re-enter the email address.
This co-worker has already been invited to the Exchange portal. Please invite another co-worker.
Please enter email address
Send Invite Cancel
Invitation Sent
Your invitation was sent.Thanks for sharing Exchange with your co-worker.
Send New Invite Close
Top Experts
User Count
JeffBowman
Sisko JeffBowman Sisko
164
ardak
ardak Schneider Alumni (Retired)
34
sesa180908_brid
Commander sesa180908_brid Commander
34
mike_meirovitz
Commander mike_meirovitz
21
View All

Invite a Colleague

Found this content useful? Share it with a Colleague!

Invite a Colleague Invite
Back to SmartConnector Forum
Adam_Summers
Lt. Commander Adam_Summers Lt. Commander
Lt. Commander

Posted: ‎2017-09-21 07:36 AM

0 Likes
3
1064
  • Mark as New
  • Bookmark
  • Subscribe
  • Mute
  • Subscribe to RSS Feed
  • Permalink
  • Print
  • Email to a Friend
  • Report Inappropriate Content

Link copied. Please paste this link to share this article on your social media post.

‎2017-09-21 07:36 AM

Subscriptions using SOAP RESTful EWS Gateway

Hi,

Could anyone provide some assistance on the correct process for setting up a subscription to data using the SOAP REST Api Endpoint?

I have successfully registered a subscription and notification request and can get initial values but I am an unsure what the correct workflow is beyond that. It looks like I need to create a new notification on the subscription after each successful read but I'm not sure if that's right. I'm looking for a simple explanation as to how this works. Would also be good to know the correct decisions to make about cleaning up (removing notifications and subscriptions etc after use)

Thanks,

Adam.

Reply
  • All forum topics
  • Previous Topic
  • Next Topic
Replies 3
sesa180908_brid
Commander sesa180908_brid Commander
Commander

Posted: ‎2017-09-21 08:17 AM

2 Likes
2
986
  • Mark as New
  • Bookmark
  • Subscribe
  • Mute
  • Subscribe to RSS Feed
  • Permalink
  • Print
  • Email to a Friend
  • Report Inappropriate Content

Link copied. Please paste this link to share this article on your social media post.

‎2017-09-21 08:17 AM

Adam,

Here is the process in detail.  Most of this you are probably already doing but I figured I'd document it here for others.

  1. Create a Subscription.  A Subscription defines what data will be monitored by the underlying server.  Data is returned in the form of NotificationItems for a particular Notification.
  2. Create a Notification.  A Notification is a session of shorts or a snapshot in time of all data changes.  This allows the server to manage paging of the NotificationItems for an arbitrary long number of data points.
  3. Read the NotificationItems.  A NotificationItem is the actual data that has changed for a Notification of a Subscription.

Remember the RESTful Gateway API (and data constructs) it uses was defined to support the full EWS specification, In the case of the SoapEwsRestProvider (at least when SBO is the server) you can ignore anything not related to "ValueItemChanged" subscriptions.

The above steps in more detail...

1. Create a Subscription.  Issue a POST to Subscriptions/Create with the new subscription definition in the body.  Using Swagger, you will see the format of this body parameter:

{

  "DurationInMinutes": 0,

  "SubscriptionType": "ValueItemChanged",

  "Ids": [

    "string"

  ],

  "PriorityFrom": 0,

  "PriorityTo": 0,

  "Types": [

    "string"

  ]

}

Ignoring what you don't need for the SoapEwsRestProvider brings us to...

{

  "DurationInMinutes": 30,

  "SubscriptionType": "ValueItemChanged",

  "Ids": [

    "<< One or more unescaped EWS ValueItem IDs go here>>"

  ]

}

NOTE: Even though you can supply a DurationInMinutes value, SBO will always make subscriptions 30 minutes in length.

The POST result is the Subscription which you will need to create Notifications.

2. Create a Notification.  Issue a POST to Notifications/Create with new Notification definition in the body.  Using Swagger, you will see the format of this body parameter:

{

  "SubscriptionId": "<< ID of the subscription returned from step 1 >>",

  "ChangesOnly": true

}

ChangesOnly indicates that you only want what has changed since the last time you called created a Notification for a specific Subscription.  The first time you call Notifications/Create for a Subscription this is ignored and all data will be returned.  Subsequent calls can either return all data (ChangesOnly=false) or only changes (ChangesOnly=true).  In most cases you can always leave this as "true" and get what you probably want.

The POST result is the Notification which you will use to retrieve the actual data.

3. Read the NotificationItems.  Issue a GET to Notifications/{ID}/Items.

The ID supplied is the ID of the Notification returned in step 2.

The GET results are the NotificationItems you requested.  Paging is expected for the API.

As for data management and cleanup.... 

In the SoapEwsRestProvider world, SmartConnector has to manage data that is not supported by EWS in order to create a client experience that is conducive to the REST paradigm.  In other words, SmartConnector caches a lot of data.  This data is automatically cleaned up for you as it "ages away".  There is nothing that clients need to do. 

If I didn't answer all of your questions/concerns please let me know.

Reply
Adam_Summers
Lt. Commander Adam_Summers Lt. Commander
Lt. Commander

Posted: ‎2017-09-21 11:49 AM

0 Likes
1
986
  • Mark as New
  • Bookmark
  • Subscribe
  • Mute
  • Subscribe to RSS Feed
  • Permalink
  • Print
  • Email to a Friend
  • Report Inappropriate Content

Link copied. Please paste this link to share this article on your social media post.

‎2017-09-21 11:49 AM

Thanks as always Mark, I think I was doing it right then.

Just for clarity it is a case of creating subscription then creating a notification and calling the results in a loop. So for every “poll” I would need to create a new notification, even if the notification result is empty (no changes)?


Reply
sesa180908_brid
Commander sesa180908_brid Commander
Commander

Posted: ‎2017-09-21 11:55 AM

1 Like
0
986
  • Mark as New
  • Bookmark
  • Subscribe
  • Mute
  • Subscribe to RSS Feed
  • Permalink
  • Print
  • Email to a Friend
  • Report Inappropriate Content

Link copied. Please paste this link to share this article on your social media post.

‎2017-09-21 11:55 AM

Exactly.  Each call to Notification/Create creates the "session" and caches the actual data so that you can retrieve it as needed later.  In retrospect, it would have been useful to return an indication that the Notification has actual data (or perhaps the number of items) so that you wouldn't have to make a subsequent call if there were no items to retrieve.  Perhaps I'll look to add that for 2.3. 

Reply
Preview Exit Preview

never-displayed

You must be signed in to add attachments

never-displayed

 
To The Top!

Forums

  • APC UPS Data Center Backup Solutions
  • EcoStruxure IT
  • EcoStruxure Geo SCADA Expert
  • Metering & Power Quality
  • Schneider Electric Wiser

Knowledge Center

Events & webinars

Ideas

Blogs

Get Started

  • Ask the Community
  • Community Guidelines
  • Community User Guide
  • How-To & Best Practice
  • Experts Leaderboard
  • Contact Support
Brand-Logo
Subscribing is a smart move!
You can subscribe to this board after you log in or create your free account.
Forum-Icon

Create your free account or log in to subscribe to the board - and gain access to more than 10,000+ support articles along with insights from experts and peers.

Register today for FREE

Register Now

Already have an account? Login

Terms & Conditions Privacy Notice Change your Cookie Settings © 2025 Schneider Electric

This is a heading

With achievable small steps, users progress and continually feel satisfaction in task accomplishment.

Usetiful Onboarding Checklist remembers the progress of every user, allowing them to take bite-sized journeys and continue where they left.

of