AnsweredAssumed Answered

How to get AGOL data and display it on a SharePoint page using JavaScript

Question asked by admin_emap on Jul 6, 2020
Latest reply on Jul 6, 2020 by MDonnellyesriaustralia-com-au-esridist

Is there a way to connect to AGOL using JavaScript in SharePoint to display map data on a page or copy it TO a SharePoint list?

If I were to create a JS file and use REST, what would the connection look like?  Something like this which connects to a sharepoint list, but I want to connect to the AGOL database - what ever that is.

url: siteurl + "/_api/web/lists/getbytitle('Air')/items?$filter=Id eq '" + ID + "'",
method: "GET",
headers: { "Accept": "application/json; odata=verbose" },
success: function (data) {
/* function hit if ajax call to is successful */
if (data.d.results.length > 0 ) {