We understand that the "API Error" is generic and can be confusing. Have you enabled the "Local Projections" setting on the Hub site? Hub needs a numeric SRID and will throw an error when trying to query metadata without one. For example, on this item on Hub https://gisdata-piercecowa.opendata.arcgis.com/datasets/pierce-county-council-districts/explore the Hub API returns an error when trying to get metadata. On that item's service
the Spatial Reference is
I believe that you'll either need to make an adjustment to the service's spatial reference or disable local projections, which will serve results in EPSG 4326.
I have the same issu. I have already post for this problem this week but no reply.... :sleepy_face:
I also have the same issue with some of our private layers. The data is point-in-time so I'm resolving by uploading the layers to AGOL rather than point to AGS service.
@Tony_J_Van_Der_Wielen Were you able to figure out why this is happening? I just encountered this same exact problem today. I have 10+ other Hub sites and I have downloaded data from them without an issue today as well.
Esri said it was a problem on their end of things and have resolved the issue. They would not give me the details, but if this is not resloved, I would open a ticket with them.
Check the projection of the layer and if it is different to the local projection then disable the local projection in your hub site data setting. Else republish with your local projection.
We just starting having this problem today. Logged a case with tech support, there appear to be a bug attached to this issue (BUG-000141153). No resolution yet. When using the Chrome browser developer tools, the 2 main errors I get are a 404 (Not found error) when I load the dataset's main download page - the data is in the AGO and is shared with the open data site is visible on the web map and within ArcGIS Online. The second error is when the user goes to download the data, the API error shows on the download options and and additional 500 (Internal Server Error) populates.
After further researching and looking into the network traffic it seems that when the Hub is trying to GET the Request URL for the layers on our open data site, it is not "getting" the entire URL. The layer ID is dropped (e.g. instead of https://opendata.arcgis.com/api/v3/datasets/1bc60d61f55644dc9320624a8fbea521_0 being the Request URL our HUB site is trying to GET https://opendata.arcgis.com/api/v3/datasets/1bc60d61f55644dc9320624a8fbea521 )
Which creates the first resulting in the "404 Not Found" error. The additional error is a "500 Internal Server Error" when you click on the open data download icon and an API Error message instead of being able to download the data.
I have been able to test this with another Open Data site on which our GIS data is accessible. Our site gets the API error but on the other site I can download the same data from the same feature services without issue.
How does this get resolved?
I'm sorry to hear that you're having an issue with downloads. We're actively working on a bug fix where gallery cards are linking to the wrong dataset view. You may see that the dataset page will load, but downloads will not because it has the wrong layer information, as @MeghanLeavey pointed out. Meghan, can you provide a public URL for content on your Hub site that is having this issue?