none
How to get API using azure function app RRS feed

  • Question

  • Hello folks,

    I recently deployed a sample Node.js function on to azure function app using github. Now, I don't know how where can I get a function URL to check, as we get when we create a function directly using portal. Could anyone suggest


    Thanks, Santosh Kola, skola2@miraclesoft.com


    Tuesday, March 13, 2018 2:40 PM

All replies

  • The default URL for a function app is based on the name of the function app. So if you deployed to a function app called santoshtest then the URL would be http://santoshtest.azurewebsites.net . If you do not know the name of the function app you deployed to, you will need to find it - easiest way is to open the azure portal and then select 'All Services' -> 'Function Apps'. It will then bring up a list of function apps you have access to.

    


    • Edited by Paul Batum Tuesday, March 13, 2018 5:32 PM
    Tuesday, March 13, 2018 5:31 PM
  • Thanks for your reply Paul.

     If we create functions directly from our portal then it displays the function URL which is in the form of 

    https://<Your Function App>.azurewebsites.net/api/<Your Function Name>?code=<your access code>

    So that, we can test that by using some API tools. what about the case if we deploy function app using github  and I am unable to find this URL which is in the form of 

    https://<Your Function App>.azurewebsites.net/api/<Your Function Name>?code=<your access code>

    As per your suggestions if I click on the public URL http://santoshtest.azurewebsites.net it was showing that the app is running fine.  But, how do I get an POST or GET API to consume it. Could you please let me know.


    Thanks, Santosh Kola, skola2@miraclesoft.com

    Tuesday, March 13, 2018 6:40 PM
  • OK I understand a bit better but I'm still not clear on what is blocking you. Following on from my previous step, search for your function app, select the function, then click the button to get the URL. The same process should work regardless of how you created or deployed to the function app:

    

    Tuesday, March 13, 2018 11:44 PM
  • Thank you Paul.

    This is the thing where I am blocking in. I deployed my Node.js app through github and it was showing the deployment is successful. But, when I click on functions in the deployed function app it was not showing anything.  Please check my folder structure which I was pushed into function apps:

    In nodejshtml folder I have seperate node modules folder, app.js file, function.json file, host.json file, name.html, package.json

    Could you please let me know where I have done mistake. 


    Thanks, Santosh Kola, skola2@miraclesoft.com


    Wednesday, March 14, 2018 11:18 AM
  • Sounds like your directory layout is incorrect. I suggest you use kudu to view the layout of a function app you create from the portal, and then compare it to the layout you deployed from github.

    To do this, go to:

    https://<<appname>>.scm.azurewebsites.net/DebugConsole

    Then browse to site/wwwroot

    Wednesday, March 14, 2018 9:48 PM
  • Thanks Paul. Its working. Now, I would like to go for CI/CD using VSTS. But, continuous delivery option is disabled in azure function app. Is azure function app is not supporting continuous delivery? Could you please suggest. 

    Thanks, Santosh Kola, skola2@miraclesoft.com

    Friday, March 16, 2018 1:27 PM
  • Thanks  Paul. Its working.

    Now, I have a small doubt. I know that we can deploy multiple functions in one single function app. So, every time we need to deploy each and  every function individually. Can we have any other way to avoid this individual function deploying.


    Thanks, Santosh Kola, skola2@miraclesoft.com


    Thursday, March 22, 2018 6:11 PM
  • Hmm I'm not sure I follow - when you do a deployment, it deploys the entire function app in one go, with all the functions inside it. Why are you deploying each function individually?
    Thursday, March 22, 2018 6:47 PM
  • Thanks. I was so confused and blocked on how to get this URL.
    Wednesday, February 13, 2019 7:55 PM