How To: Update the maximum record count for feature services in ArcGIS Online
The maxRecordCount property is used to define how many features can be accessed when querying data in a hosted feature service, or when creating a local copy of a hosted feature service for use with ArcMap. The default maxRecordCount value is 1000.
A feature service's maximum number of records in the REST endpoint can be changed by increasing the maxRecordCount value.
Note: The number of features displayed in a web map is no longer determined by the maxRecordCount. This article describes how to increase maxRecordCount for querying from REST or for creating a local copy of a service in ArcMap.
Warning: The workflow below currently causes an unresolved defect for feature services with view layers. Once the 'maxRecordCount' parameter is updated, any subsequent view layers created for this feature service will be rendered un-editable in web maps, even when their editing settings are enabled. It is not currently recommended to carry out the below workflow if you intend to create any new view layers for this feature service. Refer to BUG-000142124: "After updating the 'maxrecordcount' parameter for a Feature Layer, the 'Edit' option is not available for subsequently created Hosted Feature Layer Views in Map Viewer even after editing has been enabled in in the Item's Settings".
Defect for reference:
- BUG-000142124 - After updating the 'maxrecordcount' parameter for a Feature Layer, the 'Edit' option is not available for subsequently created Hosted Feature Layer Views in Map Viewer even after editing has been enabled in in the Item's Settings
The instructions provided describe how to update or change the maximum number of records of feature services in the REST endpoint in ArcGIS Online.
Note: It may be necessary to visit each layer to update the parameter if there are multiple layers in the service.
Note: The max record count determines the maximum number of features that can be returned in a single request. When a service has this set too high, a client can try to request all the data in a single request that is slow to generate and too large to send across the Internet.
Ensure the feature service is not shared publicly with everyone before using this workflow.
- Log in to www.arcgis.com with administrator credentials.
- Click My Content, and navigate to the intended feature service. Open the feature service.
Note: If the error message, "There are no services available" is returned when visiting the ArcGIS REST Administrator Directory, the hosted feature service is shared with 'Everyone' (public).
- On the right side of the feature service details page, in the URL section, click View.
- In the ArcGIS REST Services Directory window, click Admin on the top right of the page.
Note: Refresh the page if the Admin button is unavailable.
- Under Layers:, select the desired feature layer.
- Scroll to the bottom of the page, and click Update Definition.
- Change the value of the lastEditDate key to null.
- Search for the maxRecordCount parameter (Press Ctrl+F and search for maxRecordCount). Change the value to the desired number of records.
- Click Update Layer Definition.
In this example, a maximum of 2000 features can now be returned when querying from REST or when creating a local copy of the service in ArcMap.
- ArcGIS REST APIs: Update Definition (Feature Service)
- ArcGIS REST APIs: Update Definition (Feature Layer)
- Error: Layer did not draw completely because there are too many features to display
Last Published: 6/28/2022
Article ID: 000012383
Software: ArcGIS Online Current