How to Copy and Edit a Web Map with the REST API

3221
4
Jump to solution
01-29-2016 04:28 PM
NilsBabel
Occasional Contributor II

Can anyone provide an example or point me in the right direction on how to copy and edit a web map in ArcGIS.com using the REST API?  I've read the documentation on web maps in the ArcGIS REST API Maybe I missed it but I don't see any examples of how to create/save or edit an existing web map.  It just documents the web map format.  Which is fine, I could use the documentation to write a web map with the correct specifications but I don't know how to save it to my ArcGIS.com site and give it a web map ID. 

I've used the ArcGIS Online Assistant which is very useful but again it doesn't really help me automate it. 

What I would like to do is write a script that creates or copies a web map and changes the filter on a layer in the map.  Has anyone done this before or have any suggestions?

Thanks!

0 Kudos
1 Solution

Accepted Solutions
ReneRubalcava
Frequent Contributor

You want to look at the "Manage your organization" portion of the REST API. This relates to the portal API and how you can add/delete items.

ArcGIS REST API

You should be able to put something together with the information there.

View solution in original post

4 Replies
ChadKopplin
Occasional Contributor III

Are the map services in the map published as feature services?  It has to be a feature service in order to edit.

0 Kudos
NilsBabel
Occasional Contributor II

Yes, they are feature services.

0 Kudos
ReneRubalcava
Frequent Contributor

You want to look at the "Manage your organization" portion of the REST API. This relates to the portal API and how you can add/delete items.

ArcGIS REST API

You should be able to put something together with the information there.

NilsBabel
Occasional Contributor II

Ahh, thanks.  I think I neglected that part.  I'll take a look. 

0 Kudos