Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Azure APIM Fails to Create API from Function App

When I try to create an API in APIM by using Create from Function App, I fill out the fields and click Create. The operation provides the wait dots and comes back in five seconds and says

Could not create an API. Please try again later.

I can create a blank API...but not one from an existing Function App. I have tried multiple combinations, No products, all products, no version, version..etc. No luck.

Thoughts?


enter image description here


Notes

  • The function in question is an HTTP Trigger.
  • The function works locally on my development box and in Azure.
  • APIM Tier is Developer
  • On that Function app, during Publish in Visual Studio I have reported that attempting to manage application settings before a publish fails and in trying to add a new one causes Visual Studio to unexpectedly close. Manage Application Settings on Publish Related, don't know.
like image 668
ΩmegaMan Avatar asked Jan 16 '19 22:01

ΩmegaMan


5 Answers

Just a Ctrl + F5 solved the problem for me. Try it! ;)

like image 150
Marcelo Luz Avatar answered Oct 17 '22 01:10

Marcelo Luz


I had this same problem.
The fix was both simple and unexpected.

When importing the function app, simply enter "/" in the API URL Suffix field. For me this changed the BaseURL field value. Originally it was just the host, ie http://hostname/. It then appended the endpoint the hostname, http://hostname/endpoint This is done on the "Create Function from App" modal.

Click for screenshot

like image 31
JustinH Avatar answered Sep 24 '22 11:09

JustinH


I just ran into the same issue because I used Linux (Preview) instead of Windows. When I blew away the Function App and recreated a new one with Windows, my API Manager was able to create an API off it.

like image 2
westandy Avatar answered Oct 17 '22 02:10

westandy


I have reproduce the same scenario. It is working for me. May I know, below details, 01.Hope you have tested your function and it is working fine. 02.What is the type of the function ? Hope that is "Http trigger" ? 03.What is you APIM tier ? (eg : development, basic etc.)

like image 1
Inzi Avatar answered Oct 17 '22 00:10

Inzi


At this time the solution for me was to use Microsoft Edge instead of Chrome.

It seems Microsoft Azure portal is not working properly in Chrome and I noticed issues in several places. Parts of pages are not rendered at all and sometimes even errors like this pop up just because of the browser.

like image 1
Cristian Avatar answered Oct 17 '22 00:10

Cristian