Access ArcGIS Server database content from JavaScript application

1116
2
05-02-2017 01:58 AM
DavidLelouche
New Contributor

I'm trying to access a SQL Server database containing some shapefiles and tables located on an ArcGIS Server.
I managed to access and edit these data with ArcGIS Desktop and arcpy, but I didn't find how to do it in a web application (using ArcGIS JavaScript or Leaflet)

How am I supposed to do ?
For example I would like to query a table to print its content in my application,
or get a shapefile to add it to a webmap (in this case I guess I'll have to publish it)

0 Kudos
2 Replies
RobertScheitlin__GISP
MVP Emeritus

David,

   You access ArcGIS Server services using the REST endpoint for that service. You can get the REST urls from your ArcGIS Server by using http://servername/arcgis/rest/services. Then you can use the JS API Query sample to get you started with JS API code to actually query this service using the JS API.

Query data without a map | ArcGIS API for JavaScript 3.20 

If you want to edit features then you have to publish a Feature Access Feature Service to your ArcGIS Server

What is a feature service?—Documentation | ArcGIS Enterprise 

DavidLelouche
New Contributor

Thanks for your answer, I'll look at the links you gave me.

0 Kudos