Skip to content

Commit a5f7023

Browse files
committed
Added the JSON file
1 parent d0f9d8c commit a5f7023

File tree

1 file changed

+86
-1
lines changed

1 file changed

+86
-1
lines changed

articles/event-grid/mqtt-how-to-http-publish.md

Lines changed: 86 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,92 @@ In this sample command:
6464

6565
## Import to Bruno
6666
1. Open Bruno.
67-
1. Select **Import Collection**, and then select `EventGrid_HTTP_Publish_Postman_Collection.json`.
67+
1. Select **Import Collection**, and then select `EventGrid_HTTP_Publish_Postman_Collection.json`. Here's the content for the JSON file:
68+
69+
```json
70+
{
71+
"info": {
72+
"name": "Event Grid MQTT Broker - HTTP Publish",
73+
"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
74+
},
75+
"item": [
76+
{
77+
"name": "HTTP Publish to MQTT Broker",
78+
"request": {
79+
"method": "POST",
80+
"header": [
81+
{
82+
"key": "Authorization",
83+
"value": "Bearer {{entra_token}}"
84+
},
85+
{
86+
"key": "mqtt-qos",
87+
"value": "1"
88+
},
89+
{
90+
"key": "mqtt-retain",
91+
"value": "0"
92+
},
93+
{
94+
"key": "mqtt-response-topic",
95+
"value": "devices%2FCXa-23112%2Freply"
96+
},
97+
{
98+
"key": "mqtt-correlation-data",
99+
"value": "PlXCscK2wrbCuy8="
100+
},
101+
{
102+
"key": "mqtt-user-properties",
103+
"value": "[{\"Urgency\":\"alert\"},{\"RequestId\":\"55f4a7ee-b0b4-4d7f-8eb5-2edba2ced5d7\"}]"
104+
},
105+
{
106+
"key": "Content-Type",
107+
"value": "text/plain;charset=UTF-8"
108+
}
109+
],
110+
"url": {
111+
"raw": "https://{{namespace}}/mqtt/messages?topic={{topic}}&api-version=2025-02-15-preview",
112+
"host": [
113+
"{{namespace}}"
114+
],
115+
"path": [
116+
"mqtt",
117+
"messages"
118+
],
119+
"query": [
120+
{
121+
"key": "topic",
122+
"value": "{{topic}}"
123+
},
124+
{
125+
"key": "api-version",
126+
"value": "2025-02-15-preview"
127+
}
128+
]
129+
},
130+
"body": {
131+
"mode": "raw",
132+
"raw": "Please accept terms of licensing and agreement"
133+
}
134+
}
135+
}
136+
],
137+
"variable": [
138+
{
139+
"key": "namespace",
140+
"value": "contoso.westus3-1.ts.eventgrid.azure.net"
141+
},
142+
{
143+
"key": "topic",
144+
"value": "devices/CXa-23112/prompt"
145+
},
146+
{
147+
"key": "entra_token",
148+
"value": "<ENTRA_TOKEN_HERE>"
149+
}
150+
]
151+
}
152+
```
68153
1. Go to **Variables** tab:
69154
- Replace `{{namespace}}` with your namespace FQDN.
70155
- Replace `{{topic}}` with your MQTT topic.

0 commit comments

Comments
 (0)