Skip to main content

How to access secured ArcGIS Server services in the Query Layer activity? Is there an equivalent to the Generate Token activity in Workflow 4?

Comments

8 comments

  • Stefan Schweigert

    Hello Andrew,

     

    The Secured Query sample was recently updated in preparation for the upcoming release to be able to run directly with the sample site we provide.

     

    In order to use this workflow, you'll need to adjust the Layer ID to match the ID of the map service on your site according to the REST API and services URL.

     

    Let me know if this works for you.

     

    Note that there are also other questions posted regarding this that explain this process but the main idea is that the Get Layer obtains the URL from the layer on the map, the Parse URL obtains the token, then you add that token to the query Url in a Query Layer.

     

    Thanks, Stefan

     

     

    0
  • Permanently deleted user

    Hi @Stefan Schweigert? I have attempted to implement the workflow you provided here, but I'm getting an activity error saying "No token available for service...". I changed the Layer Id to reflect the layer in my Essentials site. I am then using the following URL: ="https://gisweb.bozeman.net/cob/rest/services/Internal/Forestry_Editible_Test/FeatureServer/0?token=" + $parseurl1.query["token"]

     

    Any thoughts on what I have done wrong here? Thanks.

    0
  • Permanently deleted user

    Hi Tara,

    Can you log the value of the url you're using, and check it looks right and has a token? Eg, put

    ="https://gisweb.bozeman.net/cob/rest/services/Internal/Forestry_Editible_Test/FeatureServer/0?token=" + $parseurl1.query["token"]

    into a Log or Alert.

     

    Then if the token isn't there, check what the value of =$layer1.layer.url is too.

    0
  • Permanently deleted user

    I am able to get the url with a token by using the above syntax in a log. Additionally, I'm also able to get a URL with a token using the =$layer1.layer.url. That said, if I go to that url, it sends me to an error page that starts off as {"error":{"code":500,"message":"Exception has been thrown by the target of an invocation.\nYou are not authorized to proceed with this request. Format \"html\" is not supported.","details":["Exception has been thrown by the target of an invocation.","You are not authorized to proceed with this request. Format \"html\" is not supported."]...

    0
  • Christopher Wiebke

    The parse url activity did not seem to be working for me. I created a token variable (create value (=$layer1.layer.credential.token), then passed it into the queryurl (="https://<server>/rest/services/<service>/MapServer/<id>?token=" + $token

    0
  • Stefan Schweigert

    Hi Christopher,

     

    If you are using Create Value, when you access the created value, you'll want to use $token.result

    0
  • Permanently deleted user

    I have been struggling with this same issue as well. And I discovered that the problem was with the version of the Essentials I was using to run workflow. I was testing this on older version (4.13.2) and couldn't get it to work, but once I tried at 4.14 I got the token access working.

    0
  • Lauren MacLean

    Does this only work with spatial layers? We have used an arcgis map service full of tabular data for performing autocomplete, combo box etc queries. for years. we simply send a query to the tabular layer to retrieve our values.

     

    I tried adding this service to the essentials site but am still not retrieving data - it seems to work against the visual layers but not the tabular ones. I have zero need to visualise these tables and they would drastically affect performance if I tried to. any advice?

    0

Please sign in to leave a comment.