Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 11 additions & 2 deletions articles/api-management/api-management-howto-api-inspector.md
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,9 @@ To help automate these steps with the [Visual Studio Code REST Client](https://m
@apiEndPoint = // API URL
@requestBody = // Data to send
@tenantId = // Tenant ID

@apiId = // Api Id for which trace log is to be generated.

# @name login
POST https://login.microsoftonline.com/{tenantId}/oauth2/token
content-type: application/x-www-form-urlencoded

Expand All @@ -183,6 +185,7 @@ grant_type=client_credentials&client_id={{clientId}}&client_secret={{clientSecre
# @name listDebugCredentials
POST https://management.azure.com/subscriptions/{{subscriptionId}}/resourceGroups/{{resourceGroup}}/providers/Microsoft.ApiManagement/service/{{apimName}}/gateways/managed/listDebugCredentials?api-version=2023-05-01-preview
Authorization: Bearer {{authToken}}

Content-Type: application/json
{
"credentialsExpireAfter": "PT1H",
Expand All @@ -195,7 +198,13 @@ Content-Type: application/json

###
# @name callApi
curl -k -H "Apim-Debug-Authorization: {{debugToken}}" -H 'Host: {{externalHost}}' -H 'Ocp-Apim-Subscription-Key: {{subscriptionKey}}' -H 'Content-Type: application/json' '{{apiEndPoint}}' -d '{{requestBody}}'
POST {{apiEndPoint}} HTTP/1.1
Host: {{externalHost}}
Apim-Debug-Authorization: {{debugToken}}
Ocp-Apim-Subscription-Key: {{subscriptionKey}}
Content-Type: application/json

{{requestBody}}

###
@traceId = {{callApi.response.headers.Apim-Trace-Id}}
Expand Down