Update definition with Json - can't find the file to modify

9629
16
03-14-2017 10:36 PM
LidiaDudina
New Contributor II

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! 

Tags (1)
16 Replies
NiekGoorman1
Occasional Contributor

I've tried this on our 10.5.0 portal - trying to add values to a domain. Unfortunately neither using the domain json nor the entire layer's json worked. I keep getting this:

{  "error": {   "code": 500,   "message": "Service 'XXXX'.'FeatureServer' does not exist in folder 'YYYY'.",   "details": []  } }
0 Kudos
JonHawkins
New Contributor II

Daniel

Is there any update on when we can expect to see this enhancement, as I tried to Update the Definition with new JSON but got an error 500 message. My only solution in my 10.6.1 environment was to download the hosted feature layer, update the schema using ArcGIS Desktop, then overwrite the original hosted feature layer on portal. I then had to recreate multiple hosted views of this feature layer and then add these to numerous maps so that the new schema was picked up, as existing layer references did not change on the initial overwrite. 

To make  this change took the best part of a day, so would very much like to see a method to update existing schemas.

Regards

Jon

0 Kudos
DeveloperGtinteg
New Contributor II

Daniel,

We are desperately trying to get the Update Definition to work using our on premise Portal and ArcGIS Server hosted feature services (used for Survey123).  As others have pointed, we also get 'success = true' message, but the definition does not change.  We are merely doing a coded value domain adjustment, using version 10.5.1.

Would greatly appreciate if you or any other ESRI Staff can provide further guidance.

Thanks! 

0 Kudos
GarethBaker1
Occasional Contributor III

We've been using the workaround suggested by Justin above with good results. We're planning an upgrade to ArcGIS Enterprise 10.7.1 soon so will see whether we can get the update definition to work afterwards.

Tolo__AdamTolo
Occasional Contributor

You can also get the JSON by going to the service (don't go to admin mode) and clicking on that little JSON link.

So I am on 10.7.1 and it did not work for me. Got the following error:

I was trying to add a subtype to a feature view though so might be trying to do too much. lol

Hopefully will work for you. Will be good to hear about the results.

0 Kudos
RiceAdam
New Contributor II

This is still the recommended solution for upping maxRecordCount and it's still not working. We're on 10.81 and experiencing this same issue:

RiceAdam_1-1617157852164.png


This is after hitting the JSON file because 'Update Definition' still isn't working and only displays:

RiceAdam_2-1617157894198.png

rather than displaying the JSON definition.

 

0 Kudos
JustinReynolds
Occasional Contributor III

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

    Go to the Share Tab on the Ribbon and Click on ArcGIS Solutions

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