The json generated from the sites endpoint is an incomplete list of layers offered on our site. I'm seeing 4 layers when I should see 40. This problem started around April 19th. Graham Hudgins Thomas Hervey
Endpoint: https://opendata.arcgis.com/api/sites/<id>/datasets.json
Our page: Open Data Site
Hi,
That endpoint is most likely no longer supported. You can take a look at your site's sitemap (which is XML) https://gisdatacatalog-spokanecounty.opendata.arcgis.com/sitemap.xml and see listed datasets there. We don't have a /sites API endpoint in our current Hub API (v3), but you may be able to query datasets associated with your site in our v2 API (documentation here: https://hub.arcgis.com/api/v2/sites/%7B:id%7D?{include} ). I unfortunately wasn't able to find your site on the v2 sites endpoint, but it may be there if you do a bit of digging.
Thanks for your reply. I suppose I could parse the sitemap but was hoping to stick with json using an official api.
I was using v2 to query for datasets. API Documentation (unofficial?) is here and here as revealed by Courtney Claessens way back in 2017. I suppose I could hack through http://gisdatacatalog-spokanecounty.opendata.arcgis.com/data.json but it isn't pretty.
Patrick Hammons it looks like you might have an answer. How might I use v3 to get a json of my site's datasets? I see your gist at v3.md · GitHub but I' not sure how to use it to get info on my site. I don't see a siteid parameter in the docs. When I try this I get everything hosted by ESRI. Thanks for any help you can provide.
I don't think our v3 API has a quick way to query datasets associated with a site, but I'll investigate. You can view all the datasets from an organization instead by using a filter with your orgId and a large page size likehttps://hub.arcgis.com/api/v3/datasets?filter[orgId]=yourOrgId&page[size]=1000
Thanks for sharing that URL syntax. I gave that a shot but didn't get much.
{ "data": [], "meta": { "apiRoot": "http://hub.arcgis.com/api/v3/", "queryParameters": { "filter": { "orgId": "xyz", "isCancelled": "eventsEq(false)", "status": "not(private,draft,planned)", "endDate": "eventsBefore(1591307427179)" } }, "request": "http://hub.arcgis.com/api/v3/datasets?filter[orgId]=xyz", "resourceRoot": "http://hub.arcgis.com/api/v3/datasets", "stats": { "totalCount": 0, "count": 0, "aggs": {} }, "page": { "start": 1, "size": 10, "nextStart": -1 }, "took": 5, "total": 0, "datasetsMatching": { "onlySemanticFields": [], "onlyNonSemanticFields": [], "both": [] } }, "links": {}}
Aangemelde leden kunnen berichten plaatsen, updates volgen en meer. Nieuw hier? Registreer een gratis account.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.