New ways to share and reuse an ArcGIS Hub site catalog

1086
3
03-08-2023 07:40 AM
ThomasHervey1
Esri Contributor
2 3 1,086

Hub Feeds are even sweeter with new ways to get use out of a site catalog. Earlier this year, the Hub team released two new Hub feeds to help content managers and civic developers reuse content from a site catalog. Now, when users select the Hub feeds button on the search page or within a site’s footer, they’ll see options for RSS 2.0 and OGC Records API.

Let’s look at the feeds, what they’re for, and how you can use them.

 

RSS 2.0 in ArcGIS Hub

Like other Hub feeds, RSS 2.0 is site-level API endpoint for accessing a Hub site’s catalog. Open the Hub feeds modal and select “View” to see the raw XML response.

ThomasHervey1_0-1678289548480.png

Above is a screenshot of the Hub feds modal. You can see all of the Hub feeds including RSS and the newest feed highlighted in red – OCG API – Records.

 

Why RSS?

Although RSS is not a new technology, it is still a viable option for checking regular updates to your favorite sites and catalogs. Connect to an RSS feed using third party tools such as Feedly or Google News Reader and receive daily updates when the catalog changes. See which items were updated most recently or add all geographic content to a map.

Currently the RSS feed supports several query parameters which the Hub team has plans to standardize these parameters across all Hub APIs in the future. Current query parameters include:

  • Query
    • Text match against metadata fields `q=food`
  • Updates
    • Items that have been updated in the last x hours `?updated=10`
  • Limit
    • Numeric limit of results `?limit=10`
  • Sort
    • Date updated (default descending) `?sort=Date Updated`
    • Date created (default descending) `?sort=Date Created`
  • Sort order
    • Descending `?sort=Date Created|created|desc`
    • Ascending `?sort=Date Created|created|asc`

 

Even better, Hub’s RSS 2.0 feed uses the GeoRSS standard to represent the geographic extent of an item. If a feed has content with an extent, add it to a map to render the area covered or assigned to the item.

For example, navigate to your favorite ArcGIS Hub site, select “Explore Feeds” in the page footer, copy the link next to “RSS”, and add it to an a web map in ArcGIS Online following these docs. Any content with an extent will render the extent on the map. Now you can create a live map that updates when a site catalog changes.

 

OGC API – Records in ArcGIS Hub

Like the RSS example above, Hub sites supply a site-level API endpoint for accessing a Hub site’s catalog that conforms to the OGC API – Records. Open the Hub feeds modal and select “View” to see the raw JSON response.

 

Why OGC API – Records?

Esri strives to build products that leverage developing and relevant standards. With the promising growth of standards and specifications such as the Open Geospatial Consortium (OGC) APIs and STAC, Hub has been working to make interoperable catalogs across Esri applications. In January, the Hub team added a new Hub feed for programmatically searching a site’s catalog. Like the search interface within the Hub client (found at the URL `<aHubSiteURL>/search`), users can query, filter, and extract metadata from an entire collection or individual content.

To future-proof this feed, we decided that API endpoints and responses should conform to a standard. Given that the contents of Hub catalogs widely vary (most contain a combination of datasets, documents, apps, maps, events, and more), we chose the OGC API – Records, which shared many properties of the popular OGC API – Features .

 

Search, share, and re-use content in Analysis tools

The power of Hub’s OGC API – Records feed comes from its flexibility. You can navigate collections such as “datasets”, “apps”, and “maps” just like within the Hub client, and apply query parameters including but not limited to:

  • Query
    • Fuzzy text match against metadata fields (ex. `q=food`)
  • Filter
    • Filter results given field/value key-value pairs (ex. `?filter=type='Feature Service`)
  • Limit
    • Numeric limit of results (ex. `?limit=10`),
  • Sort,
    • Date updated (default descending) `?sort=Date Updated`
    • Date created (default descending) `?sort=Date Created `?sort=Date Updated `,

Furthermore, you can supply a token and query private content if a site catalog contains private content. You can also build compound filters to find the exact data you’re looking for. We recommend testing out the OpenAPI sandbox to see different query parameters and API endpoints.

 

ThomasHervey1_1-1678289548489.png

Above is a screenshot of the OpenAPI sandbox for the Hub site demonstrated during Esri’s 2023 Dev Summit

Once ready, navigate to your favorite Hub site again, open the Hub feeds modal, copy the OGC Records URL and follow these docs to bring your content into ArcGIS Pro or ArcGIS Online. For example, you can add a Hub site’s collections such as “datasets” to a web map by selecting “Add layer from URL”, supply the search API root (ex `<aHubSiteURL>/api/search/v1`), and then select “OGC feature layer”.

 

ThomasHervey1_2-1678289548594.png

Above is a screenshot of an ArcGIS Online web map with a layer added from the “Data” collection of a Hub site about Asheville, NC, USA. To add data using Hub site’s OGC API – Records API, select the dropdown next to “Add”, and select “Add layer from URL”.

 

What’s next?

At the time of this writing, the Hub team is working on integrating the API into the Hub client so that all the benefits of the API are shared with the search view. We look forward to sharing more about Hub feeds and how to re-use them in other applications over the coming months!

 

Also, the ArcGIS Hub search & discovery team would love to hear from you! If you have recommendations or request for the Hub feeds features, please let us know in the comments below. Also, we’re looking for feedback on how community users engage with their local governments. Take this survey to help the ArcGIS Hub team better understand how you find open data.

ThomasHervey1_3-1678289548595.png

Scan the QR code above to take this survey

 

 

3 Comments
BobNutsch1
Occasional Contributor

Hello,

This is very exciting news.  I've previously added the RSS feed into my Outlook and the contents of our ArcHub site comes in as expected.  However, I wasn't aware of the query parameters, very nice.

I have not been able to figure out how to receive an update in Outlook when an item is updated. I am expecting the RSS to fire and bring in the updated item into my RSS folder.  What would trigger an update?  I've edited the metadata for the item, e.g., the Description but that doesn't trigger it.  Although I haven't tried with the query parameters, I know that updating data does not trigger the RSS.

What exactly should trigger an RSS feed update?

Thanks, Bob

ThomasHervey1
Esri Contributor

@BobNutsch1glad to hear about your use case. Regarding your question, I'll give a bit of context that can hopefully help you see updates. Hub feeds only show public content, all of which has been added and enriched in Hub's search index. Hub feeds all update in the same way–when the index is updated including when an item's metadata changes as you've described.

First, if you manage a site, I'd recommend that you visit the feed editor for RSS and make sure that the mapping fits your needs. You can access the editor by navigating to the content library (ex. `<siteURL>/content/edit`), select the overflow menu in the top right, and select "Configure Feeds". Make some changes in there and check the preview. Second, the results you see in Hub feeds should match what you see on the Hub client's search page (ex. `<siteURL>/search`). If those results do not reflect updates, I recommend revisiting the content library, and instead select "Check for content updates". This tells Hub to see if any updates have been made in ArcGIS Online, such as metadata changes, that have not been refreshed in the Hub index.

Good luck and let us know if there are other capabilities with these feeds that you'd like to see in the Hub product!

BobNutsch1
Occasional Contributor

Hello @ThomasHervey1 thanks for the reply.  Yep, I've been in the feed editor to change the "from" text. The results of the /search appear to match what's in the RSS feed after the initial population, and when a new item has been added.  It's just that updates to existing content in the Hub do not create a new RSS item.  

Here's the URL to our site:  https://gishubdata-ndgov.hub.arcgis.com/ 

Thanks, Bob

About the Author
Product engineer working on search, discovery, and content management