Select to view content in your preferred language

Unable to paginate through feature service query

491
0
01-30-2023 09:06 AM
AndrewRiesenberger
New Contributor

Hi,

This documentation says I should be able to pass in resultRecordCount as an argument when querying a feature service. However when I try that with the below request:

 

 

curl 'https://REDACTED/arcgis/rest/services/REDACTED/REDACTED/FeatureServer/query?layerDefs=%5B%7B%22layerId%22%3A0%2C%22where%22%3A%221%3D1%22%7D%5D&geometry=&geometryType=esriGeometryEnvelope&inSR=&spatialRel=esriSpatialRelIntersects&time=&outSR=&havingClause=&gdbVersion=&historicMoment=&returnDistinctValues=false&returnGeometry=false&maxAllowableOffset=&returnIdsOnly=false&returnCountOnly=false&returnZ=false&returnM=false&geometryPrecision=&multipatchOption=xyFootprint&returnTrueCurves=false&resultOffset=&resultRecordCount=1&sqlFormat=none&f=pjson'

 

 



I get the response:

 

 

{
 "error": {
  "code": 400,
  "message": "Unable to complete operation.",
  "details": [
   "Unable to perform query."
  ]
 }

 

 


The server logs say:

Error: Invalid pagination clause specified. First specify order by clause, then pagination clause. .

Unfortunately there is no option to pass an order by clause using the web interface

124124566.PNG

and if I try to pass it manually using the convention specified in the documentation it has no effect.

 

 

curl 'https://REDACTED/arcgis/rest/services/REDACTED/REDACTED/FeatureServer/query?layerDefs=%5B%7B%22layerId%22%3A0%2C%22where%22%3A%221%3D1%22%2C%22resultRecordCount%22%3A1%7D%5D&geometry=&geometryType=esriGeometryEnvelope&inSR=&spatialRel=esriSpatialRelIntersects&time=&outSR=&havingClause=&gdbVersion=&historicMoment=&returnDistinctValues=false&returnGeometry=false&maxAllowableOffset=&returnIdsOnly=false&returnCountOnly=false&returnZ=false&returnM=false&geometryPrecision=&multipatchOption=xyFootprint&returnTrueCurves=false&resultOffset=&resultRecordCount=1&sqlFormat=none&f=pjson&orderByFields=objectd'

 

 


Response:

 

 

{
 "error": {
  "code": 400,
  "message": "Unable to complete operation.",
  "details": [
   "Unable to perform query."
  ]
 }
}

 

 



 I am using ArcGIS enterprise 10.81

0 Kudos
0 Replies