Select to view content in your preferred language

REST GET URL VBA

901
2
Jump to solution
09-27-2021 12:26 PM
Hornblower5953
New Contributor II

I'm trying to get access to my hosted feature layer from an access database in VBA
I setup an API key for the feature layer in Developer
URL copied from Developer

VBA

Set Request = New ServerXMLHTTP60

Request.Open "GET", <Point LayerURL>/&query?where=0=0&outFields=*&returnGeometry=false&f=html&Key=" & ApiKey, False

the response contains text in the <title> A potentially dangerous Request.Path value was detected from the client...

0 Kudos
1 Solution

Accepted Solutions
Hornblower5953
New Contributor II

Got a response:

Request.Open "POST", FeatureLayer URL /query?where=FID=1&outFields="Site_Name"&f=json&token=token string

 

View solution in original post

0 Kudos
2 Replies
Hornblower5953
New Contributor II

Got a response:

Request.Open "POST", FeatureLayer URL /query?where=FID=1&outFields="Site_Name"&f=json&token=token string

 

0 Kudos
janeinar
New Contributor

I do all REST handling in Access / Excel VBA using this VBA Class library:
https://github.com/VBA-tools/VBA-Web

0 Kudos