Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

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.

share|improve this question
add comment

3 Answers 3

up vote 2 down vote accepted

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.

share|improve this answer
    
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
add comment

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

share|improve this answer
add comment

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?

share|improve this answer
    
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
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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