Skip to main content
Question

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

  • January 14, 2020
  • 5 replies
  • 141 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

5 replies

bruceharold
Contributor
Forum|alt.badge.img+17
  • Contributor
  • 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
bruceharold wrote:

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
Contributor
Forum|alt.badge.img+22
  • Contributor
  • 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
runneals wrote:

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

Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings