Skip to content

Commit a62fc20

Browse files
Merge pull request #214412 from dominicbetts/central-rest-api-versions
IoT Central: Fix REST API versions
2 parents 3b9b85f + 4cac46f commit a62fc20

8 files changed

+66
-66
lines changed

articles/iot-central/core/howto-authorize-rest-api.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ Using the REST API:
8686
1. Use the REST API to retrieve a list of role IDs from your application:
8787

8888
```http
89-
GET https://{your app subdomain}.azureiotcentral.com/api/roles?api-version=2022-05-31
89+
GET https://{your app subdomain}.azureiotcentral.com/api/roles?api-version=2022-07-31
9090
```
9191
9292
The response to this request looks like the following example:
@@ -113,7 +113,7 @@ Using the REST API:
113113
1. Use the REST API to create an API token for a role. For example, to create an API token called `operator-token` for the operator role:
114114
115115
```http
116-
PUT https://{your app subdomain}.azureiotcentral.com/api/apiToken/operator-token?api-version=2022-05-31
116+
PUT https://{your app subdomain}.azureiotcentral.com/api/apiToken/operator-token?api-version=2022-07-31
117117
```
118118
119119
Request body:

articles/iot-central/core/howto-control-devices-with-rest-api.md

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ In IoT Central, a module refers to an IoT Edge module running on a connected IoT
5252
Use the following request to retrieve the components from a device called `temperature-controller-01`:
5353

5454
```http
55-
GET https://{your app subdomain}.azureiotcentral.com/api/devices/temperature-controller-01/components?api-version=2022-05-31
55+
GET https://{your app subdomain}.azureiotcentral.com/api/devices/temperature-controller-01/components?api-version=2022-07-31
5656
```
5757

5858
The response to this request looks like the following example. The `value` array contains details of each device component:
@@ -87,7 +87,7 @@ The response to this request looks like the following example. The `value` array
8787
Use the following request to retrieve a list of modules running on a connected IoT Edge device called `environmental-sensor-01`:
8888

8989
```http
90-
GET https://{your app subdomain}.azureiotcentral.com/api/devices/environmental-sensor-01/modules?api-version=2022-05-31
90+
GET https://{your app subdomain}.azureiotcentral.com/api/devices/environmental-sensor-01/modules?api-version=2022-07-31
9191
```
9292

9393
The response to this request looks like the following example. The array of modules only includes custom modules running on the IoT Edge device, not the built-in `$edgeAgent` and `$edgeHub` modules:
@@ -110,15 +110,15 @@ The response to this request looks like the following example. The array of modu
110110
Use the following request to retrieve a list of the components in a module called `SimulatedTemperatureSensor`:
111111

112112
```http
113-
GET https://{your app subdomain}.azureiotcentral.com/api/devices/environmental-sensor-01/modules?api-version=2022-05-31
113+
GET https://{your app subdomain}.azureiotcentral.com/api/devices/environmental-sensor-01/modules?api-version=2022-07-31
114114
```
115115

116116
## Read telemetry
117117

118118
Use the following request to retrieve the last known telemetry value from a device that doesn't use components. In this example, the device is called `thermostat-01` and the telemetry is called `temperature`:
119119

120120
```http
121-
GET https://{your app subdomain}.azureiotcentral.com/api/devices/thermostat-01/telemetry/temperature?api-version=2022-05-31
121+
GET https://{your app subdomain}.azureiotcentral.com/api/devices/thermostat-01/telemetry/temperature?api-version=2022-07-31
122122
```
123123

124124
The response to this request looks like the following example:
@@ -133,7 +133,7 @@ The response to this request looks like the following example:
133133
Use the following request to retrieve the last known telemetry value from a device that does use components. In this example, the device is called `temperature-controller-01`, the component is called `thermostat2`, and the telemetry is called `temperature`:
134134

135135
```http
136-
GET https://{your app subdomain}.azureiotcentral.com/api/devices/temperature-controller-01/components/thermostat2/telemetry/temperature?api-version=2022-05-31
136+
GET https://{your app subdomain}.azureiotcentral.com/api/devices/temperature-controller-01/components/thermostat2/telemetry/temperature?api-version=2022-07-31
137137
```
138138

