How to Access Item Data Stored in ArcGIS Online or Portal with ArcGIS REST API

13059
3
07-26-2014 08:06 AM
EricChiasson
Esri Contributor
6 3 13.1K

The ArcGIS REST API’s Item Data allows to access the data component of an item, such as download a layer package or get the web map’s JSON.  You can even use this functionality to host images to support your story map although it might get tedious to set up if the number of images is very large.

Share the Item with Everyone (Public)

  1. In ArcGIS Online, go to the item’s detail content page
  2. Click Share, and share item with Everyone (Public)
  3. Click OK

Access the Data via the Sharing REST end-point

  1. In a browser, type URL with the following structure:


Zip it!

Optionally, you can have downloadable items, such as layer packages and map packages, zip by adding the URL parameters f=zip.  For example: http://www.arcgis.com/sharing/rest/content/items/8adf6db6ca5f4140b73b3a2e053753e6/data?f=zip 

This will change the file extension *.lpk, or *.mpk to *.zip.

Note


Please note that item data access, via ArcGIS REST API, is not  available for free ArcGIS Online account (i.e. account that are not part of an organization).

3 Comments
JakeSkinner
Esri Esteemed Contributor

Great blog!  I was wondering how I could download an uploaded zip file.  This pointed me in the right direction.

MagalyClément-Zaber
Occasional Contributor

Hi!

Can you get all items of a particulary type like "Web Map" for a organisation portal ?

JoseSanchez
Occasional Contributor III

I tested it with Web Maps and it works fine. Can it be used with Apps or Layers?

About the Author
Eric Chiasson has over 20 years of experience in the field of Geographic Information System (GIS), as a project/technical manager, business/database analyst and trainer. He served as a consultant for both Esri and Esri Canada Professional Services departments. As such, Eric posses an extensive knowledge of Esri's product suite, including ArcGIS Pro/Desktop, ArcGIS Online and ArcGIS Enterprise. He is experienced with database design, web mapping application development, and system implementation. Eric is also fully Bilingual (English & French).