Skip to content

Commit e665f98

Browse files
authored
Fix Kudu API scripts in deploy-zip.md
Updated the Kudu API endpoints as `/api/publish` is not documented anywhere in the Kudu WIKI: https://github.com/projectkudu/kudu/wiki/Deploying-from-a-zip-file-or-url Added `Content-Type` headers as that is required when `WEBSITE_RUN_FROM_PACKAGE=1`. If omitted, a 500 Internal Server error is returned. This is how azure-cli does the deployment: https://github.com/Azure/azure-cli/blob/d874fe3e73e5485aef26f173fa9391d848ee59bb/src/azure-cli/azure/cli/command_modules/appservice/custom.py#L598-L610 Removed the info about curl prompting for a password as that is included in the command. These changes should probably be reflected in the Azure Functions documentation aswell? https://learn.microsoft.com/en-us/azure/azure-functions/deployment-zip-push#rest
1 parent 7a3468d commit e665f98

File tree

1 file changed

+11
-3
lines changed

1 file changed

+11
-3
lines changed

articles/app-service/deploy-zip.md

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -66,18 +66,26 @@ Publish-AzWebApp -ResourceGroupName Default-Web-WestUS -Name MyApp -ArchivePath
6666

6767
# [Kudu API](#tab/api)
6868

69-
The following example uses the cURL tool to deploy a ZIP package. Replace the placeholders `<username>`, `<zip-package-path>`, and `<app-name>`. When prompted by cURL, type in the [deployment password](deploy-configure-credentials.md).
69+
The following example uses the cURL tool to deploy a ZIP package. Replace the placeholders `<username>`, `<password>`, `<zip-package-path>`, and `<app-name>`. Use the [deployment credentials](deploy-configure-credentials.md) for authenticatio.
7070

7171
```bash
72-
curl -X POST -u <username:password> -T "@<zip-package-path>" https://<app-name>.scm.azurewebsites.net/api/publish?type=zip
72+
curl -X POST \
73+
-H "Content-Type: application/octet-stream" \
74+
-u '<username>:<password>' \
75+
-T "<zip-package-path>" \
76+
"https://<app-name>.scm.azurewebsites.net/api/zipdeploy"
7377
```
7478

7579
[!INCLUDE [deploying to network secured sites](../../includes/app-service-deploy-network-secured-sites.md)]
7680

7781
The following example uses the `packageUri` parameter to specify the URL of an Azure Storage account that the web app should pull the ZIP from.
7882

7983
```bash
80-
curl -X POST -u <username:password> https://<app-name>.scm.azurewebsites.net/api/publish -d '{"packageUri": "https://storagesample.blob.core.windows.net/sample-container/myapp.zip?sv=2021-10-01&sb&sig=slk22f3UrS823n4kSh8Skjpa7Naj4CG3"}'
84+
curl -X PUT \
85+
-H "Content-Type: application/json" \
86+
-u '<username>:<password>' \
87+
-d '{"packageUri": "https://storagesample.blob.core.windows.net/sample-container/myapp.zip?sv=2021-10-01&sb&sig=slk22f3UrS823n4kSh8Skjpa7Naj4CG3"}' \
88+
"https://<app-name>.scm.azurewebsites.net/api/zipdeploy"
8189
```
8290

8391
# [Kudu UI](#tab/kudu-ui)

0 commit comments

Comments
 (0)