Event subscribe on sitemaps api

Hello, everyone! Can anyone explain the mechanism for subscribing to events in sitemaps api? I need to track the properties of items on the current (displayed) page: values, color, visibility, etc..

It’s a two-step process:

  1. Send a POST request to sitemaps/events/subscribe wit an empty body. This will create a subscription and you will get an id back in the response.
  2. Subscribe (via SSE) by sending a GET request to sitemans/events/{subscriptionid} using the id you got in the first request. You can also provide query prams for filtering out a specific sitemap and page.
  3. If you later want to switch which page you subscribe to you should be able to reuse the subscriptionid, just send a new GET with different prams.