How to get latest deployment date of a Function App? Maybe via the Azure REST api?

冷暖自知 提交于 2020-04-30 06:32:06

问题


Like the title says, I need to get the latest deployment date of a function app. I'm trying different Azure REST calls, but I can't find the right one. https://docs.microsoft.com/en-us/rest/api/appservice/

For deployment, I mean every time I make a change to the code and re-deploy the Function App.

I'm using Linux/Python environment.

I tried using this GET:

https://docs.microsoft.com/en-us/rest/api/appservice/webapps/listdeployments#code-try-0

But it returns HTML content like:

<html>
<head>
    <title>Your Azure Function App is up and running.</title>
    <style type="text/css">
        @font-face {
            font-family: 'SegoeLight';
...
...
...

Which looks like this:


回答1:


You need to use kudu rest api for that. specifically the

GET /api/deployments

api path. and then retrieve the latest deployment with

GET /api/deployments/{id}



回答2:


Unfortunately, it's not supported.

Consumption plan

Linux function apps running in the Consumption plan don't have an SCM/Kudu site, which limits the deployment options. However, function apps on Linux running in the Consumption plan do support remote builds.

https://docs.microsoft.com/bs-latn-ba/azure/azure-functions/functions-deployment-technologies



来源:https://stackoverflow.com/questions/60189439/how-to-get-latest-deployment-date-of-a-function-app-maybe-via-the-azure-rest-ap

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!