Querying for all Services in a Folder returns Empty List

316
0
10-12-2023 06:42 AM
Labels (2)
YooHubert
New Contributor

I am trying to query for all Feature/Map Services running on one of our ArcGIS Servers and have succesfully generated a token and gotten a response back from the GET request, but the returned list of services seems to be empty when requesting from my web application. I am able to query the same endpoint using Python or Postman and get the proper response containing all of the services in the list, but I get an empty one for some reason when trying from the web application. I am wondering if there is something I have to change within my GET request of the settings of the Server so I can return the full list of services? I am able to query a sample Service Directory without issue, so its 100% something specific to the Server setup I am working with.

 

Sample Service Directory that can be queried from Web app:

http://sampleserver6.arcgisonline.com/arcgis/rest/services/Energy

 

My Service Directory with empty list in response with Web app:

https://[OUR_DOMAIN]/arcgis/rest/services/DataWarehouse?f=pjson

 

Response in Postman/Python:

{
"currentVersion": 11.1,
"folders": [],
"services": [{"name":"DataWarehouse/Service_1","type":"FeatureServer"}, 
       {"name":"DataWarehouse/Service_1","type":"MapServer","name":"DataWarehouse/Service_2","type":"FeatureServer"},{"name":"DataWarehouse/Service_2","type":"MapServer"}]
}

Response within my Web Application:

{
"currentVersion": 11.1,
"folders": [],
"services": []
}

 

My request headers: {"Content-type": "application/x-www-form-urlencoded", "Accept": "text/plain"}

Creating the token within my web application seems to work no problem, and to make it more confusing I can query individual Feature/Map services without issue from within the same web application and get the full json response back (so I know my token works). Any help would be greatly appreciated!

 

 

0 Kudos
0 Replies