1

I'm using an ArcGIS REST map service, and my question is how do I construct the URL to the service?

Specifically, what relationship is there between the Service Name, the Test Server, and the folder directory structure?

This is the relevant information to the service I am trying to use:

Service Name: Louisville/LOJIC_LandRecords_Louisville
Folder: Louisville
Test Server url: http://sampleserver1.arcgisonline.com/ArcGIS/rest/services

The server send me for the folders:

{"currentVersion" : 100, 
  "folders" : [
    ...
    "Fire", 
    ...
  ], 
  "services" : [
    {"name" : "Geometry", "type" : "GeometryServer"}
  ]
}

and for the service:

{"currentVersion" : 100, 
  "folders" : [], 
  "services" : [
    {"name" : "Fire/Sheep", "type" : "MapServer"}, 
    {"name" : "Fire/Sheep", "type" : "FeatureServer"}
  ]
}

You can see, the folder is part of the service name, is this always so? What is, if there is more then one level of folders?

  • This is a duplicate question. Please refer to your previous question here. If you have questions about the answer please post comments in that question, not make another post. – Baskinomics Nov 27 '11 at 18:38
  • Sorry, but that are NOT the same questions! – Marcel Dec 1 '11 at 9:11
1

Yes. For example, if you were to use the REST service in a GIS, web GIS, or mobile GIS you would reference to the service you are using as:

http://sampleserver1.arcgisonline.com/ArcGIS/rest/services/Louisville/LOJIC_LandRecords_Louisville/MapServer

EDIT | UPDATE

Original question:

I'm using ArcGis as Rest Service.
My question is are allways the folders part of service name?

service name: Louisville/LOJIC_LandRecords_Louisville
folder: Louisville
test server url: http://sampleserver1.arcgisonline.com/ArcGIS/rest/services

Thanks for help!

Marcel

The way the original question was worded did not lend to any clarity about what you were asking, which is why it was edited. The way it was originally structured I was under the impression that you needed to know about how to structure the directory path in a URL request, and I'm afraid that I misinterpreted your question. On your second question, you provided no references to the services or directories. Using the ArcGIS Server you listed in this original question:

Here is the default services directory for all services on this instance of ArcGIS Server: http://sampleserver1.arcgisonline.com/ArcGIS/rest/services/. For this particular directory, the service looks like this:

{"currentVersion" : 10.01, 
   "folders" : [
     "Demographics", 
     "Elevation", 
     "Locators", 
     "Louisville", 
     "Network", 
     "Petroleum", 
     "PublicSafety", 
     "Specialty", 
     "TaxParcel", 
     "WaterTemplate"
   ], 
   "services" : [
     {"name" : "Geometry", "type" : "GeometryServer"}
   ]
}

So in this example, say we choose the Demographics folder. This is the REST response for that directory:

{"currentVersion" : 10.01, 
  "folders" : [], 
  "services" : [
    {"name" : "Demographics/ESRI_Census_USA", "type" : "MapServer"}, 
    {"name" : "Demographics/ESRI_Population_World", "type" : "GPServer"}, 
    {"name" : "Demographics/ESRI_Population_World", "type" : "MapServer"}
  ]
}

So as you can see, the answer to your question is yes; the folder name is concatenated to the services name. For more information you should read the Using ArcGIS Services Directory and check out the ArcGIS Server REST API. For more information on RESTful web services as a whole, see the wikipedia entry. I hope this helps answer your question.

  • thanks! that mean, if I have a service in the folder /xxx/yyy/zzz and the service named SSS, then server will always concat the folder and servicename (== xxx/yyy/zzz/SSS) in his rest-response? REST: ... "services" : [ {"name" : "xxx/yyy/zzz/SSS", "type" : "MapServer"}, ... – Marcel Nov 23 '11 at 6:27
  • @Marcel I'm not sure I understand your question. The REST response of what? A supported operation such as an Identify operation or Geoprocessing task? Please clarify. – Baskinomics Nov 27 '11 at 18:43
  • please have a look at: link I hope this clarifies my question. – Marcel Dec 1 '11 at 9:13
0

If the service is located in a folder, the folder name is always part of the service. If the service is located at the root directory of the server, it is not part of the service name. ArcGIS Server only supports one level of folders, so there cannot be any sub-directories (see here).

For example:

Service at server root, service name "bar": "bar"

Service in folder "foo", service name "bar": "foo/bar"

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.