<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic GeometryServer/buffer request error 400 extendedCode -2147024809 in ArcGIS REST APIs and Services Questions</title>
    <link>https://community.esri.com/t5/arcgis-rest-apis-and-services-questions/geometryserver-buffer-request-error-400/m-p/1300694#M4495</link>
    <description>&lt;P&gt;Having some difficulty with a post request to our ArcGIS Server buffer utility endpoint and coming up with this response when executing in python requests, but running the same exact input parameters on the Utilities/Geometry/GeometryServer/buffer REST page it works. Error message:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;{'error': {'code': 400, 'extendedCode': -2147024809, 'message': 'Invalid or missing input parameters.', 'details': []}}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;Python script / code:&lt;/P&gt;&lt;LI-CODE lang="python"&gt;#create 250ft buffer for ROW canal selections
geomInput = {"geometryType": "esriGeometryPolygon", "geometries": [{"rings": ringFeat['rings']}]}
print (geomInput)

queryURL_buff = 'https://somedomain.com/servername/rest/services/Utilities/Geometry/GeometryServer/buffer'
paramsBuff = {'f': 'json',
			  'geometries': geomInput,
			  'inSR': 2881,
			  'outSR': 2881,
			  'bufferSR': 2881,
			  'distances': 250,
			  'unit': 9003,
			  'unionResults': 'true',
			  'geodesic': 'false',
			  'token': tok
			  }

reqBuff = requests.post(queryURL_buff, data = paramsBuff, verify=False)
responseBuff = json.loads(reqBuff.content)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here's the input Geometries parameter "geomInput", that comes from an initial request to a service layer on published on the same ArcGIS Server site, SR 2881:&lt;/P&gt;&lt;LI-CODE lang="python"&gt;{'geometryType': 'esriGeometryPolygon', 'geometries': [{'rings': [[[495575.2709925808, 885508.40553274], [495550.90457149595, 882849.2146569043], [494801.263026163, 882859.831105493], [494741.2670831606, 882860.6811694056], [494559.8045195788, 882863.2520304099], [494349.84627807885, 882866.2267619893], [494140.0382987447, 882869.1978846565], [493930.3799254112, 882872.1686792374], [493720.87575124577, 882875.1355368197], [493511.52183924615, 882878.1017382368], [493302.3175332472, 882881.0643307418], [493082.0259790793, 882884.1853874922], [492918.59684399515, 882886.4980469048], [492922.98856749386, 883580.9809099063], [492889.98830541223, 883581.418573074], [492893.9925624952, 884214.7765583247], [492860.99295657873, 884215.2056913227], [492810.41759841144, 884215.8598894924], [492562.22616566345, 884219.0767465755], [492395.6389004141, 884221.2348787412], [492229.02637274563, 884223.3933389932], [491895.8219866641, 884227.7141964883], [491562.6179286614, 884232.0347259045], [491229.4181357473, 884236.3516464084], [491022.93068782985, 884239.0265098214], [490563.0139567442, 884244.9890963212], [490228.3850328289, 884249.3266860768], [489896.68097182736, 884253.6265462413], [489730.08091132715, 884255.7850064933], [489563.4769138284, 884257.9474037364], [489568.5769692473, 884889.7184499055], [489574.1684934944, 885582.6845836565], [492902.3800129108, 885541.4887999073], [495575.2709925808, 885508.40553274]]]}]}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="JamesCrandall_0-1687179379832.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/73593iCA9C272FFA9DE462/image-size/medium?v=v2&amp;amp;px=400" role="button" title="JamesCrandall_0-1687179379832.png" alt="JamesCrandall_0-1687179379832.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 19 Jun 2023 12:56:37 GMT</pubDate>
    <dc:creator>JamesCrandall</dc:creator>
    <dc:date>2023-06-19T12:56:37Z</dc:date>
    <item>
      <title>GeometryServer/buffer request error 400 extendedCode -2147024809</title>
      <link>https://community.esri.com/t5/arcgis-rest-apis-and-services-questions/geometryserver-buffer-request-error-400/m-p/1300694#M4495</link>
      <description>&lt;P&gt;Having some difficulty with a post request to our ArcGIS Server buffer utility endpoint and coming up with this response when executing in python requests, but running the same exact input parameters on the Utilities/Geometry/GeometryServer/buffer REST page it works. Error message:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;{'error': {'code': 400, 'extendedCode': -2147024809, 'message': 'Invalid or missing input parameters.', 'details': []}}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;Python script / code:&lt;/P&gt;&lt;LI-CODE lang="python"&gt;#create 250ft buffer for ROW canal selections
