@@ -48,14 +48,14 @@ Save this token to use in the `Authorization: Bearer <TOKEN>` header.
4848Here's an example curl command to simulate HTTP Publish:
4949
5050``` http
51- curl -X POST "https://contoso.westus3-1.ts.eventgrid.azure.net/mqtt/messages?topic=devices%2XXXX-0000%2Fprompt&api-version=2025-08-01 -preview" \
52- -H "Authorization: Bearer <ENTRA_TOKEN_HERE>" \
53- -H "mqtt-qos: 1" \
54- -H "mqtt-retain: 0" \
55- -H "mqtt-response-topic: devices%2XXXX-00000%2Freply" \
56- -H "mqtt-correlation-data: XXXXXXX" \
57- -H "mqtt-user-properties: XXXXXXXXXXXX" \
58- -H "Content-Type: text/plain;charset=UTF-8" \
51+ curl -X POST "https://contoso.westus3-1.ts.eventgrid.azure.net/mqtt/messages?topic=devices%2XXXX-0000%2Fprompt&api-version=2025-02-15 -preview" \
52+ -H "Authorization: Bearer <ENTRA_TOKEN_HERE>" \
53+ -H "mqtt-qos: 1" \
54+ -H "mqtt-retain: 0" \
55+ -H "mqtt-response-topic: devices%2XXXX-00000%2Freply" \
56+ -H "mqtt-correlation-data: XXXXXXX" \
57+ -H "mqtt-user-properties: XXXXXXXXXXXX" \
58+ -H "Content-Type: text/plain;charset=UTF-8" \
5959 --data-raw "Please accept terms of licensing and agreement"
6060```
6161
@@ -73,88 +73,92 @@ In this sample command:
73731 . Select ** Import Collection** , and then select ` EventGrid_HTTP_Publish_Postman_Collection.json ` . Here's the content for the JSON file:
7474
7575 ``` json
76- {
77- "info" : {
78- "name" : " Event Grid MQTT Broker - HTTP Publish" ,
79- "schema" : " https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
80- },
81- "item" : [
82- {
83- "name" : " HTTP Publish to MQTT Broker" ,
84- "request" : {
85- "method" : " POST" ,
86- "header" : [
87- {
88- "key" : " Authorization" ,
89- "value" : " Bearer {{entra_token}}"
90- },
91- {
92- "key" : " mqtt-qos" ,
93- "value" : " 1"
94- },
95- {
96- "key" : " mqtt-retain" ,
97- "value" : " 0"
98- },
99- {
100- "key" : " mqtt-response-topic" ,
101- "value" : " devices%2FCXa-23112%2Freply"
102- },
103- {
104- "key" : " mqtt-correlation-data" ,
105- "value" : " PlXCscK2wrbCuy8="
106- },
107- {
108- "key" : " mqtt-user-properties" ,
109- "value" : " [{\" Urgency\" :\" alert\" },{\" RequestId\" :\" 55f4a7ee-b0b4-4d7f-8eb5-2edba2ced5d7\" }]"
110- },
111- {
112- "key" : " Content-Type" ,
113- "value" : " text/plain;charset=UTF-8"
114- }
76+ {
77+
78+ "info" : {
79+ "name" : " Event Grid MQTT Broker - HTTP Publish" ,
80+ "schema" : " https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
81+ },
82+ "item" : [
83+ {
84+ "name" : " HTTP Publish to MQTT Broker" ,
85+ "request" : {
86+ "method" : " POST" ,
87+ "header" : [
88+ {
89+ "key" : " Authorization" ,
90+ "value" : " Bearer {{entra_token}}"
91+ },
92+ {
93+ "key" : " mqtt-qos" ,
94+ "value" : " 1"
95+ },
96+ {
97+ "key" : " mqtt-retain" ,
98+ "value" : " 0"
99+ },
100+ {
101+ "key" : " mqtt-response-topic" ,
102+ "value" : " devices%2FCXa-23112%2Freply"
103+ },
104+ {
105+ "key" : " mqtt-correlation-data" ,
106+ "value" : " PlXCscK2wrbCuy8="
107+ },
108+ {
109+
110+ "key" : " mqtt-user-properties" ,
111+ "value" : " [{\" Urgency\" :\" alert\" },{\" RequestId\" :\" 55f4a7ee-b0b4-4d7f-8eb5-2edba2ced5d7\" }]"
112+ },
113+ {
114+
115+ "key" : " Content-Type" ,
116+ "value" : " text/plain;charset=UTF-8"
117+ }
115118 ],
116- "url" : {
117- "raw" : " https://{{namespace}}/mqtt/messages?topic={{topic}}&api-version=2025-08-01-preview" ,
118- "host" : [
119- " {{namespace}}"
120- ],
121- "path" : [
122- " mqtt" ,
123- " messages"
124- ],
125- "query" : [
126- {
127- "key" : " topic" ,
128- "value" : " {{topic}}"
129- },
130- {
131- "key" : " api-version" ,
132- "value" : " 2025-02-15-preview"
133- }
134- ]
135- },
136- "body" : {
137- "mode" : " raw" ,
138- "raw" : " Please accept terms of licensing and agreement"
139- }
140- }
141- }
142- ],
143- "variable" : [
144- {
145- "key" : " namespace" ,
146- "value" : " contoso.westus3-1.ts.eventgrid.azure.net"
147- },
148- {
149- "key" : " topic" ,
150- "value" : " devices/CXa-23112/prompt"
151- },
152- {
153- "key" : " entra_token" ,
154- "value" : " <ENTRA_TOKEN_HERE>"
155- }
156- ]
157- }
119+
120+ "url" : {
121+ "raw" : " https://{{namespace}}/mqtt/messages?topic={{topic}}&api-version=2025-02-15-preview" ,
122+ "host" : [
123+ " {{namespace}}"
124+ ],
125+ "path" : [
126+ " mqtt" ,
127+ " messages"
128+ ],
129+ "query" : [
130+ {
131+ "key" : " topic" ,
132+ "value" : " {{topic}}"
133+ },
134+ {
135+ "key" : " api-version" ,
136+ "value" : " 2025-02-15-preview"
137+ }
138+ ]
139+ },
140+ "body" : {
141+ "mode" : " raw" ,
142+ "raw" : " Please accept terms of licensing and agreement"
143+ }
144+ }
145+ }
146+ ],
147+ "variable" : [
148+ {
149+ "key" : " namespace" ,
150+ "value" : " contoso.westus3-1.ts.eventgrid.azure.net"
151+ },
152+ {
153+ "key" : " topic" ,
154+ "value" : " devices/CXa-23112/prompt"
155+ },
156+ {
157+ "key" : " entra_token" ,
158+ "value" : " <ENTRA_TOKEN_HERE>"
159+ }
160+ ]
161+ }
158162 ```
159163
1601641 . On the **Variables** tab:
0 commit comments