Solved

I am trying to use HTTPCaller to generate a token which can be used in a REST API Service.

  • 24 March 2017
  • 8 replies
  • 45 views

Badge

I am trying to use HTTPCaller to generate a token which can be used in a REST API Service. The token can be generated manually from the web site: https://gisservices.information.qld.gov.au/ArcGIS/tokens/generateToken. I am putting the parameters for this into the 'Query String Parameters box'. I just need an example of how this is done using the HTTPCaller? I keep getting 'HTTP Method Not Allowed'

icon

Best answer by johnm 26 March 2017, 03:50

View original

8 replies

Userlevel 4

Seems you have to use POST over an https connection, unless they have specifically activated GET. Documentation: http://resources.arcgis.com/en/help/arcgis-rest-api/index.html#//02r3000000ts000000

Badge

Thanks David, I have changed to a POST but I am still not getting a token back: {"error":{"code":201,"message":"Exception in generating token","details":"Invalid request <br>Usage: https://gisservices.information.qld.gov.au/arcgis/tokens?request=gettoken&username;=username&password;=password&<br>Usage: https://gisservices.information.qld.gov.au/arcgis/tokens/generateToken?username=username&password;=password

I am just not sure what values should be in the HTTPCaller httpcaller.pdf

 

 

Badge

@itay Hi , Can you please provide your example Workspace again:

downloadws2015v2.fmw

I can't seem to retrieve it?
Badge +16
Hi @johnm, I am adding a template I use for requesting a token from FME SERVER, hopefully it can be of help to you how to configure the request.

 

Made with FME 2017

 

requesttoken.fmw

 

Badge +16

@itay Hi , Can you please provide your example Workspace again:

downloadws2015v2.fmw

I can't seem to retrieve it?
Hi @johnm, I am adding a template I use for requesting a token from FME SERVER, hopefully it can be of help to you how to configure the request.

 

Made with FME 2017

 

requesttoken.fmw

 

Badge

Hi @itay, Thankyou very much for this. That worked perfectly on the desktop. I will apply this to FME Server as well. Just a quick question, can you explain the 'Content Type:

application/x-www-form-urlencoded and how it is derived? Thanks again, John

Badge +16

Hi @itay, Thankyou very much for this. That worked perfectly on the desktop. I will apply this to FME Server as well. Just a quick question, can you explain the 'Content Type:

application/x-www-form-urlencoded and how it is derived? Thanks again, John

See more about content types here:

 

http://playground.fmeserver.com/using-the-rest-api/basics/

 

I have converted my previous comment to an answer.

 

 

Userlevel 4

Thanks David, I have changed to a POST but I am still not getting a token back: {"error":{"code":201,"message":"Exception in generating token","details":"Invalid request <br>Usage: https://gisservices.information.qld.gov.au/arcgis/tokens?request=gettoken&username;=username&password;=password&<br>Usage: https://gisservices.information.qld.gov.au/arcgis/tokens/generateToken?username=username&password;=password

I am just not sure what values should be in the HTTPCaller httpcaller.pdf

 

 

You probably have to transmit the parameters in the message body and not in the URL.

Reply