geomInput = {"geometryType": "esriGeometryPolygon", "geometries": [{"rings": ringFeat['rings']}]}
print (geomInput)

queryURL_buff = 'https://somedomain.com/servername/rest/services/Utilities/Geometry/GeometryServer/buffer'
paramsBuff = {'f': 'json',
			  'geometries': geomInput,
			  'inSR': 2881,
			  'outSR': 2881,
			  'bufferSR': 2881,
			  'distances': 250,
			  'unit': 9003,
			  'unionResults': 'true',
			  'geodesic': 'false',
			  'token': tok
			  }

reqBuff = requests.post(queryURL_buff, data = paramsBuff, verify=False)
responseBuff = json.loads(reqBuff.content)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here's the input Geometries parameter "geomInput", that comes from an initial request to a service layer on published on the same ArcGIS Server site, SR 2881:&lt;/P&gt;&lt;LI-CODE lang="python"&gt;{'geometryType': 'esriGeometryPolygon', 'geometries': [{'rings': [[[495575.2709925808, 885508.40553274], [495550.90457149595, 882849.2146569043], [494801.263026163, 882859.831105493], [494741.2670831606, 882860.6811694056], [494559.8045195788, 882863.2520304099], [494349.84627807885, 882866.2267619893], [494140.0382987447, 882869.1978846565], [493930.3799254112, 882872.1686792374], [493720.87575124577, 882875.1355368197], [493511.52183924615, 882878.1017382368], [493302.3175332472, 882881.0643307418], [493082.0259790793, 882884.1853874922], [492918.59684399515, 882886.4980469048], [492922.98856749386, 883580.9809099063], [492889.98830541223, 883581.418573074], [492893.9925624952, 884214.7765583247], [492860.99295657873, 884215.2056913227], [492810.41759841144, 884215.8598894924], [492562.22616566345, 884219.0767465755], [492395.6389004141, 884221.2348787412], [492229.02637274563, 884223.3933389932], [491895.8219866641, 884227.7141964883], [491562.6179286614, 884232.0347259045], [491229.4181357473, 884236.3516464084], [491022.93068782985, 884239.0265098214], [490563.0139567442, 884244.9890963212], [490228.3850328289, 884249.3266860768], [489896.68097182736, 884253.6265462413], [489730.08091132715, 884255.7850064933], [489563.4769138284, 884257.9474037364], [489568.5769692473, 884889.7184499055], [489574.1684934944, 885582.6845836565], [492902.3800129108, 885541.4887999073], [495575.2709925808, 885508.40553274]]]}]}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="JamesCrandall_0-1687179379832.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/73593iCA9C272FFA9DE462/image-size/medium?v=v2&amp;amp;px=400" role="button" title="JamesCrandall_0-1687179379832.png" alt="JamesCrandall_0-1687179379832.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 19 Jun 2023 12:56:37 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-rest-apis-and-services-questions/geometryserver-buffer-request-error-400/m-p/1300694#M4495</guid>
      <dc:creator>JamesCrandall</dc:creator>
      <dc:date>2023-06-19T12:56:37Z</dc:date>
    </item>
    <item>
      <title>Re: GeometryServer/buffer request error 400 extendedCode -2147024809</title>
      <link>https://community.esri.com/t5/arcgis-rest-apis-and-services-questions/geometryserver-buffer-request-error-400/m-p/1300746#M4496</link>
      <description>&lt;P&gt;Ok looks like the geometries input parameter is not expecting loaded json objects.&amp;nbsp; The solution is to pass in the json.dumps() of the geometries:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;paramsBuff = {'f': 'json',
	      'geometries': json.dumps(geomInput),
	      'inSR': 2881,
	      'outSR': 2881,
	      'bufferSR': 2881,
	      'distances': 250,
	      'unit': 9003,
	      'unionResults': 'true',
	      'geodesic': 'false',
	      'token': tok
	     }&lt;/LI-CODE&gt;</description>
      <pubDate>Mon, 19 Jun 2023 15:50:25 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-rest-apis-and-services-questions/geometryserver-buffer-request-error-400/m-p/1300746#M4496</guid>
      <dc:creator>JamesCrandall</dc:creator>
      <dc:date>2023-06-19T15:50:25Z</dc:date>
    </item>
  </channel>
</rss>

