POST
|
Greetings, Similar to the original poster, our organization also uses the Last Login date to filter and remove inactive users and we are finding discrepancies with our mobile login and SAML users and other special cases with their activity and last login dates not matching up. We do see the new SAML login user update from Never after about 60 minutes, but we need clarification on when the Last Login date value is updated in ArcGIS mobile apps for all login types (both built-in and SAML). @StephanieWendel Can you provide any information? If there isn't an existing enhancement request for mobile logins to update AGO Last Login correctly we would like to get that started.
... View more
10-19-2023
12:12 PM
|
1
|
0
|
1601
|
POST
|
Hi Jonathon, I changed and added a line for the 'referer' parameter in my Generate ServerToken block. it still gives me "invallid Token" error when i run the script and it goes into submitExportTilesJob block. thanks for your help def generateServerToken(portalUrl, token, serverURL):
'''Retrieves a token to be used with API requests.'''
parameters = urllib.urlencode({'request': 'getToken',
'serverURL': serverURL,
'token': token,
'referer': 'www.arcgis.com',
'f' : 'json'})
response = urllib.urlopen(portalUrl + '/sharing/generateToken?',
parameters).read()
... View more
08-18-2015
02:21 PM
|
0
|
1
|
2466
|
POST
|
UPDATE: After buchering example here: http://server.arcgis.com/en/portal/latest/administer/windows/example-prepare-esri-basemaps-for-use-in-offline-workflows.htm I've got this python code put together. After studying up on the API, it appears I need to generate both a portal token and server token, which I got figured out. However, code still gives me Invalid Token on the exportTiles method. What am I doing wrong? thanks, mike # Requires Python 2.7+
#
# ! NOT COMPATIBLE WITH PYTHON 3+!
# taken from ESRI python sample for ARcGIS Server REST api
#
import urllib
import json
import sys
def generatePortalToken(username, password, portalUrl, refererUrl):
'''Retrieves a token to be used with API requests.'''
parameters = urllib.urlencode({'username' : username,
'password' : password,
'client' : 'referer',
'referer': refererUrl,
'expiration': 5,
'f' : 'json'})
response = urllib.urlopen(portalUrl + '/sharing/rest/generateToken?',
parameters).read()
try:
jsonResponse = json.loads(response)
if 'token' in jsonResponse:
return jsonResponse['token']
elif 'error' in jsonResponse:
print jsonResponse['error']['message']
for detail in jsonResponse['error']['details']:
print detail
except:
print 'An unspecified error occurred.'
def generateServerToken(portalUrl, token, serverURL):
'''Retrieves a token to be used with API requests.'''
parameters = urllib.urlencode({'token': token,
'serverURL': serverURL,
'f' : 'json'})
response = urllib.urlopen(portalUrl + '/sharing/rest/generateToken?',
parameters).read()
try:
jsonResponse = json.loads(response)
if 'token' in jsonResponse:
return jsonResponse['token']
elif 'error' in jsonResponse:
print jsonResponse['error']['message']
for detail in jsonResponse['error']['details']:
print detail
except:
print 'An unspecified error occurred.'
def submitExportTilesJob(serverToken, mapService):
'''download TPK'''
''' ** TEST ** '''
parameters = urllib.urlencode({'token' : serverToken,
'f' : 'json',
'tilePackage' : 'true',
'exportBy' : 'LevelID',
'levels' : '10-13',
'exportExtent' : '-13578942,5406262,-13510153,5490705'})
response = urllib.urlopen(service + '/exportTiles?', parameters).read()
return json.loads(response)
# Run the script.
if __name__ == '__main__':
portal='https://www.arcgis.com'
agoAcct='***'
agoPassword='***'
service='http://tiledbasemaps.arcgis.com/arcgis/rest/services/USA_Topo_Maps/MapServer'
outFolder='C:/Temp'
federatedServer='http://tiledbasemaps.arcgis.com/arcgis'
## portal = sys.argv[1]
## agoAcct = sys.argv[2]
## agoPassword = sys.argv[3]
## service = sys.argv[4]
## outFolder = sys.argv[5]
# Get a token for the Portal for ArcGIS.
print 'Getting PORTAL token for ' + portal
pToken = generatePortalToken(username=agoAcct, password=agoPassword,
portalUrl=portal,refererUrl=service)
#print 'PORTAL TOKEN = ' + pToken
print 'Getting SERVER token for ' + federatedServer
sToken = generateServerToken(portalUrl=portal, token=pToken, serverURL=federatedServer)
#print 'SERVER TOKEN = ' + sToken
try:
print 'attempt tile export'
result = submitExportTilesJob(serverToken=sToken, mapService=service)
print result
if 'jobId' in result:
print 'Successful request'
print result['jobId']
elif 'error' in result:
print 'Error, did not work'
print result['error']['message']
for detail in result['error']['details']:
print detail
else:
print 'Error, bad'
print 'An unhandled error occurred.'
except:
print 'Error even badder..'
print 'An unhandled exception occurred HERE.'
... View more
07-01-2015
01:37 PM
|
0
|
3
|
2466
|
POST
|
Hi, I want to create a tile package .tpk from this ESRI map service. How can I do this? My main goal is to create one tile package file that I can use to side load multiple mobile devices that will be using Collector app. I realize I can setup each device to individually download the basemap, but this does not seem efficient, especially when the tpk is 5Gb+ and I have over 5 devices. Also, I would like to try to modify the derived tpk to constrain tiles to a defined boundary. My thought here was, use the Tile Cache toolset to import the tpk to a cache dataset, manage the cache and constrain, then export the cache dataset back to tpk. Does this sound right also? most important to me is figuring out how to download a .tpk from the ESRI basemaps without having to browse to the REST endpoint and figure out how to input all the correct parameters. It would be nice if ArcMap/arctoolbox had some good tools for doing just this. edited June 12 CALLING ALL Devs and AGOL Admin Tool developers !! what about an admin tool for this concept? or in arcGIS Server Manager? still need to know answer to "How do I do this?". Am I stuck with just REST endpoint? Also, I thought I saw at UC years ago (like 3) ESRI R&D demoing this functionality in an early dev build of Portal. It had the ability to create "Mobile Applications" just like we can currently create Web Mapping Applications in AGOL now. The Mobile Application became a content item which could then be used to provision many devices within your organization. if that exists somewhere or if one of you devs could PLEASE! build something, I'd be forever grateful. thanks, Mike
... View more
06-08-2015
04:12 PM
|
1
|
10
|
11113
|
POST
|
I figure there's probably a parameter to completely disable the Editor, but I'm actually hoping to just disable edits and still show the Editor widget so that clients can get a visual idea of the app layout, but keeps the data safe from getting corrupted. And would like to avoid copy/edit/host a second full site just for demo purpose. I'm interested if there's any URL parameters for the WAB, or generic ones for the hosted ESRI templates. Thanks in advance for your help or suggestions. Mike
... View more
03-10-2015
10:41 AM
|
0
|
0
|
3795
|
POST
|
same experience in classroom with ~12 students all on different brand phones. No joy.
... View more
03-06-2015
02:42 PM
|
0
|
1
|
565
|
POST
|
Jeremy, thanks for the response. I started following you, so if you write up the workflow it would be great to use. I mostly understand what you are describing but my take me awhile to piece together. the thought of have jimu.js and libs in one location on our webserver sounds like a good option to explore. -Mike
... View more
02-25-2015
06:54 AM
|
0
|
0
|
1402
|
POST
|
What about this build.bat in the buildScripts dir? I just tried it and looks like it is supposed to compile the app, but it gave me a couple errors. any detailed info you could relay would be great.
... View more
02-24-2015
09:09 AM
|
0
|
1
|
1402
|
POST
|
Thanks Robert. ~13Mb seems like a lot for these apps. Just thought I might be missing something and looking for an easier way to make sure any local changes I make get posted without having to re-post the entire folder contents.
... View more
02-24-2015
09:06 AM
|
0
|
0
|
1402
|
POST
|
Using WAB Dev, I create project and then Download. Extract the download and post to web server. I'm not a web tech at all, but seems as though there is a bunch of extra folders/files that probably aren't needed. Is there a simpler way to deploy my WAB Dev projects? thanks, Mike
... View more
02-24-2015
08:59 AM
|
0
|
6
|
5555
|
POST
|
Hi Jake, Thanks, I had tried that and yes that is an option. However, they also require a number of services to be able to toggle on/off in a LayerList, so by having the same layer twice = not good = confused user. For now, I decided to go with Image Services and will create a 'custom' legend just using text and graphics and displaying in the Description of the AGOL item. Legend won't update dynamic, but that's okay for now. We're still on 10.2.2, glad to hear this is resolved at 10.3. Mike
... View more
02-23-2015
06:58 AM
|
1
|
1
|
1458
|
POST
|
I'm trying to setup image services from 32 bit floating point single band rasters values 0-100. The goal is to display the rasters with the same Classified Defined Interval renderer used in the original .mxd with interval set to 20 = 5 classes, 0-20,20-40 and so on, like this: I save the Symbology as the Raster Function Template to .rft.xml file. I apply the raster function to the published image service referencing the same data from the .mxd. Here's the problem: It properly renders the pixels with the classified range and colors. This also allows users to click the service in AGOL and get a popup of the original value (needed requirement and main reason to not use cached map service). However, the legend display just shows RGB, Band 1,2,3. This doesn't help the users when viewing the data. The project sponsors identified this as a problem and again requested popups with correct legend display. See here: My plea for help! Is there a way to create/enable the raster function to output the legend for proper display? I tried using the Colormap function (first applying the Local function with Math > Int function), but this outputs a legend with 255 values for each distinct color value, not the original raster values 0-100, and not split into the 5 class ranges. -OR- IS there a way to combine a tile layer with the correct popup information? I tried creating a hosted tile layer (can also create an AGS cache map service, but this was faster for now), which will improve performance and output correct legend. I found the option to enable a popup for a tile layer and specify a service URL as the popup info, but it did not take the image service. Boo.. Lastly, I tried creating a Dynamic map service from the same data. Results = Correct legend BUT NO POPUP.....therefore can't combine that with the tile layer either. Thanks for looking and hope you can help. Oh did I mention project milestone due by Monday and have been working all week (and now the weekend...) on this?,..! cheers, Mike
... View more
02-21-2015
08:56 AM
|
0
|
3
|
8185
|
POST
|
Need the same radio button functionality, were you able to find an answer? I was hoping to make it work within the ValidatorClass for a custom script tool.
... View more
10-31-2011
11:15 AM
|
0
|
0
|
448
|
POST
|
I a trying to create a model that iterates a folder of SDE connection files and reconciles a version in each one. The problem is, the output Workspace variable from the Iterate Workspaces model tool does not connect into the Reconcile Version tool. I have set the Workspace Type parameter of the Iterate Workspaces tool to SDE and it still does not work. Any help is appreciated.
... View more
09-28-2011
04:01 PM
|
0
|
0
|
1812
|
POST
|
thanks for the info! I have an 'export metadata' python script written using 9.3 module and .... Is it possible to share your export metadata python script? I'm heading down this path and need something to export HTML. Thanks, Mike
... View more
07-25-2011
10:01 AM
|
0
|
0
|
2413
|
Title | Kudos | Posted |
---|---|---|
1 | 10-19-2023 12:12 PM | |
1 | 06-08-2015 04:12 PM | |
1 | 02-23-2015 06:58 AM | |
1 | 05-26-2010 09:31 AM |
Online Status |
Offline
|
Date Last Visited |
08-07-2024
04:45 PM
|