This project shows a sample on how to call App service diagnostics APIs using Azure AD App authentication.
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.
- dotnet core sdk
- Client Cert that is trusted by App services team, (Read instructions on that in the internal wiki), OR
- AD App with AppId in allowed list by App Services Team. Learn How to Create an Azure AD App
cd src\SampleAPIServer
dotnet build
-
Update the Settings in
src\SampleAPIServer\appsettings.json
as per internal wiki shared. -
Run the SampleAPIServer:
cd src\SampleAPIServer dotnet run
The SampleAPIServer will start and requests will be serve at http://localhost:50616
The SampleAPIServer exposes two APIs. You can just the APIs using Postman or in Browser:
-
- Method : GET
- Url :
http://localhost:50616/subscriptions/<your subid>/resourceGroups/<your resource group>/providers/Microsoft.<RPName>/<service>/<your service name>/detectors
Example:
- AKS :
http://localhost:50616/subscriptions/<your subid>/resourceGroups/<your resource group>/providers/Microsoft.ContainerService/managedClusters/<your cluster name>/detectors
- Logic App :
http://localhost:50616/subscriptions/<your subid>/resourceGroups/<your resource group>/providers/Microsoft.Logic/workflows/<your cluster name>/detectors
-
- Method : GET
- Url :
http://localhost:50616/subscriptions/<your subid>/resourceGroups/<your resource group>/providers/Microsoft.<RPName>/<service>/<your service name>/detectors/<detectorId>