Skip to main content

Accessing secured service in VertiGIS Workflow for public use

Comments

3 comments

  • Ryan Cooney

    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
  • Anna Jose

    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
  • Ryan Cooney

    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
    • 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

     

    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

Please sign in to leave a comment.