Select to view content in your preferred language

Via only ArcGIS API for python script, Is there a way to publish/overwrite an ArcGIS Online MMPK file?

08-12-2019 03:20 PM
New Contributor III

I have manually been publishing an Mobile Map Package (.mmpk) within ArcGIS Pro 2.2 using the "Share Mobile Map" interface. However, I update this same .mmpk every month, and have been trying to figure out how to use ArcGIS API for python to update/publish/overwrite the my mmpk file on ArcGIS Online, but have been unsuccessful.

We do NOT have Portal/Enterprise. We only have ArcGIS Online. Is there a way to do this? If so, would someone provide a sample for this?


0 Kudos
2 Replies
New Contributor III

I've only used this in Portal, but the API documentation seems to indicate that the same process I use ought to work for AGOL. See my answer on the Portal version of this question: 

You'll obviously need to tweak my 2nd line to connect to AGOL instead of Portal.

Edited to add:

I update the .mmpk itself by using then get it into Portal using the above.

Create Mobile Map Package—Data Management toolbox | ArcGIS Desktop 

Since you're in AGOL, I'm pretty sure the function below could work if you didn't feel like loading both arcpy and arcgis modules:

Share Package—Data Management toolbox | ArcGIS Desktop 

(I couldn't get the above to work in Portal. I think it only works for Portal if you run it within Pro itself.)

0 Kudos
New Contributor III

Thank you very much for your reply, Josh.

I will take a look at your script and give it a try.

Best Regards,


Mariette Shin

Information Systems Analyst III - GIS

Marin Municipal Water District

220 Nellen Avenue

Corte Madera, CA 94925

t 415-945-1443<>

Follow us on the Web<>, Twitter<>, Facebook<>, Nextdoor<>, and our Blog<>.

0 Kudos