CAP datasource
Using this datasource requires advanced knowledge.
CAP feeds lack a universally agreed-upon format, resulting in differently formatted XML feeds. While RSS and ATOM formats are common, entirely unique XML formats are also used. Understanding your feed format is essential for proper setup.
Learn more about CAP protocol: official documentation
Create datasource
Go to Datasources > Click Add new
in the External datasource tab > Choose the CAP
type.
Operation Mode
Choose how your CAP datasource receives alerts:
- Poll Mode: System periodically checks the feed URL for updates
- Callback Mode: External system pushes alerts directly via webhook (requires webhook integration)
Poll Mode Configuration
-
For poll mode, decide how your datasource updates: select a
Refresh Frequency
or specify aCron Expression
-
Feed URL
is mandatory and tells the server where to fetch XML data.
Alert URL Selector
is optional and required only for unique XML structures. This selector identifies where alerts are located in the feed.
Here is a snippet from the feed's xml file
<?xml version="1.0" encoding="UTF-8" ?>
<rss xmlns:dc="http://purl.org/dc/elements/1.1/" version="2.0">
<channel>
<link rel="alternate" title="RSS" href="http://alert-feed.worldweather.org/af-andma-en/rss.xml"
type="application/rss+xml"/>
<title>Latest Official Public alerts for Afghanistan: National Disaster Management Authority</title>
<link>http://alert-feed.worldweather.org/af-andma-en/rss.xml</link>
<description>This feed lists the most recent Official Public alerts for Afghanistan:
National Disaster Management Authority uploaded to the Filtered Alert Hub.
</description>
<language>en</language>
<copyright>public domain</copyright>
<pubDate>Tue, 12 Jul 2022 14:48:10 GMT</pubDate>
<lastBuildDate>Mon, 11 Jan 2021 09:13:00 GMT</lastBuildDate>
<docs>http://blogs.law.harvard.edu/tech/rss</docs>
<image>
<title>Latest Official Public alerts for Afghanistan: National DM Authority</title>
<url>http://alert-feed.worldweather.org/af-andma-en/capLogo.jpg</url>
<link>http://alert-feed.worldweather.org/af-andma-en/rss.xml</link>
</image>
<item>
<title>Flood warning for Badghis, faryab, Herat, Farah, Ghor, Dykundi provincess of Afghanistan</title>
<link>https://alert-hub-hko.s3.amazonaws.com/af-andma-en/2022/07/12/14/42/2022.xml</link>
<description>According to NOAA rainfall prediction for Afghanstan, satellite imagery, GLOFAS,
GFMS and iMMAP Heavy rainf in Badghis, Faryab, Herat, Farah, Ghor, Dykundi,
Urizgan provincess Province of Afghanistan will lead to flooding, with likely extensive
damage to houses and property.
</description>
<category>Met</category>
<pubDate>Tue, 26 Mar 2019 08:24:39 +0000</pubDate>
<guid isPermaLink="false">urn:oid:2.49.0.1.4.1.2019.3.26.8.24.39</guid>
<dc:creator>noorimet@gmail.com (Andma)</dc:creator>
<dc:date>2019-03-26T08:24:39+00:00</dc:date>
</item>
</channel>
</rss>
<rss>
is the base feed containing <channel>
information (title, description) and <item>
elements for individual alerts.
Alert URL Selector
to rss.channel.item.link
for this RSS feed.Advanced caching
Advanced caching
minimizes network traffic by avoiding unnecessary requests.
Feed last updated selector
prevents unnecessary requests when the feed's updated field changes with individual items.
rss.channel.pubDate
might indicate feed updates. Setting this selector polls items only when this field changes.Feed item last updated selector
avoids requests for unchanged alerts by checking item freshness fields.
rss.channel.item.pubDate
might indicate individual item updates. This polls only changed items.Callback Mode Configuration
For push-based alert delivery, configure callback mode to receive alerts via webhook.
Callback mode requires webhook integration setup in Settings >> Integrations >> Datasource Actions.
When to use callback mode:
- Real-time alert delivery is critical
- External system can push alerts to Wallboard
- Immediate response to emergency alerts is required
When to use poll mode:
- Standard RSS/ATOM feeds without push capability
- Less time-sensitive alert scenarios
- Simple implementation preferred
Webhook Integration
To enable callback mode:
1. Configure webhook integration:
- Go to Settings >> Integrations >> Datasource Actions
- Create a new datasource action with appropriate Event ID
- Select "Refresh datasource" as the Action Type
- Note the generated webhook URL
2. Provide webhook URL to external alert system:
- External systems push CAP alerts to this URL
- Wallboard processes incoming alerts immediately
- Authentication must be handled at network/infrastructure level
Screen identification
Screen identification
connects external feed alerts with specific screens in your system.
6. Tag based matching
identifies which alerts play on which devices:
Tag attribute
: Choose where screen identifiers are placed in alerts:AUDIENCE
,NOTE
,ADDRESSES
, orAREA_DESC
Tag separator
: Character separating multiple tagsTag filter type
: Tag relationship logic:Any match
: Alert plays if any tag matches screen tagsAll match
: Alert plays only if all alert tags match screen tags
Emergency state management
7. Set screen emergency state automatically
enables automatic device emergency state management.
Include screens with tag setting
: Specifies which devices the server can control. Leave empty for all devices, or specify unique identifiers for specific screens.
Additional settings
8. Configure additional datasource behavior:
Cache external resources
: Store external content locallyRemove broken external resource references
: Clean up invalid linksRotate cache on every update
: Clear cache with each refreshExchange internal resource references
: Update internal linksRequest settings
: Configure HTTP request parameters
9. Click Save
to create your CAP datasource.