Hi @chaowen guo ,
Apologies for the late response. You are following the correct example.
You can use the below example to create a new web, mobile, or API app in an existing resource group, or updates an existing app.
PUT https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}?api-version=2021-02-01
You can also follow the steps in this documentation to to deploy an ASP.NET Core API app to App Service with CORS support.
Hope that helps. Please let us know if you have further questions
Thanks,
Grace
--If the reply is helpful, please Upvote and Accept as answer--