AnsweredAssumed Answered

Can the ArcGIS API return an Open Data item page URL?

Question asked by CityofMoncton on Dec 6, 2018

We have a corporate website (Drupal) with a search function that uses the ArcGIS API to return a list of items from our Open Data portal. We have both GIS datasets and several PDFs uploaded to ArcGIS Online and shared via our Esri Open Data portal. Our OD portal is setup with a domain (open.moncton.ca).

 

For the search results, the web developers are telling me that there are only two URLs they can send users to based on the API call results:

 

1. the URL of the item : example: https://www.arcgis.com/sharing/rest/content/items/4173b517960346d1b1f967896c326c47/data 

In this case, it's a PDF file. Clicking on the link opens the PDF directly in your browser.

 

OR

 

2. the Landing Page of the item:

example: https://www.arcgis.com/home/item.html?id=4173b517960346d1b1f967896c326c47 

 

The issue I'm having with these two options, is that neither option is great for sharing links to documents:

 

In the first option, the PDF file opens directly in the browser, which is great. However, when you paste the URL in example 1 in the address bar of your browser, the URL is replaced by a  SUPER LONG token-generated url. not great for sharing!

 

In the section option, the PDF item's arcgisonline landing page is returned. This isn't great for the user experience, since they need to click on Open or scroll down the page to copy the url from the URL section. And once they paste this URL, the user is faced with the same issue as above, with the long URL which is impossible to share.

 

If we can't change the super long URL, then another option would be to have the search results return and Open Data item page: http://open.moncton.ca/datasets/2018-10-01-agenda--ordre-du-jour. This option would be better than the ArcGIS Online landing page since users would at least get a preview of the PDF. Our web developers are saying that the API cannot return the open data URL, only the two URLs described in #1 and #2.

 

Is this correct? And if so, can a request be made to add the Open Data item URL as part of the API?

Outcomes