POST
|
Our organisation has aerial photography, which we want to include into our 'basemaps' selection. We also still require the Esri default basemaps to be selectable. I am following this article here: Create a custom basemap gallery for your organization In the final steps, you can chose to share the Esri defaults with the custom basemaps group. The button is called 'Share vector basemaps': However, this button functionally does nothing when pressed. Inspecting my Chrome browser actually shows an error, upon button press: dojo.js:516 Uncaught Error: dijit._TemplatedMixin template:!text at Object.<anonymous> (dojo.js:516) at dojo.js:46 at dojo.js:521 at String.replace (<anonymous>) at Object.g.substitute (dojo.js:520) at Object._stringRepl (dojo.js:516) at Object.buildRendering (dojo.js:517) at Object.create (dojo.js:301) at Object.postscript (dojo.js:300) at new <anonymous> (dojo.js:150) I don't know if this is the cause or related? I can't find any articles whereby people are experiencing the same issue. Any help is appreciated, Thank you
... View more
11-03-2020
06:21 PM
|
0
|
2
|
838
|
POST
|
Hello I guess that settles it then - I wonder when/if the enhancement will be pushed through... As I mentioned to another user above, I ended up making the service public, with edit permissions enabled. It's peculiar that it did not work for you still. I would either need to figure out another method of authenticating, or move my app to my Org's ArcGIS Online platform, where the auth issue is not present. P.S. It's a small world - I reckon we live in the same state!
... View more
08-05-2020
06:50 PM
|
0
|
1
|
9610
|
POST
|
Hi Ben From memory, I made the Feature Service 'visible to everyone' and edit permission enabled. This removed the requirement to authenticate requests to the server. I justified this approach because: This was a prototype/proof of concept for a web app The service is only shared within my Org In the future I would definitely need Auth. Did you have any luck yourself? Regards J
... View more
08-05-2020
06:40 PM
|
0
|
0
|
9609
|
POST
|
Ok it turns out there is another attribute you need to POST with the "geometery" attribute: { "attributes":{ "device_id":1, "objectid":17, "longitude":<insert longitude here>, "latitude":<insert longitude here>, }, "geometry":{ "x":<insert utm converted coord here>, "y":<insert utm converted coord here>, "spatialReference":{ "wkid":<insert WKID here> } } }, "attributes":{ "device_id":2, "objectid":18, ... ... . Realising I needed a 'wkid' (well known ID) for the 'spatialReference' key, I did a google for <my city> WKID. Using this resource, I was able to find the corresponding WKID for my city's Coordinate Projection System, and send it in the POST request. FYI, to convert lat long coordinates to X Y (UTM) coordinates, I used the Python "utm" module and the 'from_latlon' function, see: import utm #Here I loop through my "device list" and convert Lat/long to X/Y utm coords: latitude, longitude, zone, var = utm.from_latlon(float(<insert latitude>), float(<insert longitude>)) #Insert the X Y coords into the /updateFeatures "data" (payload) string for the request Just thought I would update my post for anyone that stumbles upon the same issue. This is the culmination of two days troubleshooting. Thanks
... View more
05-20-2020
11:44 PM
|
0
|
0
|
1245
|
POST
|
In attempting to dynamically move the location of points on a map, I am using the /updatefeatures endpoint of the arcGIS REST API. My POST data looks like the following: [{ "geometry":{"x": 702078.1622769168, "y": 8625267.799537977}, "attributes":{\'device_id\': 1234, \'objectid\': 20...}, ... }] The update works successfully, when I use the /query endpoint, the data has changed as expected. However the map has no points visible when I open the layer in Map viewer. They have disappeared. Am I mistaken? Does the "geometry" attribute in the request not influence where the point is located? I even plugged the X and Y coordinate into an online converter and it finds the location successfully. Thanks
... View more
05-18-2020
11:55 PM
|
0
|
1
|
1313
|
POST
|
Hi Aryel Did you ever manage to resolve this issue? I am facing a similar challenge, see my thread here: https://community.esri.com/message/929157-re-arcgis-server-invalid-token-from-application-using-rest-api
... View more
05-14-2020
06:28 PM
|
0
|
0
|
1091
|
POST
|
Hi Victor I am trying to enable my program to automatically update a feature layer (hosted on ArcGIS Server). From my understanding, and past implementation with ArcGIS Online, I should simply need to: Create an 'app' Copy its client ID and secret Use these to receive an 'access token' Use the 'access token' in all future actions - i.e. update, delete, query etc. This appears to be the same issue experienced by these users: Tokens returned from Portal oauth2 are invalid for accessing hosted features through the REST API REST API rejecting just-generated token with "498 - Invalid Token" Why does token-based security work for AGOL but not for AGEnt? Getting 498: Invalid Token from AGS Server after performing Token Exchange (3200+ views and no response!) https://community.esri.com/thread/82832 The approach to authenticating REST API requests in AGOL vs ArcGIS Server seems to be different - despite referencing the same documentation. At least in my opinion. I didn't have to bother with 'redirect URIs' at all with my AGOL implementation.
... View more
05-14-2020
06:23 PM
|
1
|
6
|
9609
|
POST
|
Hi Dirk Did you ever manage to solve this issue? I believe I am running into a similar problem. See my thread here: https://community.esri.com/message/928813-arcgis-server-invalid-token-from-application-using-rest-api Cheers
... View more
05-14-2020
06:20 PM
|
0
|
0
|
1204
|
POST
|
Hi Pilar Can you describe this last step in more detail? I believe I am facing a similar issue?
... View more
05-13-2020
07:22 PM
|
0
|
1
|
1478
|
POST
|
Hello. I am struggling with an issue relating to ArcGIS Server REST API. I believe we are running v 10.6. My process is: Create an 'application' in the ArcGIS Server content. Copy the 'client_id' and 'client_secret' values from this application. Call the ArcGIS REST API oauth2/token endpoint Copy the 'access_token' into the ArcGIS REST API /query endpoint I am receiving a 'invalid token' error code 498. I have completed this exact process in my organisation's ArcGIS Online platform, with no issues. So I am very perplexed and frustrated that this isn't working . My token request: POST /arcgis/sharing/rest/oauth2/token?client_id=XXX&client_secret=XXX&grant_type=client_credentials HTTP/1.1 Host: <domain>:<port> My query request: GET /arcgis/rest/services/Hosted/<feature layer name>/FeatureServer/0/query?where=1=1&token=XXX&f=json&outFields=name,device_type HTTP/1.1 Host:<domain>:<port> If I copy a token from my Chrome browser (f12 debug mode/network tab) I am able to make both requests successfully!! I am 'admin' on our server and I own both the application and the feature layer. Any help is appreciated. Cheers **update I tried running the /registerApp endpoint (using a browser Token) I get the following: "error": { "code": 500, "message": "Unable to register app.", "details": [ "'redirect_uris' invalid" I don't know what the purpose of the redirect_uris attribute is; I have tried <domain>:<port> and urn:ietf:wg:oauth:2.0:oob to no effect.
... View more
05-13-2020
05:54 PM
|
0
|
10
|
10338
|
POST
|
Hi Drew I am having similar issues to the above user(s). See my comments/troubleshooting here. Are you able to explain further about the Python environment issue you mentioned above. I believe I am in much the same situation. Regards
... View more
04-27-2020
11:45 PM
|
0
|
0
|
1641
|
POST
|
I am also having this issue (ArcGIS Pro 2.5.0): I have tried: renaming/removing .pyt files in that directory to no avail (as directed by another help thread) uninstalling/reinstalling and also repairing the ArcGIS pro installation to no avail This could be a coincidence, but I recently received a new PC from my organisation's IT dept. At first, I was unable to install ArcGIS pro on the new PC. I suspect the cause to be my 'roaming' Windows profile, persisted some component of my previous ArcGIS Pro installation - so when the installation was attempted on on the new PC, it tried to find the original directory/installation files for Pro (which are stored with my Windows profile). This is not possible because the files are on my old PC. I couldn't uninstall Pro either, using the windows 'remove/uninstall a program'. Using this Microsoft tool seemed to clear this up, allowing me to reinstall what I thought/think is a fresh install of Pro (2.5.0). However now I am discovering that I get the 'Class not registered' error upon startup of Pro. I also can no longer complete basic Geoprocessing/toolbox tasks - e.g. export feature class to geodatabase. The module runs 'successfully' in a few seconds, but there is no result. And considering the size of my dataset, taking 5 seconds for completion means something is definitely not right. I suspect I have a corrupted registry on this new PC, due to all my troubleshooting trying to get Pro to install. Perhaps a registry cleaner or complete windows refresh will clean things up. I am going to try download and install an older version of Pro. I will report back if this fixes things. Edit Just editing to say that downgrading to 2.4 did not fix the issue. I have been diving deeper on this issue, I found a relevant comment on this thread: There are multiple things going on here. Natalie Robbins correctly identified she had a custom Python toolbox in the system toolbox directory, and that ENVI toolbox likely didn't have the correct libraries to work with the updated ArcGIS Pro 2.5 Python environment. Installing 3rd party toolboxes into your system toolbox directory can have these negative effects when moving between Pro versions. William Mayr had you previously cloned and made a custom Python environment? Environments need to be repaired or re-cloned when updating versions of ArcGIS Pro. The Intelligence Tools PYT toolbox is not the problem, that just happens to be the first Python functionality that the application is trying to load, as the system loads all the system toolboxes alphabetically (that is alphabetically the first toolbox in the system toolbox directory built with Python). Removing that PYT will just make the next one in the system toolbox directory fail. You have an underlying Python environment problem that must be remedied to proceed. You may want to contact tech support if none of this Python environment stuff that I mentioned applies to you. This lead me down a path of uninstalling (or removing?) old Python installations - again I assume these are persisted across my Windows profile, as I have yet to manually install Python on my new PC. I then re-downloaded and installed the latest version of Python (3.8.xxx something) and reinstalled ArcGIS Pro. Still no luck. Then I found another thread here. Reading these comments gives me some clues as to issues with Environment Variable PATH settings; Based off your comment "I had ArcGIS Pro 1.4 installed to C:\ArcGISPro because it gave me an option of where I wanted to install it." In the other thread, and seeing the line conda.CondaError: Unable to determine if prefix 'C:\ArcGISPro\bin\Python' is writable I think your registry is still pointing to the 1.4 install. We use the paths set in the registry for some of the bootstrapping our envs need to do to avoid PATH collisions. Are you able to run regedit or is that not possible on this machine? Another user, having experienced similar issues to me (having previous Arc Pro installs present) writes: ArcGIS Pro 1.4 was installed to C:\ArcGISPro. ArcGIS Pro 2.0 was installed to my local profile. The two installs never talked. The old version of ArcGIS Pro left behind a number of registry entries for python root pointing to C:\ArcGISPro. Once I uninstalled the old version of ArcGIS Pro in a separate action, it cleaned up the registry and now I have python access within ArcGIS Pro 2.0. As a final comment, Make sure you are aware of whether you are installing Pro for 'all users' or just you. In the all users option, Pro is installed in a different folder (Program Files I think)... If 'just you' you have full control as to whether it can be installed... no registry problems result. I never took much notice when installing Arc Pro, choosing 'for all users' or 'just you' made any difference. Anyway, I chose 'just you' this time, and now the error looks like this: Sigh.... However now at least I can perform basic geoprocessing, which I couldn't do before. Still frustrating that it is still present. Another thing to check is whether or not you can load the Python command line in Arc Pro: I was getting 'failed to initialise Python' or something similar before. Now it works as expected: I am still at a loss as to how to fully resolve this issue. The there is some mixup between registry keys/files, python interpreter/core installations and arcGIS pro itself. Any help is appreciated here.
... View more
04-27-2020
07:29 PM
|
0
|
0
|
1791
|
POST
|
Hi Peter I ended up following a fairly convoluted (and bespoke) process: I am using a linux server to run a python program on an automated schedule The program handles the API requests, using the Python Requests module, to return JSON data The program then queries the AGOL API, returning a list of GIS features and associated primary keys The program joins the two datasets from steps 2 & 3, and POSTs the completed table back to AGOL, via the UpdateFeatures API method. I now have a feature layer which is updated automatically with 'live' data, which I can use in Web Maps and so forth. I believe I tried something following your first link, but for whatever reason it wasn't working out. Thanks
... View more
04-27-2020
07:07 PM
|
0
|
1
|
2586
|
POST
|
Hi When I first published my dataset to ArcGIS Online, there is an option in the hamburger menu to 'Add Field'. However, now I notice it has disappeared: There are only the three options in the screenshot. This is how the item is described in the Overview section: I have since joined the layer with another layer, which has created a view. I am guessing this is the problem. This is supported by the add field documentation (at the bottom): Add or delete a field—ArcGIS Online Help | Documentation Restrictions when adding or deleting fields Consider the following when adding or deleting fields: You cannot add fields to or delete fields from copies of hosted feature layers, hosted feature layers that have related tile layers, or views created from hosted feature layers. I would prefer not to have to delete the layer and re-publish it, because that would mean rebuilding my Dashboards and Web Maps etc. If there is a workaround that would be great. Thank you
... View more
02-27-2020
06:08 PM
|
0
|
3
|
1351
|
POST
|
My mistake. In my code I was converting the time to UTC. But the time was already in UTC format! So I think ArcGIS Online was doing its job, but I was giving it UTC converted to UTC... Issue resolved.
... View more
02-19-2020
04:50 PM
|
0
|
0
|
703
|
Title | Kudos | Posted |
---|---|---|
1 | 01-15-2020 03:44 PM | |
1 | 05-14-2020 06:23 PM | |
2 | 01-15-2020 10:04 PM | |
6 | 01-16-2020 10:10 PM | |
1 | 11-07-2019 06:34 PM |
Online Status |
Offline
|
Date Last Visited |
05-12-2021
06:31 AM
|