Using REST API for spatial analysis

4757
3
06-18-2014 06:16 AM
DamianoMorosi
New Contributor
Hi all,

I have the following problem. I'm trying to access the ArcGIS Online services as described here:

http://resources.arcgis.com/en/help/arcgis-rest-api/index.html#/Accessing_services_provided_by_Esri/...

I succeeded in getting a token and also the test with the routing service (proposed in the same guide) has gone well.
Now, if I try to access to one of the services under the "Spatial analysis" category, simply checking for the input parameters using an url like the following:

http://analysis.arcgis.com/arcgis/rest/services/tasks/GPServer/AggregatePoints?f=pjson&token=<My Token>

I always get the same error:

{
  "error" : {
    "code" : 401,
    "message" : "You do not have permissions to use this resource.",
    "details" : [ ]
  }
}

Am I missing something? Should I do something to enable the use of the spatial analysis services?

Thank you
0 Kudos
3 Replies
ChristopherMilack2
New Contributor

Did you discover a solution to this? Same exact issue here...

0 Kudos
AidaMonfort_Muriach
New Contributor

I had the same issue, apparently to use the API REST you should have additional permission. interpolation using API REST

0 Kudos
XanderBakker
Esri Esteemed Contributor

The help (Perform analysis—ArcGIS Online Help | ArcGIS ) states:

License:

In order to perform analysis, the administrator of your organization needs to grant you certain privileges. To use any of the analysis tools, you will need the following privileges

  • Create, update, and delete content
  • Publish hosted features
  • Spatial Analysis

Certain tools need additional privileges such as Network Analysis and GeoEnrichment. These additional privileges are noted below in the description of each tool.

Some more links:

ArcGIS REST API: Spatial Analysis Service | ArcGIS for Developers

Get started with the Spatial Analysis service—ArcGIS REST API: Spatial Analysis Service | ArcGIS for...

Programmatically accessing analysis services—ArcGIS REST API: Spatial Analysis Service | ArcGIS for ...