laptop and a wrench

Bug

The sample JSON provided on the ArcGIS REST APIs: Add To Definition (Feature Layer) for adding new fields contains errors, resulting in failure to add fields through the admin API.

ArcGIS Online
Bug ID Number BUG-000162149
SubmittedOctober 17, 2023
Last ModifiedMarch 19, 2025
Applies toArcGIS Online
Version foundOct 2023
Operating SystemWindows OS
Operating System Version10.0 64 Bit
StatusIn Review

Workaround

Modify the JSON by removing 50/1 after the GlobalID field and removing single quotes from 'A' in the default value of the "str2" field.

  

{ 

"fields": [ 

{ 

"name": "GlobalID", 50/1 

"type": "esriFieldTypeGlobalID", 

"alias": "GlobalID", 

"nullable": false, 

"editable": false 

}, 

{ 

"name": "date1", 

"type": "esriFieldTypeDate", 

"alias": "date1", 

"nullable": true, 

"editable": false, 

"domain": null, 

"defaultValue": "GetDate() WITH VALUES" 

}, 

{ 

"name": "str2", 

"type": "esriFieldTypeString", 

"alias": "str2", 

"nullable": true, 

"editable": true, 

"domain": null, 

"defaultValue": "'A' WITH VALUES" 

} 

  

] 

} 

Steps to Reproduce

Bug ID: BUG-000162149

Software:

  • ArcGIS Online

Get notified when the status of a bug changes

Download the Esri Support App

Discover more on this topic

Get help from ArcGIS experts

Contact technical support

Download the Esri Support App

Go to download options