SSL Exception When Querying REST API
We use functions to query regional data from GIS REST APIs. We're having an issue with one REST API that appears to be a problem within ZOHO, as I'm not having an issue querying the API in Postman or via the built in query tool.
- // test coords
- lon = "-84.29118695502028";
- lat = "37.926056998991726";
- coord = lon + "," + lat;
- // base url
- REAP_url = "https://rdgdwe.sc.egov.usda.gov/arcgis/rest/services/Eligibility/Eligibility/MapServer/4/query";
- // Set General params
- params = Map();
- params.put("geometry",coord);
- params.put("geometryType","esriGeometryPoint");
- params.put("returnGeometry","false");
- params.put("inSR","4326");
- params.put("f","pjson");
- //Set RHS (Rural Development) params
- REAP_params = params;
- //
- //Run query and save to separate responses
- REAP_resp = invokeurl
- [
- url :REAP_url
- type :GET
- parameters:REAP_params
- ];
- info REAP_resp;
returns: Failed to execute function
- Execution exception : 'Exception - 'SSLException'' Line Number:63
Meanwhile, the same query on Postman returns the following JSON:
- {
- "displayFieldName": "STATENAME",
- "fieldAliases": {
- "STATENAME": "STATENAME"
- },
- "fields": [
- {
- "name": "STATENAME",
- "type": "esriFieldTypeString",
- "alias": "STATENAME",
- "length": 100
- }
- ],
- "features": [
-
- ]
- }
Not sure why I'm receiving an SSL Exception. Any assistance in working around the exception would be appreciated.