0

Is there a way to query a REST service on an ArcGIS server and get JSON object of all folders, services, layers and other resources.

I am writing my own queries but it is becoming rather cumbersome and I am wondering if something is already built in

var servicesRoot='https://my.gisserver.com/gisServer/rest/services';

$.ajax({
  url: servicesRoot+'?f=pjson',
  dataType: "jsonp",
  success: function(response) {
    //this logs all the folder in this service
    console.log(response.folders)
  }
});
  • 2
    Not in one query, but you can recurse on your own. To do so would put burden on a heavily laden Server instance. – Vince Mar 29 '18 at 21:04
  • Thanks @Vince - Wow, that's surprising that a simple series of JSON queries would burden a server instance. bummer – jotamon Mar 30 '18 at 16:04
  • Well, let's see... Call it 50 folders with 20 services holding 33 layers and three sets of layer metadata... Would a cascade of 100,000 queries resemble a "simple series" or denial of service attack? – Vince Mar 30 '18 at 23:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.