I started a new job and one of the tasks given to me was to write some python to work with their ArcServer REST services. I first thought it was token protected but I found out that they federated it with portal and it's all web tier authenticated.
I'm trying to hit the url with requests but keep getting a need token response but even if i get a token it screams at the SSL true parameter. Any ideas?
What Python packages and functions are you using to "hit the url with requests'?
python 2.7
import requests
import urllib
import urllib2
import json
I should be able to hit the REST endpoint and return the JSON data.
Also on the list is to return info on the services but for now i'm just
trying to connect.
Internally when I hit the server with a browser, it passes my single
sign on creds and returns the JSON but not with python.
Esri has done all of the heavy lifting of making ArcGIS REST API calls from Python by creating ArcGIS API for Python | ArcGIS for Developers. I encourage you to use that API instead of trying to roll your own ArcGIS REST API calls from Python.
I’ll look into that on Monday. Thanks
Sent from my iPhone