get 404 error "Service Hosted/<FEATURE_SERVICE_NAME>/MapServer not found "

403
1
03-09-2023 08:45 AM
ryanh
by
New Contributor II

I am new to ARCGIS. 

I am able to upload a .geojson to the map and publish it with REST API.

que.PNG

However, when I try to update styles for the feature layer with REST API. I get the 404 error "Service Hosted/sfamap/MapServer not found "

 

 

curl -s --insecure --location -e "{{ ARCGIS_URL_PORTAL_REST }}" --request POST "{{ ARCGIS_URL_ADMIN_HOSTED }}/Hosted/{{ FEATURE_SERVICE_NAME }}/FeatureServer/0/updateDefinition" \
                --header "Content-Type: application/x-www-form-urlencoded" \
                --data-urlencode "updateDefinition={
                   "drawingInfo": {
                        "renderer": {"type":"simple","symbol":{"color":[255,255,0,255],"size":6.75,"angle":0,"xoffset":0,"yoffset":0,"type":"esriSMS","style":"esriSMSCircle","outline":{"color":[26,26,26,255],"width":1.5,"type":"esriSLS","style":"esriSLSSolid"}}},
                        "transparency": 0
                     }
                }" 
               --data-urlencode "f=pjson" \
               --data-urlencode "token={{ cjmkt_token }}"

 

 

 

0 Kudos
1 Reply
JackFanZhang
Occasional Contributor

Hi Ryanh, I got the same error today. It was working fine before we restarted the server box. Have you ever worked out the cause of the issue?

0 Kudos