How to frame the post request to update the data using Apply Edits

372
2
02-05-2024 10:39 PM
Labels (2)
webjack
New Contributor

Using Apply Edits Rest API I have to update the four fields location_uuid, geography_uuid, status and location_update_date based on globalid, need to know how to frame the url.

webjack_0-1707201668492.png

 

0 Kudos
2 Replies
jcarlson
MVP Esteemed Contributor

I may be unfamiliar with the phrase, but what do you mean "frame the url"? Just how to actually apply the edits?

https://url-to-portal/rest/services/Hosted/your_feature_service/FeatureServer/0/applyEdits?edits=[your json object]&token=[some token]

 

- Josh Carlson
Kendall County GIS
webjack
New Contributor

How to make post request to update these field and send these four attribute values as json data, I am trying to send like this but values are not updating.

payload = {

    "updates": [

        {

            "attributes": {

                "globalID": "<Your_GlobalID_Here>",

                "location_uuid": "<New_Location_UUID>",

                "geography_uuid": "<New_Geography_UUID>",

                "status": "<New_Status>",

                "location_update_date": "<New_Location_Update_Date>"

            }

        }

    ]

}

0 Kudos