Share via

Azure API Management Service Does Not Correctly Load HTTP methods for Azure Functions Python v2 Programming Model

Arturo Sevilla 0 Reputation points
2023-12-21T08:53:38.1166667+00:00

I have several functions that are HTTP triggered that were built in Python v2 programming model.

For example:

@app.route(route="/{request_id:guid}", methods=[func.HttpMethod.GET])
@app.durable_client_input(client_name="client")
async def get_status(
    req: func.HttpRequest, client: df.DurableOrchestrationClient
)
    ...

Deployment works, and I can actually test the function using HTTP GET (I have other with PUT, and POST which can be tested with Postman or other app).

However, when I link the Azure Functions application with an API Management Service, I do get the list of HTTP triggered functions but ALL of them are listed as POST which is not correct.

Am I missing something?

Azure API Management
Azure API Management

An Azure service that provides a hybrid, multi-cloud management platform for APIs.

Azure Functions
Azure Functions

An Azure service that provides an event-driven serverless compute platform.


1 answer

Sort by: Most helpful
  1. MuthuKumaranMurugaachari-MSFT 22,451 Reputation points Moderator
    2023-12-22T02:57:16.9466667+00:00

    Arturo Sevilla After investigating the issue, we found there is a bug in importing Python V2 Functions. The issue is that when using the durable_client_input decorator, durableClient binding type was added first and since there is no method defined for this binding type, POST was assumed.

    Our product team has created a bug internally to address this issue and current ETA is by the end of Jan (subject to change on other factors). Meanwhile, as a workaround, you can change operation's method from POST to GET in the APIM. I understand this is not ideal solution and sorry for the inconvenience caused by this issue.

    I hope this helps and let me know if you have any questions.


    If you found the answer to your question helpful, please take a moment to mark it as Yes for others to benefit from your experience. Or simply add a comment tagging me and would be happy to answer your questions.

    0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.