如何通过Azure Rest API获取函数应用的Runtime版本
获取Azure Function App运行时版本的正确API方法
你调用的那两个API确实不会返回运行时版本信息,正确的途径是调用Function App的Web配置API:
- 调用端点:
https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web?api-version=2023-12-01 - 请求方式:GET
返回的JSON响应中,properties节点下的对应字段会给出所需信息:
- 针对Linux环境:
linuxFxVersion,格式示例:DOTNET|6.0、PYTHON|3.10 - 针对Windows环境:
windowsFxVersion,格式示例:DOTNETCORE|6.0、NODE|18-lts - 如果要获取Azure Functions Runtime的主版本(如v4),直接查看
functionsRuntimeVersion字段,返回值类似~4
内容的提问来源于stack exchange,提问作者john
相关产品推荐
相关产品推荐

