I'm trying to follow the documentation on this page: Create Map Area—ArcGIS REST API: Packaging Service | ArcGIS for Developers but I get an "Services Directory has been disabled" error message.
I have tried with this WebMap, using POST:
curl -X POST \ 'https://packaging.arcgis.com/arcgis/rest/services/OfflinePackaging/GPServer' \ -H 'cache-control: no-cache' \ -H 'content-type: multipart/form-data; boundary=----WebKitFormBoundary7MA4YWxkTrZu0gW' \ -F mapItemId=4965122d0a9c4ea187fa643cda58c670 \ -F token=MY_TOKEN_HERE
And also GET:
curl -X GET \ 'https://packaging.arcgis.com/arcgis/rest/services/OfflinePackaging/GPServer?mapItemId=4965122d0a9c4ea187fa643cda58c670&token=MY_TOKEN_HERE' \
Am I doing something wrong?
Thanks in advance,
Raúl
cc: Patrick Arlt, John Gravois, Matthias Schenker, Paul Ross
First, URL should be <SPAN class="">https:</SPAN>/<SPAN class="">/packaging.arcgis.com/arcgis</SPAN><SPAN class="">/rest/services</SPAN><SPAN class="">/OfflinePackaging/</SPAN>GPServer/CreateMapArea/submitJob
First, URL should be
<SPAN class="">https:</SPAN>/<SPAN class="">/packaging.arcgis.com/arcgis</SPAN><SPAN class="">/rest/services</SPAN><SPAN class="">/OfflinePackaging/</SPAN>GPServer/CreateMapArea/submitJob
</CODE></P><P><CODE>Second, in POST encode form parameters using "application/x-www-form-urlencoded" (instead of "multipart/form-data")<BR />
Thank you very much Ramunas Kraujutis, I have just tried this:
curl -X POST \ https://packaging.arcgis.com/arcgis/rest/services/OfflinePackaging/GPServer/CreateMapArea/submitJob \ -H 'cache-control: no-cache' \ -H 'content-type: application/x-www-form-urlencoded' \ -d 'mapItemId=4965122d0a9c4ea187fa643cda58c670&token=MY_TOKEN_HERE'
But I'm still getting the same response, maybe I didn't understand your message, did I?
Cheers,
Raul
Try adding "f=json" to "-d 'f=json&mapItemId=4965122d0a9c4ea187fa643cda58c670&token=MY_TOKEN_HERE'"
Thanks Ramunas Kraujutis!! it works now!
So finally I created this item: http://www.arcgis.com/home/item.html?id=444e615e7b9f471ab2a4c5d9194b538e#overview
I have added this request to a Postman collection we started on Github.
Thanks again!
Sir, I m facing an issue at the very next stage of this packaging service "Setup Map Area". While submitting job went successful, it gives job failure error on the status check which I posted in this question.
https://community.esri.com/message/756213-error-in-executing-agol-rest-api-packaging-service
Can you help me in figuring out how to set these parameters which I highlighted in red color.
Aangemelde leden kunnen berichten plaatsen, updates volgen en meer. Nieuw hier? Registreer een gratis account.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.