Accessing secured service in VertiGIS Workflow for public use
We want to create a workflow that can be used by the public in VertiGIS Workflow. To do this we have published a secured service to our ArcGIS Portal and then added this service to ArcGIS Online with stored credentials. This allows us to share the data with the public on ArcGIS Online, but keep the rest-end point of the portal mapservice hidden - https://kelowna.maps.arcgis.com/home/item.html?id=fd9937213bb84f82ab88cdf18008deed
ArcGIS Online deals with this by setting up a sort of proxy url (i.e. the url that is show in the item page does not point directly to our portal). It works great for the webmap, but in VertiGIS Workflow I need to be able to query the layer and the rest endpoint for the ArcGIS Online URL has been disabled.
In the old essentials workflow you were able to get the token from your site and use it to query a layer, but in the new VertiGIS Workflow it seems there is a "Get ArcGIS Server Token" activity, but it only exists for server-side workflows. Once I switch my workflow to server-side the "Get Layer" and "Query Layer" activities are no longer available...
How can I query a layer that is token protected using VertiGIS workflow?
-
You should still be able to query the ArcGIS Online proxied service with Workflow. The "Services Directory has been disabled." error just indicates that the browsable HTML page version of the endpoints are disabled. The JSON flavour of the endpoints will still work. For example, https://utility.arcgis.com/usrsvcs/servers/fd9937213bb84f82ab88cdf18008deed/rest/services/Cemetery_Public/FeatureServer/1?f=pjson
The general strategy for using the Get ArcGIS Server Token activity is to have our regular client workflow call a server workflow that only runs the Get ArcGIS Server Token and then Set Workflow Output to send the token back to the client workflow. This allows you to keep the username/password secret on the server, but send the token to the client where it can use activities like Query Layer.
Server workflows don't have any activities that require ArcGIS objects (like Layers and FeatureSets).
1 -
Hi @... could you please provide more details on how to get the on-premise workflow output (token) to the client workflow that involves Query Layer? Just not sure how to reference the output in the Query Layer element.
0 -
The server and client workflows would look something like this:
- Server Workflow
- Generate ArcGIS Token
- Generate Token Url: https://server/arcgis/tokens/generateToken
- User Name: your user
- Password: your password
- Set Workflow Output
- Name: token
- Value: =$generateArcGisToken.token
- Generate ArcGIS Token
- Client Workflow
- Run Workflow
- Url: the URL to the server workflow
- Query Layer
- Url: ="https://server/arcgis/rest/services/yourService/FeatureServer/0?token=" + $runWorkflow1.result.token
- Run Workflow
Personally, I would add the ArcGIS Maps SDK for JavaScript activity pack and use its Register Token activity, rather than append the token to the URL.
0 - Server Workflow
Bitte melden Sie sich an, um einen Kommentar zu hinterlassen.
Kommentare
3 Kommentare