139139
The response to this request looks like the following example:
@@ -148,7 +148,7 @@ The response to this request looks like the following example:
148148
If the device is an IoT Edge device, use the following request to retrieve the last known telemetry value from a module. This example uses a device called `environmental-sensor-01` with a module called `SimulatedTemperatureSensor` and telemetry called `ambient`. The `ambient` telemetry type has temperature and humidity values:
149149

150150
```http
151-
GET https://{your app subdomain}.azureiotcentral.com/api/devices/environmental-sensor-01/modules/SimulatedTemperatureSensor/telemetry/ambient?api-version=2022-05-31
151+
GET https://{your app subdomain}.azureiotcentral.com/api/devices/environmental-sensor-01/modules/SimulatedTemperatureSensor/telemetry/ambient?api-version=2022-07-31
152152
```
153153

154154
The response to this request looks like the following example:
@@ -171,7 +171,7 @@ The response to this request looks like the following example:
171171
Use the following request to retrieve the property values from a device that doesn't use components. In this example, the device is called `thermostat-01`:
172172

173173
```http
174-
GET https://{your app subdomain}.azureiotcentral.com/api/devices/thermostat-01/properties?api-version=2022-05-31
174+
GET https://{your app subdomain}.azureiotcentral.com/api/devices/thermostat-01/properties?api-version=2022-07-31
175175
```
176176

177177
The response to this request looks like the following example. It shows the device is reporting a single property value:
@@ -190,7 +190,7 @@ The response to this request looks like the following example. It shows the devi
190190
Use the following request to retrieve property values from all components. In this example, the device is called `temperature-controller-01`:
191191

192192
```http
193-
GET https://{your app subdomain}.azureiotcentral.com/api/devices/temperature-controller-01/properties?api-version=2022-05-31
193+
GET https://{your app subdomain}.azureiotcentral.com/api/devices/temperature-controller-01/properties?api-version=2022-07-31
194194
```
195195

196196
The response to this request looks like the following example:
@@ -261,7 +261,7 @@ The response to this request looks like the following example:
261261
Use the following request to retrieve a property value from an individual component. In this example, the device is called `temperature-controller-01` and the component is called `thermostat2`:
262262

263263
```http
264-
GET https://{your app subdomain}.azureiotcentral.com/api/devices/temperature-controller-01/components/thermostat2/properties?api-version=2022-05-31
264+
GET https://{your app subdomain}.azureiotcentral.com/api/devices/temperature-controller-01/components/thermostat2/properties?api-version=2022-07-31
265265
```
266266

267267
The response to this request looks like the following example:
@@ -277,10 +277,10 @@ The response to this request looks like the following example:
277277
}
278278
```
279279

280-
If the device is an IoT Edge device, use the following request to retrieve property values from a from a module. This example uses a device called `environmental-sensor-01` with a module called `SimulatedTemperatureSensor`:
280+
If the device is an IoT Edge device, use the following request to retrieve property values from a module. This example uses a device called `environmental-sensor-01` with a module called `SimulatedTemperatureSensor`:
281281

282282
```http
283-
GET https://{your app subdomain}.azureiotcentral.com/api/devices/environmental-sensor-01/modules/SimulatedTemperatureSensor/properties?api-version=2022-05-31
283+
GET https://{your app subdomain}.azureiotcentral.com/api/devices/environmental-sensor-01/modules/SimulatedTemperatureSensor/properties?api-version=2022-07-31
284284
```
285285

286286
The response to this request looks like the following example:
@@ -310,7 +310,7 @@ Some properties are writable. For example, in the thermostat model the `targetTe
310310
Use the following request to write an individual property value to a device that doesn't use components. In this example, the device is called `thermostat-01`:
311311

312312
```http
313-
PATCH https://{your app subdomain}.azureiotcentral.com/api/devices/thermostat-01/properties?api-version=2022-05-31
313+
PATCH https://{your app subdomain}.azureiotcentral.com/api/devices/thermostat-01/properties?api-version=2022-07-31
314314
```
315315

316316
The request body looks like the following example:
@@ -339,7 +339,7 @@ The response to this request looks like the following example:
339339
Use the following request to write an individual property value to a device that does use components. In this example, the device is called `temperature-controller-01` and the component is called `thermostat2`:
340340

