English

How To: Add coded value domains to a hosted feature service in ArcGIS Online

Summary

The instructions provided describe how to add coded value domains to a hosted feature service in the REST endpoint in ArcGIS Online. The instructions also can be applied in other instances, such as editing the values inside of a coded value domain for the feature service.

Note:
Users may have to visit each layer to update the parameter if there are multiple layers in the service.

Procedure

Note:
Ensure the feature service is not shared publicly before using this workflow.
  1. Log in to www.arcgis.com with administrator credentials.
  2. Click My Content, and navigate to the intended feature service. Open the feature service.
  3. In the item details page of the feature service, click Service URL under Layers. The ArcGIS REST Administrator Directory page opens.
           Layers
Note:
If the error, "There are no services available" is returned when visiting the ArcGIS REST Administrator Directory, the hosted feature service is shared with 'Everyone' (public).
  1. Modify the URL to the one displayed below, appending /admin between rest and services:
    http://services.arcgis.com/xxxxx/ArcGIS/rest/admin/services/states.FeatureServer/0 
  2. Press Enter to access the new page.
  3. Scroll to the bottom of the page to see the Supported Operations list, and click Update Definition.
  4. Search for the domain parameter (Press Ctrl + F, and search for domain). To add coded value domains, copy and paste the JSON for the domains and change the details as desired.
Note:
It is possible to update or change the order of domains for a feature service as desired using this step.
          Coded value domains
  1. Change the lastEditDate key value to quotation marks with no content quoted in them, " ", as follows:
           lastEditDate
  1. Click Update Layer Definition to save the changes.
            UpdateLayerDefinition
  1. Return to the My Content page and open the feature service in a new web map. The updated coded value domains are now included and displayed as desired:
            Result

Related Information