Skip to main content
Solved

Reading a featureservice using credentials or using token

  • February 21, 2019
  • 2 replies
  • 269 views

bozboswell
Contributor
Forum|alt.badge.img+7

I am trying to simply read a featureservice that I need to make periodic downloads of. This featureservice needs authentication. I can pull a token using part of this example (arcgis-server-feature-service-reader-token-authent) but I cannot seem to figure out how to hold the token as a parameter to feed to "ESRI ArcGIS Server Feature Service" transformer. I have also tried using a FeatureReader (using username/password) but am having issues not seeing the attributes. I do not fully understand using lists (if that is the issue).

So, I need some help with either being able to create a token and save as parameter to feed to another transformer or pull attributes from the featureservice using a FeatureReader transformer.

If you have any suggestions, I would be very appreciative.

Best answer by laurawatsafe

Hi @bozboswell,

I think you'll have a couple of different options for setting this up depending on how you want to authenticate with the feature service. First, just to confirm, is the feature service from ArcGIS Server? We do also have specific Readers for connecting to ArcGIS Online and ArcGIS Portal (in addition to the ArcGIS Server feature service reader) in case you are using one of those.

To use a token generated using the workspace from the example you linked to, I'd recommend using the FeatureReader transformer. Connect the FeatureReader to the transformers that get the token, then set the Reader Format to Esri ArcGIS Server Feature Service. Then, under parameters, you can change the Authentication Type to 'Provide Token' and set the token to come from the 'token' attribute. Here's a screenshot of how that might look:

 

If you'd rather not have to generate the token first, you should be able to use one of the other Authentication Type options for the ArcGIS Server Feature Service reader to authenticate using a username and password.

This post is closed to further activity.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.

2 replies

laurawatsafe
Safer
Forum|alt.badge.img+12
  • Safer
  • 158 replies
  • Best Answer
  • February 23, 2019

Hi @bozboswell,

I think you'll have a couple of different options for setting this up depending on how you want to authenticate with the feature service. First, just to confirm, is the feature service from ArcGIS Server? We do also have specific Readers for connecting to ArcGIS Online and ArcGIS Portal (in addition to the ArcGIS Server feature service reader) in case you are using one of those.

To use a token generated using the workspace from the example you linked to, I'd recommend using the FeatureReader transformer. Connect the FeatureReader to the transformers that get the token, then set the Reader Format to Esri ArcGIS Server Feature Service. Then, under parameters, you can change the Authentication Type to 'Provide Token' and set the token to come from the 'token' attribute. Here's a screenshot of how that might look:

 

If you'd rather not have to generate the token first, you should be able to use one of the other Authentication Type options for the ArcGIS Server Feature Service reader to authenticate using a username and password.


bozboswell
Contributor
Forum|alt.badge.img+7
  • Author
  • Contributor
  • 8 replies
  • February 24, 2019

Hi @bozboswell,

I think you'll have a couple of different options for setting this up depending on how you want to authenticate with the feature service. First, just to confirm, is the feature service from ArcGIS Server? We do also have specific Readers for connecting to ArcGIS Online and ArcGIS Portal (in addition to the ArcGIS Server feature service reader) in case you are using one of those.

To use a token generated using the workspace from the example you linked to, I'd recommend using the FeatureReader transformer. Connect the FeatureReader to the transformers that get the token, then set the Reader Format to Esri ArcGIS Server Feature Service. Then, under parameters, you can change the Authentication Type to 'Provide Token' and set the token to come from the 'token' attribute. Here's a screenshot of how that might look:

 

If you'd rather not have to generate the token first, you should be able to use one of the other Authentication Type options for the ArcGIS Server Feature Service reader to authenticate using a username and password.

@LauraAtSafe - that was exactly what I needed. Such a straight-forward answer! I had spent way too much time trying different combinations with no luck. Thank you again!