341341
```http
342-
PATCH https://{your app subdomain}.azureiotcentral.com/api/devices/temperature-controller-01/components/thermostat2/properties?api-version=2022-05-31
342+
PATCH https://{your app subdomain}.azureiotcentral.com/api/devices/temperature-controller-01/components/thermostat2/properties?api-version=2022-07-31
343343
```
344344

345345
The request body looks like the following example:
@@ -368,7 +368,7 @@ The response to this request looks like the following example:
368368
If the device is an IoT Edge device, use the following request to write an individual property value to a module. This example uses a device called `environmental-sensor-01`, a module called `SimulatedTemperatureSensor`, and a property called `SendInterval`:
369369

370370
```http
371-
PUT https://{your app subdomain}.azureiotcentral.com/api/devices/environmental-sensor-01/modules/SimulatedTemperatureSensor/properties?api-version=2022-05-31
371+
PUT https://{your app subdomain}.azureiotcentral.com/api/devices/environmental-sensor-01/modules/SimulatedTemperatureSensor/properties?api-version=2022-07-31
372372
```
373373

374374
The request body looks like the following example:
@@ -399,13 +399,13 @@ The response to this request looks like the following example:
399399
If you're using an IoT Edge device, use the following request to retrieve property values from a module:
400400

401401
```http
402-
GET https://{your app subdomain}.azureiotcentral.com/api/devices/{deviceId}/modules/{moduleName}/properties?api-version=2022-05-31
402+
GET https://{your app subdomain}.azureiotcentral.com/api/devices/{deviceId}/modules/{moduleName}/properties?api-version=2022-07-31
403403
```
404404

405405
If you're using an IoT Edge device, use the following request to retrieve property values from a component in a module:
406406

407407
```http
408-
GET https://{your app subdomain}.azureiotcentral.com/api/devices/{deviceId}/modules/{moduleName}/components/{componentName}/properties?api-version=2022-05-31
408+
GET https://{your app subdomain}.azureiotcentral.com/api/devices/{deviceId}/modules/{moduleName}/components/{componentName}/properties?api-version=2022-07-31
409409
```
410410

411411
## Call commands
@@ -415,7 +415,7 @@ You can use the REST API to call device commands and retrieve the device history
415415
Use the following request to call a command on device that doesn't use components. In this example, the device is called `thermostat-01` and the command is called `getMaxMinReport`:
416416

417417
```http
418-
POST https://{your app subdomain}.azureiotcentral.com/api/devices/thermostat-01/commands/getMaxMinReport?api-version=2022-05-31
418+
POST https://{your app subdomain}.azureiotcentral.com/api/devices/thermostat-01/commands/getMaxMinReport?api-version=2022-07-31
419419
```
420420

421421
The request body looks like the following example:
@@ -444,7 +444,7 @@ The response to this request looks like the following example:
444444
To view the history for this command, use the following request:
445445

446446
```http
447-
GET https://{your app subdomain}.azureiotcentral.com/api/devices/thermostat-01/commands/getMaxMinReport?api-version=2022-05-31
447+
GET https://{your app subdomain}.azureiotcentral.com/api/devices/thermostat-01/commands/getMaxMinReport?api-version=2022-07-31
448448
```
449449

450450
The response to this request looks like the following example:
@@ -469,15 +469,15 @@ The response to this request looks like the following example:
469469
Use the following request to call a command on device that does use components. In this example, the device is called `temperature-controller-01`, the component is called `thermostat2`, and the command is called `getMaxMinReport`:
470470

471471
```http
472-
POST https://{your app subdomain}.azureiotcentral.com/api/devices/temperature-controller-01/components/thermostat2/commands/getMaxMinReport?api-version=2022-05-31
472+
POST https://{your app subdomain}.azureiotcentral.com/api/devices/temperature-controller-01/components/thermostat2/commands/getMaxMinReport?api-version=2022-07-31
473473
```
474474

475475
The formats of the request payload and response are the same as for a device that doesn't use components.
476476

477477
To view the history for this command, use the following request:
478478

479479
```http
480-
GET https://{your app subdomain}.azureiotcentral.com/api/devices/temperature-controller-01/components/thermostat2/commands/getMaxMinReport?api-version=2022-05-31
480+
GET https://{your app subdomain}.azureiotcentral.com/api/devices/temperature-controller-01/components/thermostat2/commands/getMaxMinReport?api-version=2022-07-31
481481
```
482482

