I want using the REST API to update the json view, just like I asked in this post:
Since the content in the json view is a lot and dynamic, I want use Get to get the content before modifying it, and then simply modify Json view with this body update to overwrite the original json view.
Now, I could using develop tool F12 to get the content with below URL:
https://management.azure.com/subscriptions/<subscriptions>/resourceGroups/<resourceGroups>/providers/Microsoft.Web/sites/<LogicAppName>/workflowsconfiguration/connections?api-version=2018-11-01
Then I can get the content of the Json View.
However, I using the same URL with Post/Put method, like:
$token = $(Token)
$headers = @{
"Authorization" = ('Bearer {0}' -f $token)
"If-Match" = '*'
}
$url = "https://management.azure.com/subscriptions/<subscriptions>/resourceGroups/<resourceGroups>/providers/Microsoft.Web/sites/<LogicAppName>/workflowsconfiguration/connections?api-version=2018-11-01"
Invoke-RestMethod -Uri $url -Method Post -Body $JsonView -ContentType "application/json" -Headers $headers
The result is:
The remote server returned an error: (405) Method Not Allowed.
Even if I using another URL:
https://management.azure.com/subscriptions/<SubscriptionId>/resourceGroups/<ResourceGroups>/providers/Microsoft.Web/sites/<LogicAppName>/deployWorkflowArtifacts?api-version=2018-11-01
Still the same error.
So, my question is that what is the correct REST API URL to modify the json view?




