New ways to share and reuse an ArcGIS Hub site catalog

1058
3
03-08-2023 07:40 AM
ThomasHervey1
Esri Contributor
2 3 1,058

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
About the Author
Product engineer working on search, discovery, and content management