483483
> [!TIP]

articles/iot-central/core/howto-manage-data-export-with-rest-api.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ The response to this request looks like the following example:
134134
PATCH https://{subdomain}.{baseDomain}/api/dataExport/destinations/{destinationId}?api-version=2022-06-30-preview
135135
```
136136

137-
You can use this to perform an incremental update to an export. The sample request body looks like the following example which updates the `displayName` to a destination:
137+
You can use this to perform an incremental update to an export. The sample request body looks like the following example that updates the `displayName` to a destination:
138138

139139
```json
140140
{
@@ -306,7 +306,7 @@ The response to this request looks like the following example:
306306
PATCH https://{subdomain}.{baseDomain}/dataExport/exports/{exportId}?api-version=2022-06-30-preview
307307
```
308308

309-
You can use this to perform an incremental update to an export. The sample request body looks like the following example which updates the `enrichments` to an export:
309+
You can use this to perform an incremental update to an export. The sample request body looks like the following example that updates the `enrichments` to an export:
310310

311311
```json
312312
{

articles/iot-central/core/howto-manage-device-templates-with-rest-api.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ The IoT Central REST API lets you:
4343
Use the following request to create and publish a new device template. Default views are automatically generated for device templates created this way.
4444

4545
```http
46-
PUT https://{subdomain}.{baseDomain}/api/deviceTemplates/{deviceTemplateId}?api-version=2022-05-31
46+
PUT https://{subdomain}.{baseDomain}/api/deviceTemplates/{deviceTemplateId}?api-version=2022-07-31
4747
```
4848

4949
>[!NOTE]
@@ -318,7 +318,7 @@ The response to this request looks like the following example:
318318
Use the following request to retrieve details of a device template from your application:
319319

320320
```http
321-
GET https://{subdomain}.{baseDomain}/api/deviceTemplates/{deviceTemplateId}?api-version=2022-05-31
321+
GET https://{subdomain}.{baseDomain}/api/deviceTemplates/{deviceTemplateId}?api-version=2022-07-31
322322
```
323323

324324
>[!NOTE]
@@ -450,13 +450,13 @@ The response to this request looks like the following example:
450450
## Update a device template
451451

452452
```http
453-
PATCH https://{subdomain}.{baseDomain}/api/deviceTemplates/{deviceTemplateId}?api-version=2022-05-31
453+
PATCH https://{subdomain}.{baseDomain}/api/deviceTemplates/{deviceTemplateId}?api-version=2022-07-31
454454
```
455455

456456
>[!NOTE]
457457
>`{deviceTemplateId}` should be the same as the `@id` in the payload.
458458
459-
The sample request body looks like the following example which adds a the `LastMaintenanceDate` cloud property to the device template:
459+
The sample request body looks like the following example that adds a `LastMaintenanceDate` cloud property to the device template:
460460

461461
```json
462462
{
@@ -726,15 +726,15 @@ The response to this request looks like the following example:
726726
Use the following request to delete a device template:
727727

728728
```http
729-
DELETE https://{subdomain}.{baseDomain}/api/deviceTemplates/{deviceTemplateId}?api-version=2022-05-31
729+
DELETE https://{subdomain}.{baseDomain}/api/deviceTemplates/{deviceTemplateId}?api-version=2022-07-31
730730
```
731731

732732
## List device templates
733733

734734
Use the following request to retrieve a list of device templates from your application:
735735

736736
```http
737-
GET https://{subdomain}.{baseDomain}/api/deviceTemplates?api-version=2022-05-31
737+
GET https://{subdomain}.{baseDomain}/api/deviceTemplates?api-version=2022-07-31
738738
```
739739

740740
The response to this request looks like the following example:
@@ -1264,7 +1264,7 @@ The response to this request looks like the following example:
12641264

12651265
You can also combine two or more filters.
12661266

1267-
The following example shows how to retrieve the top 2 device templates where the display name contains the string `thermostat`.
1267+
The following example shows how to retrieve the top two device templates where the display name contains the string `thermostat`.
12681268

12691269
```http
12701270
GET https://{subdomain}.{baseDomain}/api/deviceTemplates?api-version=2022-07-31&$filter=contains(displayName, 'thermostat')&$top=2

0 commit comments

Comments
 (0)