Skip to content

Commit 7eaf044

Browse files
committed
Update deprecated API versions
1 parent b7ec1a9 commit 7eaf044

7 files changed

+57
-57
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: 19 additions & 19 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:
@@ -280,7 +280,7 @@ The response to this request looks like the following example:
280280
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`:
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-device-templates-with-rest-api.md

Lines changed: 5 additions & 5 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,7 +450,7 @@ 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]
@@ -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:

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

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ The IoT Central REST API lets you:
3838
Use the following request to create a new device.
3939

4040
```http
41-
PUT https://{subdomain}.{baseDomain}/api/devices/{deviceId}?api-version=2022-05-31
41+
PUT https://{subdomain}.{baseDomain}/api/devices/{deviceId}?api-version=2022-07-31
4242
```
4343

4444
The following example shows a request body that adds a device for a device template. You can get the `template` details from the device templates page in IoT Central application UI.
@@ -79,7 +79,7 @@ The response to this request looks like the following example:
7979
Use the following request to retrieve details of a device from your application:
8080

8181
```http
82-
GET https://{subdomain}.{baseDomain}/api/devices/{deviceId}?api-version=2022-05-31
82+
GET https://{subdomain}.{baseDomain}/api/devices/{deviceId}?api-version=2022-07-31
8383
```
8484

8585
>[!NOTE]
@@ -104,7 +104,7 @@ The response to this request looks like the following example:
104104
Use the following request to retrieve credentials of a device from your application:
105105

106106
```http
107-
GET https://{subdomain}.{baseDomain}/api/devices/{deviceId}/credentials?api-version=2022-05-31
107+
GET https://{subdomain}.{baseDomain}/api/devices/{deviceId}/credentials?api-version=2022-07-31
108108
```
109109

110110
The response to this request looks like the following example:
@@ -122,7 +122,7 @@ The response to this request looks like the following example:
122122
### Update a device
123123

124124
```http
125-
PATCH https://{subdomain}.{baseDomain}/api/devices/{deviceId}?api-version=2022-05-31
125+
PATCH https://{subdomain}.{baseDomain}/api/devices/{deviceId}?api-version=2022-07-31
126126
```
127127

128128
>[!NOTE]
@@ -159,15 +159,15 @@ The response to this request looks like the following example:
159159
Use the following request to delete a device:
160160

161161
```http
162-
DELETE https://{subdomain}.{baseDomain}/api/devices/{deviceId}?api-version=2022-05-31
162+
DELETE https://{subdomain}.{baseDomain}/api/devices/{deviceId}?api-version=2022-07-31
163163
```
164164

165165
### List devices
166166

167167
Use the following request to retrieve a list of devices from your application:
168168

169169
```http
170-
GET https://{subdomain}.{baseDomain}/api/devices?api-version=2022-05-31
170+
GET https://{subdomain}.{baseDomain}/api/devices?api-version=2022-07-31
171171
```
172172

173173
The response to this request looks like the following example:
@@ -400,7 +400,7 @@ The response to this request looks like the following example:
400400
Use the following request to create a new device group.
401401

402402
```http
403-
PUT https://{subdomain}.{baseDomain}/api/deviceGroups/{deviceGroupId}?api-version=2022-05-31
403+
PUT https://{subdomain}.{baseDomain}/api/deviceGroups/{deviceGroupId}?api-version=2022-07-31
404404
```
405405

406406
When you create a device group, you define a `filter` that selects the devices to add to the group. A `filter` identifies a device template and any properties to match. The following example creates device group that contains all devices associated with the "dtmi:modelDefinition:dtdlv2" template where the `provisioned` property is true
@@ -444,7 +444,7 @@ The response to this request looks like the following example:
444444
Use the following request to retrieve details of a device group from your application:
445445

446446
```http
447-
GET https://{subdomain}.{baseDomain}/api/deviceGroups/{deviceGroupId}?api-version=2022-05-31
447+
GET https://{subdomain}.{baseDomain}/api/deviceGroups/{deviceGroupId}?api-version=2022-07-31
448448
```
449449

450450
* deviceGroupId - Unique ID for the device group.
@@ -466,7 +466,7 @@ The response to this request looks like the following example:
466466
### Update a device group
467467

468468
```http
469-
PATCH https://{subdomain}.{baseDomain}/api/deviceGroups/{deviceGroupId}?api-version=2022-05-31
469+
PATCH https://{subdomain}.{baseDomain}/api/deviceGroups/{deviceGroupId}?api-version=2022-07-31
470470
```
471471

472472
The sample request body looks like the following example which updates the `displayName` of the device group:
@@ -497,15 +497,15 @@ The response to this request looks like the following example:
497497
Use the following request to delete a device group:
498498

499499
```http
500-
DELETE https://{subdomain}.{baseDomain}/api/deviceGroups/{deviceGroupId}?api-version=2022-05-31
500+
DELETE https://{subdomain}.{baseDomain}/api/deviceGroups/{deviceGroupId}?api-version=2022-07-31
501501
```
502502

503503
### List device groups
504504

505505
Use the following request to retrieve a list of device groups from your application:
506506

507507
```http
508-
GET https://{subdomain}.{baseDomain}/api/deviceGroups?api-version=2022-05-31
508+
GET https://{subdomain}.{baseDomain}/api/deviceGroups?api-version=2022-07-31
509509
```
510510

511511
The response to this request looks like the following example:

0 commit comments

Comments
 (0)