Select to view content in your preferred language

Use the Downloads API v1 with item id and a temporary slug fix for ArcGIS Hub

195
0
a week ago
Labels (3)
Rhonda_Houser
Esri Contributor
4 0 195

Exploring and downloading data is a key function of ArcGIS Hub sites. Many people do this through the standard user interface by discovering a site, searching for data, or finding a dataset on the ArcGIS Hub homepage. In Hub, you can explore spatial data by filtering, styling, and downloading datasets in a variety of formats. Learn more about recommendations, settings, and file formats available for data downloads.

Downloads API v1 versus Legacy Downloads API

Many Hub site visitors and customers also use the Downloads API to dig into data. Hub supports the Downloads API v1, which is the newer version. The Downloads API v1 allows you to programmatically filter and download public data from service-backed items in a public catalog. You can download a single layer or download multiple layers from the same service-backed item.

The previous version (Legacy Downloads API) supported download URLs with slugs. A URL slug is the part of a web address after the domain name and any subfolders. It acts as a unique identifier for a specific item, and is generally short, descriptive, and user-friendly.

Legacy Downloads API format:

legacy_format.jpg

This previous version (Legacy Downloads API) could use a slug or an item id in the URL to achieve the same result. However, Hub is now using the Downloads API v1 endpoint, which requires the item id and does not support download URL's that contain slugs. Note that catalog feeds automatically use Downloads API v1.

Downloads API v1 format:

v1_format.jpg

Prior to this temporary fix, those download URLs with slugs were being redirected to the Legacy Downloads API, resulting in issues with an out-of-date cache.

Legacy Downloads API formatted examples:

legacy_ex1.jpg

legacy_ex2.jpg

Issue resolved on temporary basis

On April 29, 2025, we resolved this issue on a temporary basis. This means that the ability to use the slug with the Downloads API v1 will be available for 90 days.

The (old) download URL with slugs will be redirected to Downloads API v1 such that up-to-date cache files are served. After a period of 90 days, you will not be able to use the slug with Downloads API v1 and you should use the item id. Downloads API v1 always requires item id, format, and layer id.

Downloads API v1 format (again):

v1_format.jpg

Best practice

Moving forward, the best practice with the Downloads API v1 is to use the item id and not the slug. And make sure to include format and layer id in the URL. Please post any comments or questions on Esri Community.

 

Tags (3)
Contributors
About the Author
Technical Writer & Product Engineer, Esri