I am trying to edit a feature layer from feature server on our Portal with admin rest end point (which looks similar to this link but with our portal web-addres):
http://services.arcgis.com/xxxx/ArcGIS/admin/services/Locations.FeatureServer/0
In many instructions it suggested to scroll down the page, click on 'update definition' and make required changes to provided html or json file. Example of the step is described in this article:
How To: Update the maximum record count for feature services in ArcGIS Online
I follow all the steps and get to "UpdateDefinition" page, but Input window is black. I expected to find there json or html file representing the current layer.
I need to update definition to reorder the points in the layer. Any ideas why nothing is in my input field?
thanks!
I use ArcGIS Online. Our path looks like:
https://services.arcgis.com/xxxx/ArcGIS/rest/admin/services/Locations/FeatureServer/0
with "rest" inserted and no dot before "FeatureServer".
But I think you would receive a bad URL message if what you were using was incorrect.
I can get to the correct pages. I see update definition link and can click on it.
Once you on the next page, in the input box, do you see the the text in the box or is it black for you?
From documentation that I read, I understand that the layer in json (or html) format will be in the input box. I can then copy, edit and paste back to modify it. But my input box is blank. Just checking whether it is supposed to be blank or not.
Thanks!!!
You should see json in the text box. Again, I am using AGOL, so my screen is slightly different. Where yours says "Input", mine says "Update Layer Definition".
On the preceding page (the one with the link "Update Definition" at the bottom), is there text that describes the feature/table? At the top of that page, is there a link for "JSON"?
We are also having the same issue, and like the original poster, we are hosting the service on premise, not using AGOL.
Have any of you found a solution to the original question? We are having the same issue while attempting to Update Definition on a local ArcGIS Server 10.4.1 rest service. This problem does not occur with an ESRI-hosted feature service, just with local, AGS-hosted rest service (feature services).
Scenario: Published Oracle enterprise db (sde 10.1) feature classes/table to AGS 10.4.1 using ArcGIS Desktop 10.4.1. Fields that are set to required with a domain assigned are the problem. The JSON for each rest service shows that the templates default values for those fields are set to 0 or " " - instead of null. No way to fix this otherwise.
Any resolution on this? I've got the blank update definition window as well on a service that I created in Portal.
Lidia Dudina Randy BurtonTownsville Council Jill Andrea Stokes, admin Gavin Burgess
Thank you all for your patience and for being so diligent in assisting each other.
There is actually a logged enhancement in our system to address this. It is expected that the Update Definition operation for Portal would be different than that seen in ArcGIS Online, but there is still a means of using this operation without having to construct the entire JSON manually.
You can either:
- Construct the JSON for the portion that you would like to update. For guidance on the specific syntax to be used, you can refer to the following developers documentation:
Update Definition (Feature Layer)—ArcGIS REST API: Services Directory | ArcGIS for Developers
- Get the JSON for the entire service by simply adding ?f=pjson to the end of the service URL.
Example: https://server/webadaptor/rest/services/Hosted/AEDs/FeatureServer?f=pjson
This will return the formatted JSON for the service that you can then use in the operation.
I hope this helps you all!
-Daniel
I would add that just adding ?f=pjson gave me a partial definition.
To get everything I also needed to add /admin
Example: https://server/webadaptor/rest/admin/services/Hosted/AEDs/FeatureServer?f=pjson
-Justin
Has anybody had any success getting this to work in a Portal 10.6 environment? I've got a simple hosted feature service layer for which I want to add an extra value into the domain on one of the fields. I've used the second method above to get the json for the part I want to update and have posted via the update definition page for the layer. I get a message back saying success is true but the change doesn't seem to have come through to the layer itself.
My JSON update is simply adding an extra year (2020) to the domain:
{
{
"fields": [
{
"name": "audit_year",
"alias": "AUDIT_YEAR",
"domain": {
"type": "codedValue",
"name": "Year2",
"description": "Year",
"codedValues": [
{
"name": "2017",
"code": 2017
},
{
"name": "2018",
"code": 2018
},
{
"name": "2019",
"code": 2019
},
{
"name": "2020",
"code": 2020
}
]
}
}
]
}
}
I'd prefer not to go back and have to republish my service if at all possible. Would be good to see this functionality added to the standard user interface in Portal as is now available in AGOL.
Thanks
Gareth