Add REST endpoint service to web map without web adaptor

10-29-2020 08:36 AM
Occasional Contributor III

My organization is working on migrating to using Portal/Enterprise 10.8. Previously, all our web maps/apps were consumed in ArcGIS Online. Certain users had AGOL user types/roles that allowed them to edit data that references our REST endpoint feature service. Our current plan has been to migrate internal web apps/maps to Portal and have users edit "new" versions of these web maps referencing features services residing in the server we've federated with the Portal. As it turns out, due to license limitations, we can no longer furnish enough users with editing capabilities to continue the same workflows as we had previously.

Our idea was to create new web apps from javascript templates instead of using Web AppBuilder. This in theory would allow us to include references to the server directly, rather than going through the web adaptor. I'm trying to test this workflow by creating a blank web map in portal, and adding a service to it with a modified url that does not go through the web adaptor, but for life of me I can't get the layer to appear in the web map. i consistently get the "[layer] cannot be added to the map" error. According to ESRI's documentation, in order to reference a service without using the web adaptor, my url structure should be:

Is this idea even possible? Can I include services in a federated server itno a web map that doesn't route through the web adaptor?
2 Replies
Occasional Contributor III

"No answer was the stern reply" after a year, so I suppose sadly that there is no REST interface to webmaps, which is what I wanted to do to get a thumbnail using all the nice formatting in the webmap by someone else.

0 Kudos
New Contributor III

FWIW (very late reply)...  The direct url format given above is correct, but it's for a mapservice, from a server; not for a webmap, from a portal.  To retrieve portal data via a direct url, you'll first need to know its itemid (snoop around a bit).  AND, it needs to be shared publicly (or you'll have to separately deal with the oauth stuff).  Start by testing this base (this is mainly to verify you didn't change the default name/port/etc):


(adjust as needed for your specific install until successfully reach portal's rest root)

Then, for the portal item's metadata, append:  /content/items/abcdef0123456789/itemdata?f=json

(where "abcdef0123456789" is the itemid of the portal item desired)

Or for the actual webmap data itself, instead append:  /content/items/abcdef0123456789/data?f=json

0 Kudos