How to Upload Complete Metadata to AGOL with python

1226
1
03-01-2017 09:47 AM
WilliamIsaacs
New Contributor III

Hi everyone, 

Here is my situation: 

My organization has a firewall and to work around that we have created a python script that will publish feature services to AGOL from a server with a scheduled task. The zip files it downloads from our FTP and extracts and makes .mxd's service definitions and fills in all the blanks so to speak just like someone was manually publishing a feature service with desktop..... except metadata. The metadata exists in the zip file extracted and the script will convert it to the appropriate format for AGOL. I can even manually upload the metadata to AGOL right from the item page on AGOL without any other modifying. 

So here is the questions: 

Is there an endpoint for the upload metadata function (ArcGIS Online >> Feature Service >> Metadata >> Edit >> Open >> Select Metadata File) ? Is this something that already exists that I have missed in the documentation? How are you handling the publishing of metadata to AGOL feature services when you have automated the process outside of Arc Desktop environment?

Any help or comments would be appreciated  

1 Reply
AndrewKeith3
Occasional Contributor

I had the same question and found this:

arcgis-admin-python-scripts/updateMetaPy3.py at master · Esri/arcgis-admin-python-scripts · GitHub 

I also found that if you have the metadata in the geodatabase on the feature class and use ArcGIS Pro to publish, the metadata will be published with the data automatically.

It probably needs to be referenced in the Documentation somewhere so we can find it.

0 Kudos