Skip to content

Commit 2792267

Browse files
committed
Update to Logs Ingestion API walkthrough
1 parent afcfa6f commit 2792267

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed
116 Bytes
Loading

articles/azure-monitor/logs/tutorial-logs-ingestion-api.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
title: 'Tutorial: Send data to Azure Monitor Logs using REST API (Resource Manager templates)'
33
description: Tutorial on how to send data to a Log Analytics workspace in Azure Monitor by using the REST API Azure Resource Manager template version.
44
ms.topic: tutorial
5-
ms.date: 07/15/2022
5+
ms.date: 02/01/2023
66
---
77

88
# Tutorial: Send data to Azure Monitor Logs using REST API (Resource Manager templates)
@@ -305,7 +305,7 @@ The [DCR](../essentials/data-collection-rule-overview.md) defines the schema of
305305
306306
:::image type="content" source="media/tutorial-workspace-transformations-api/data-collection-rule-details.png" lightbox="media/tutorial-workspace-transformations-api/data-collection-rule-details.png" alt-text="Screenshot that shows DCR details.":::
307307
308-
1. Copy the **Resource ID** for the DCR. You'll use it in the next step.
308+
1. Copy the **Immutable ID** for the DCR. You'll use it in a later step when you send sample data using the API.
309309
310310
:::image type="content" source="media/tutorial-workspace-transformations-api/data-collection-rule-json-view.png" lightbox="media/tutorial-workspace-transformations-api/data-collection-rule-json-view.png" alt-text="Screenshot that shows DCR JSON view.":::
311311
@@ -357,6 +357,7 @@ The following PowerShell code sends data to the endpoint by using HTTP REST fund
357357
#information needed to send data to the DCR endpoint
358358
$dcrImmutableId = "dcr-000000000000000"; #the immutableId property of the DCR object
359359
$dceEndpoint = "https://my-dcr-name.westus2-1.ingest.monitor.azure.com"; #the endpoint property of the Data Collection Endpoint object
360+
$streamName = "Custom-MyTableRawData"; #name of the stream in the DCR that represents the destination table
360361
361362
##################
362363
### Step 1: Obtain a bearer token used later to authenticate against the DCE.
@@ -404,7 +405,7 @@ The following PowerShell code sends data to the endpoint by using HTTP REST fund
404405
##################
405406
$body = $staticData;
406407
$headers = @{"Authorization"="Bearer $bearerToken";"Content-Type"="application/json"};
407-
$uri = "$dceEndpoint/dataCollectionRules/$dcrImmutableId/streams/Custom-MyTableRawData?api-version=2021-11-01-preview"
408+
$uri = "$dceEndpoint/dataCollectionRules/$dcrImmutableId/streams/$streamName?api-version=2021-11-01-preview"
408409
409410
$uploadResponse = Invoke-RestMethod -Uri $uri -Method "Post" -Body $body -Headers $headers
410411
```

0 commit comments

Comments
 (0)