问题
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