I also get 'success = true' message, but no changes to the definition are made. We are able to get this to work using the Python API. If you are looking for a solution without writing your own scripts you can try using ArcGIS Solutions Deployment Tool.
http://solutions.arcgis.com/shared/help/deployment-tool/
Requirements
Software
- ArcGIS Pro 2.1 to 2.2 and
- ArcGIS Online subscription, or
- ArcGIS Enterprise 10.5 - 10.6 (Standard or Advanced) with managed data store
Download and Install ArcGIS Solutions
Open ArcGIS Pro
In the Share Tab, Deploy Group - Open ArcGIS Solutions
Notice New 'Task' Pane (bottom left)
Click 'Configure an ArcGIS Solution'
Skip the Introduction - Click 'Next Step'
Skip Step 2 - Click 'Skip'
Choose an Input Layer
Use the folder Icon if your layer is not apart of your project already.
If the layer is in your contents and is your active map use the drop down menu.
Choose the field with the domain you want to update
If a domain exists for that field the rest of the parameters will auto populate.
Here the original domain had a single value ('02xxXXXX.xxxx).
I am appending a new coded value ('Add new Coded Value here') to test
You can append, delete, or modify the current values
I navigated to our Enterprise Portal to grab a hosted layer of interest
Error Code: 500
Here we have more than one hosted layer in Portal that has a domain named 'FDT_Proctor'
The domain will need to be a unique domain name (I find this a bit annoying, but work around it)
We got the same error in our own scripts before we started passing a unique domain name.
Success
Checking the result to confirm.
This doesn't solve the original problem of manually updating the service definition, but hopefully you can use this workaround.
-Justin
(hat tip to Nathan Davis and Stephen Patterson)
- Justin Reynolds, PE