Search code examples
timeoutapiaxle

ApiAxle: Modifying timeout parameter if backend server is slow to respond


I am following the instructions at: and am getting the error: http://apiaxle.com/docs/try-it-now/

{"meta":{"version":1,"status_code":504},
"results":{"error":{"type":"EndpointTimeoutError",
"message":"API endpoint timed out."}}}

I'm searching on google but have not yet found how to set a larger timeout.


Solution

  • Looking at the documentation at http://apiaxle.com/api.html, I took a shot and came up with the following:

    axle> api "apiname" create endPoint="server.org:port" endPointTimeout=30
    

    Response was:

    { protocol: 'http',
      tokenSkewProtectionCount: 3,
      apiFormat: 'json',
      endPointTimeout: 30,
      disabled: false,
      strictSSL: true,
      sendThroughApiKey: false,
      sendThroughApiSig: false,
      hasCapturePaths: false,
      allowKeylessUse: false,
      keylessQps: 2,
      keylessQpd: 172800,
      endPoint: 'server.org:port',
      createdAt: 1400333254388 }
    
    axle> api apiname linkkey "1234"
    

    Response was:

     { qpd: 172800, qps: 2, disabled: false, createdAt: 1400331617778 }