Skip to main content
Question

ArcGIS Online - Direct Access to the layer within the service with token ?

  • January 14, 2020
  • 5 replies
  • 184 views

Forum|alt.badge.img

Is there a way in FME to provide directly the url <server>/<service>/<layerID> ?

It takes quite some time at runtime for the reader to get to the service, loop for layers to find the one by providing the name. I'm trying to cut down the execution time and looking for the options of providing directly the url including the layer id, purely for reading purposes.

All above while providing the token instead of user/pwd authentication.

Any ideas ?

 

 

Thank you
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.

5 replies

bruceharold
Supporter
Forum|alt.badge.img+19
  • Supporter
  • January 14, 2020

Yes sure, read up on the REST API and use the Query endpoint directly, the service below is public so you can get to the layer. You'll have to construct paging calls and handle the EsriJSON response.

https://services.arcgis.com/FQD0rKU8X5sAQfh8/arcgis/rest/services/Jordstykke2/FeatureServer/0/query?token=<your token>

 

 


Forum|alt.badge.img
  • Author
  • January 14, 2020

Yes sure, read up on the REST API and use the Query endpoint directly, the service below is public so you can get to the layer. You'll have to construct paging calls and handle the EsriJSON response.

https://services.arcgis.com/FQD0rKU8X5sAQfh8/arcgis/rest/services/Jordstykke2/FeatureServer/0/query?token=<your token>

 

 

thanks for the response. So what reader would I use for that ? would it be able to pull all the attributes info (the reader?)


runneals
Supporter
Forum|alt.badge.img+29
  • Supporter
  • January 14, 2020

You should be able to use the ArcGIS Server Feature Service reader. One you have it open, you need to click "parameters" and select "Provide Token" from the list and that should work.


Forum|alt.badge.img
  • Author
  • January 15, 2020

You should be able to use the ArcGIS Server Feature Service reader. One you have it open, you need to click "parameters" and select "Provide Token" from the list and that should work.

That's as far as I could get, but you cannot provide the layer id. you have to provide the service name, and then the layer NAME. At runtime, the FME loops through all the layers and matches the name, which is unnecessary as I know exactly the endpoint I want to get the data from..


Forum|alt.badge.img
  • Author
  • January 15, 2020

Ok I've found it, one can use the ESRI-JSON Reader and per 'Dataset' you can provide 'Select File From Web' and then you can just provide the url similar to

 

 

https://services.arcgis.com/FQD0rKU8X5sAQfh8/arcgis/rest/services/Jordstykke2/FeatureServer/0/query?token=<your token>&where=<where_clause>&outFields=*&f=json

 

 

That did the trick and it's so much faster now. Thanks everyone for contributing, thought I'd like to know how could I use the HTTPCaller in order to achieve similar as ESRI-JSON.

 

 

Thanks