27

That map service is a ArcGIS Server Dynamic Map service which typically only returns images and specific query results, much like a WMS. Some ArcGIS Server image services allow for data download, but this isn't one of those. You can get the information you're looking for through the query operation, but it will take multiple queries as the max record ...


11

I finally found what I was looking for: a proper ArcGIS Server web endpoint that I could use to generate tokens! The call is this: GET http://<arcgisserver_host:port>/arcgis/tokens?request=getToken&username=<usr>&password=<usr>&expiration=<token_lifespan> which gives back the token into the HTTP response body, and one ...


9

I always find myself in situations where I need to export all the data from a Map Service into a shapefile. Here is a very easy utility to use that will export every feature from a service and save it as a shapefile and geojson if you need it. You will need to have or install node.js. https://github.com/tannerjt/AGStoShapefile Once you've put the files ...


9

You should have a look at the REST Help for GP Task To run the geoprocessing task, you need to provide an input. If your GP Service is Synchronous, then you need to call the Execute Operation. If your service is Asynchronous, then you need to call the SubmitJob Operation. Both of them take their input parameter in JSON Format. In the case of a Synchronous ...


7

It's fairly easy with urllib2. Say you've got a gigantic url like this: http://myserver/path/to/a/thing?json1={"data":[1,2,3,4,5]}&json2={"data":[1,2,3,4,5]}&json3={"data":[1,2,3,4,5]} All you need to do is take the query (everything after the ?) and jam it in the data argument to urlopen. import urllib2 import urlparse # GET return_data = ...


7

Please have a look at How ArcGIS Server Security works. Basically, you will need to make users and groups, and give a particular User rights over certain services. Once you have done that, then you need to use Token based security in your JavaScript Application. What this means is that, you ask the User for their UserName & password. That is sent to ...


7

I just uploaded a script uploads a CSV and publishes as a github-gist. You may want to change the input as right now its setup to run at command line and enter parameters manually when you execute. The credit goes to a co-worker of mine who shared this with me. I haven't extensively tested it, but it worked for the case I was trying. Note that it does rely ...


6

Use esri.request() to hit each layer's REST endpoint to get info about fields. Here's a simple example: <html> <head> <script type="text/javascript">var djConfig = {parseOnLoad: true};</script> <script type="text/javascript" src="http://serverapi.arcgisonline.com/jsapi/arcgis/?v=2.4"></script> <script ...


6

You can use the Identify Operation on the Mapservice to get the pixel values from the raster. Using the Identify Operation on a map service with Rasters, I can get both the Pixel value, as well as the stretched values:


6

For Post Request You send it over inside a form in the body with the key token and the value is the token you received from this document explaining how to get token For Get Request You can send them over via a query parameter attached to the url https://services1.arcgis.com/dis-mine/arcgis/rest/services/my-name/FeatureServer/0/query?where=blahblah*...


5

I've checked requests which were sent in ArcGIS Online to add Feature Service with Chrome dev tools and found that it uses 4 requests: Create Service - create feature service with REST API without layers, see http://resources.arcgis.com/en/help/arcgis-rest-api/#/Create_Service/02r30000027r000000/ update Service item - fix service name, see http://resources....


5

You can use my restapi module. It is very simple to do these kinds of things: import restapi import os url = 'http://gis.mda.state.mn.us/arcgis/rest/services/MN_Agriculture_EAB_Detection/MapServer' # reference map service mapService = restapi.MapService(url) # reference quarantine county layer so we can get a single feature quarantines = mapService....


5

The answer is 'yes' and 'no'. Let me explain. As Bill mentioned, there are plenty of implementations of various OGC standards WFS, WMS, TMS, etc. (see Geoserver, Mapserver, Tilestache, etc). However, I would guess that when some of your customers ask for this, they may mean ESRI ArcGIS Server REST Endpoints with ESRI-specific services. The answer as of ...


4

The only time I have had problems with relationship classes that exist in SDE not being automatically published in a map service was because there is a problem with permissions on the account I was publishing with to see the related table in SDE. How are you adding related feature classes/ tables to the .mxd? Is it the same user/version as the key feature ...


4

