Subscription and Notification
Subscribing to Changes in the Registry Content
There are two methods that can be used to keep an individual or an application (such as another registry) updated on the structures that are new or are changed in the Global Registry.
- Poll the Registry RSS feed. This is available at http://test.sdmxregistry.org/rss.xml. The format of the returned information can be determined by looking at the result of an RSS request.
- Use the Subscription/Notification Mechanism
This tutorial shows how to set up a Subscription (option (2).
Set up a Subscription
The major aspects of a Subscription are:
- It can be for a single Registry construct or a group of constructs based on object type, or even all events in the Registry
- When an event occurs to an object which is being “monitored” by a Subscription, a Notification is sent to the subscribed user
- The Notification can be set up as an e-mail, or set up to notify a remote application (by URL), or both, and many different “end points” can be notified (e.g. many e-mail addresses)
The functionality in the Global Registry comprises two major steps:
- Set up the Profile – this records the mechanism by which you wish to be notified (e-mail or (for an application) by HTTP address). The profile saves having to repeat this information in every subscription you make.
- Identify the Registry construct(s) for which the Subscription is required and link this to the relevant Profile – it is possible to subscribe to events related to structural metadata and to data registrations.
Set up the profile
Select Subscriptions from the main menu.
A profile can be added, edited, and deleted. Click on Add Profile to add a new profile.
Enter the Id of the profile and the address to be used in any notification that is sent from the registry.
The address is added either as an e-mail address or an HTTP address. It is possible to add multiples of each type of address and these can be removed as required.
Add a Structure Subscription
The subscription mechanism is very flexible. It is possible to subscribe to all events, to a specific event for any or all of:
- Structure type (e.g. codelist)
- Maintenance Agency (e.g. SDMX)
- Id (of a specific structure – the system will prompt with a list of structures filtered by any structure type and agency entered, if any)
- Version – if a specific structure is selected the version of the structure will be shown. If required, this can be cleared and then the subscription will be for any version of the chosen structure.
Note that many combination of these fields can be entered. For example it is possible to subscribe to:
- All code lists for any maintenance agency regardless of version
- All code lists that are version 1.0
- A specific code list of any version
Select Structure Subscriptions.
Click on Add to add a subscription.
Each subscription must have a unique Id for the logged on user. Choose the profile to be used (i.e. this identifies the address or addresses to which any notification should be sent) In this example the subscription is for a specific event. Click on Add Event.
The event must be for a specific structure type. The other boxes can be filled in or left blank (“wildcarded”).
In this example a code list maintained by SDMX is chosen.
If the next two boxes are left blank then the subscription will be for any code list of any version maintained by SDMX. Clicking on “Lookup Registry Structures” will allow the choice of a specific code list.
Here CL_FREQ is chosen.
Although a specific version of the code list is selected it is possible to subscribe to any version of CL_FREQ by removing the version.
Here, the version has been removed and the subscription is for any version.
Add a Data Registration Subscription
Click on Data Subscriptions
Add the id, select a profile, and choose an event type or All (data registrations).
Registrations are recorded for a Provision Agreement but the subscription can be for:
- any data registration for any Provision Agreement linked to a specific Dataflow
- any data registration for any Provision Agreement linked to any Dataflow for a specific Data Structure.
Here a specific Dataflow is chosen.
Clicking on Save will save the Subscription.