I am adding Features via a Rest EP Feature Service like below...
But before I do this I need to DELETE all the records...
I can do this via ArcGIS REST but not sure how to write that into python?? DELETE WHERE 1=1
gis_payload = {
'f': 'json',
'features': f'''{featureAdding}'''
}
url = "https://xxxxx.gov/env/rest/services/Prediction/ReadFeature/FeatureServer/0/addFeatures"
payload = featureAdding
files=[]
headers = {}
response = requests.request("POST", url, headers=headers, data=gis_payload, files=files)
Solved! Go to Solution.
Think I got it with this
url = "https://xxx/env/rest/services/Prediction/ReadFeature/FeatureServer/0/deleteFeatures"
whereclause='1=1'
gis_payload = {
'f': 'json',
'where': f'''{whereclause}'''
}
response = requests.request("POST", url=url, data=gis_payload)
Think I got it with this
url = "https://xxx/env/rest/services/Prediction/ReadFeature/FeatureServer/0/deleteFeatures"
whereclause='1=1'
gis_payload = {
'f': 'json',
'where': f'''{whereclause}'''
}
response = requests.request("POST", url=url, data=gis_payload)