I get no results when I search the GeoServices REST Specification Version 1.0 whitepaper for "transformation". It looks like Esri exposed IGeometry.Project but not IGeometry5.ProjectEx5 (for REST). Implementing this would be complicated. AFAIK there are no WkID's for geotransformations. IGeoTransformation.Name is not an industry standard (?) so using ...


4

If you set transparency only on one layer in your ArcMap file you should save it as MSD () and NOT mxd and in javascript init ArcGISDynamicMapServiceLayer with imageParameters.format = "png32"; Here are some links to similair posts on ESRI forum: http://forums.arcgis.com/threads/27413-layer-transparency-not-working http://forums.arcgis.com/threads/10011-...


4

Download data stored on an ArcGIS REST MapServer one layer at a time using the command line and the Python package pyesridump. Example command: esri2geojson http://gis.naperville.il.us/arcgis/rest/services/OpenData/OpenDataMapService/MapServer/4 naperville_parking_lots_122417.geojson


4

I solved this problem by publishing a gp service with "Add Field" toolbox.To invoked this gp service via javascript api.As shown :


4

There is a C++ SDK of FileGDB API to handle FileGDB, and this may help you. You can build a web service wrapping local operations of FileGDB API, make it RESTful to be consumed by Javascript API.


4

It looks like either the Query or the Identify tasks will do the trick. I successfully adapted this sample to prototype this functionality using the ArcGIS JavaScript API: var qt1="http://localhost:6080/arcgis/rest/services/simple_ny_outline/MapServer/0" var queryTask = new esri.tasks.QueryTask(qt1); var query = new esri.tasks.Query(); query....


4

This is a template that I created and use as a boilerplate for most of my SOE projects. I hope this helps.


4

In 10.0 (and I believe 10.1 also), you can query dates using the syntax of the underlying database -- for example, in Oracle you can use "TO_DATE('yyyy-mm-dd hh:mm:ss','YYYY-MM-DD HH24:MI:SS')" See documentation here: http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#/SQL_reference_for_query_expressions_used_in_ArcGIS/00s500000033000000/ This ...


4

What you need to do, is to query your ArcGIS Server REST Endpoint via JSON, and then Parse the Result. Let us take the example of the ArcGIS Online Sample Server that you are using. You normally use http://sampleserver3.arcgisonline.com/ArcGIS/rest/services as the url in your browser. But if you append an ?f=json at the end of it, the server responds in ...


4

Turns out that ESRI just added this feature, but only for users of ArcGis server - the public server will have it turned off. The feature is called ExportTiles and it has been introduced in 10.2.1 for REST API: It'll export things into ArcGis's .Tpk or bundled image formats.


4

Regarding your question as to whether you can edit a feature layer using the REST API, the answer is yes. See the Apply Edits section of the REST API for documentation on how do this this. However, if it's only the status of the alarms which is changing every 15 minutes, you could make the change purely within the web map (without needing to change the ...


4

I couldn't find this syntax listed anywhere so I'm sharing it in case it helps someone else. import urllib, urllib2, json serviceEndPoint = "http://<server>/ArcGIS/rest/services/<name>/FeatureServer/<ID>/" #Query the server for the objects to be deleted params = urllib.urlencode({'where': <whereclause>, 'f': 'json', 'returnIdsOnly':...


4

I'm successfully using this method to obtain a token: def get_token(): # Retrieve a token from ArcGIS Online to enable access to private services token_params = { 'client_id': "your_client_id", 'client_secret': "your_client_secret", 'grant_type': "client_credentials" } request = requests.get('https://www.arcgis.com/...


4

Yes this is possible! There are multiple approaches for this. You can install Apache http server from here and you have to configure modjk module in this using modJk configuration (You will define worker and properties here and you can add your ArcGIS server IP here) Now you just have to call your public IP with arcgis and modjk module of Apache HTTP ...


4

You need to make a request to the ?query endpoint of the layer, and supply a where clause. Specify &f=json to receive the response in JSON. Note that ArcGIS Server by default only returns the first 1000 records, so you may need to batch your requests using OBJECTID ranges as the where clause until you've retrieved all records, using this syntax: http://...


4

As with the ArcObjects question above, the answer is to include a second single quote: &where=locality = 'O''CONNELL'


Only top voted, non community-wiki answers of a minimum length are eligible