resultRecordCount is being ignored when using python to query a hosted feature layer's REST API

297
1
Jump to solution
01-24-2024 09:19 AM
Labels (1)
SteveF
by
New Contributor III

Hi,

I am querying the REST API of a hosted feature layer using a Notebook within ArcPro 3.1.0. The query without any pagination returns 200 records.

pic1.PNG

If I add resultOffset of 0 and resultRecordCount of 25.  The resultRecordCount seems to be ignored and all 200 records are returned.

pic2.PNG

If I set the resultOffset to 25 I get 175 results.  Again ignoring the resultRecordCount but returning results from the offset position.

pic3.PNG

If I use the REST API web page instead and query using resultOffset of 0 and resultRecordCount of 25 it works and returns 25 records as expected.

image.png

 

Has anyone else ran into this issue?

Any suggestions?

 

 

 

0 Kudos
1 Solution

Accepted Solutions
SteveF
by
New Contributor III

I figured it out myself.

an extra parameter is needed
return_all_records

and needs to be set to false or the resultRecordCount will be ignored

View solution in original post

0 Kudos
1 Reply
SteveF
by
New Contributor III

I figured it out myself.

an extra parameter is needed
return_all_records

and needs to be set to false or the resultRecordCount will be ignored

0 Kudos