I have some ArcGIS Online maps and want to reference a simple data source like a CSV or XML file. I know that I can upload the file, but is there a way I could programmatically upload the data file on a scheduled basis? Or in other words, is there an API that I can use in a program or script that allows me to send data files to my ArcGIS Online storage location?

The first thought I had was to write a program that connects as me and sends the file by POSTing to the web service, but there might be a better way.


Take a look at the Add Item and Publish Item operations in the REST API. There are some good examples of using the REST API with Python on Github (e.g., the Esri AGO Tools repository and oevans's GIST. There are some in the ArcGIS Javascript API, too.

  • I should have checked Github, didn't realize there is so much GIS/Python code available. I haven't tried it yet, but since the second code link shows how to get the token and use it I'm sure this is the way to go. Thanks. – Bratch Sep 23 '13 at 23:58

Yes, there is the ArcGIS Portal REST API, which should cover your needs.


Well there is the ArcGIS REST API, which Petr mentioned, but there is also the ArcGIS JavaScript API as well as an experimental Python API for ArcGIS Server (not the same but there is probably some overlap) on the ESRI Github site.

What language and platform are you developing for?

  • I found the REST API, but not specifically how to upload a file to ArcGIS Online yet. Since it's REST, I can use just about anything here to communicate with it. We're mostly an MS shop and I can use C# or PowerShell to test it, but we can also use Python, whatever is best to make it happen. – Bratch May 21 '13 at 20:37
  • 1
    I checked into the ArcGIS JavaScript API and found a video on developing for ArcGIS Online - video.esri.com/watch/1218/developing-with-arcgis-online. At 41 minutes it mentions generating a token and using Content/AddItem, but no example. I found some other resources that will keep me busy with this for a while now. – Bratch May 21 '13 at 21:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.