I am making a rest call using AzCli to get the backup configuration of the web apps. However there are couple of scenarios which I want to consider while making this REST call.
To get the state of the request made I am trying to get the response code for it. In the documentation Microsoft says there are two responses 200 OK and other status code are available. I am not sure how can I get status code response after making REST call. I am not sure its possible to get the response code through AzCli , if no then please suggest alternatives. Any help would be appreciated.
Environment
Windows-10-10.0.19041-SP0
Python 3.8.9
Installer: MSI
azure-cli 2.24.0 *
Extensions:
logic 0.1.3
url=f"https://management.azure.com/subscriptions/{sub_id}/resourceGroups/{resourceGroup}/providers/Microsoft.Web/sites/{resourceName}/config/backup/list?api-version=2019-08-01"
cliResult = self.azure_cli_v2(["rest", "--method", "post", "--url", url], log_args=False)