Question

Access ArcGIS Server Feature Service Query REST API and write out json as output

  • 21 October 2021
  • 2 replies
  • 49 views

Hello,

 

New to using web services here. I am trying to use oauth2 login to Portal ArcGIS Server feature service on a specific layer index and use the REST Query function to pass in a couple of parameters and then have the output to json format.

 

For instance this is the ArcGIS Server Feature Service on a particular feature layer (e.g. index 3) https://ppp-snoopy.com/un/rest/services/SnoopyUN_Network/FeatureServer/3

 

Then pass in the string query parameters according to this reference page Query (Feature Service)—ArcGIS REST APIs | ArcGIS Developers

 

where: GUID = 'abc1234xyz'

gdbVersion : Snoopy.Survey

outfields : objectid, GUID

f: json

 

I am trying use HTTP Caller to access the ArcGIS Server feature service using NTLM authentication and got this error :

{"error":{"code":499,"message":"Token Required","details":[]}}

 

I also tried to use direct URL to the ArcGIS Server Feature Service (without Portal) and no luck.

 

Any help would be appreciated!

 

Thanks!


2 replies

Badge +8

Hi @litung8​ 

Are you familiar with our Utility Network training materials (Utility Network Migration Training course)?

You should be able to access the Feature Services directly via using ArcGIS Portal Feature Service Reader/ Writer. There is no need to use REST API to access these features.

 

There is currently a known issue with NTLM authentication i.e. if your password contains special characters such as @, !, %, etc., that would cause the reader to error.

 

Please let me know if that works for you. If you are still having issues we can continue troubleshooting this further. If you still like to continue using ArcGIS Server Feature Service, the best scenario would be to use HTTPCaller to Generate Token and then pass the token to Feature Reader (ArcGIS Server Feature service), please find attached a sample workspace.

 

Hi @rahulsharma​ ,

 

Thanks for the course information. I did not know there is a course on this :( I will look at the recorded sessions - this is very helpful.

 

No wonder my password login failed with special characters.

 

I will work through the courses and change my password and see if these help. If I have still have problem, will come back here.

 

Thank you much !

Reply