Skip to content

Commit 8a451aa

Browse files
Merge pull request #209875 from v-krishnag/restjobsapi
Restjobsapi
2 parents a185042 + 1ab5968 commit 8a451aa

5 files changed

+252
-44
lines changed

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

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ Each data export definition can send data to one or more destinations. Create th
3434
Use the following request to create or update a destination definition:
3535

3636
```http
37-
PUT https://{subdomain}.{baseDomain}/api/dataExport/destinations/{destinationId}?api-version=1.2-preview
37+
PUT https://{subdomain}.{baseDomain}/api/dataExport/destinations/{destinationId}?api-version=2022-06-30-preview
3838
```
3939

4040
* destinationId - Unique ID for the destination.
@@ -75,7 +75,7 @@ The response to this request looks like the following example:
7575
Use the following request to retrieve details of a destination from your application:
7676

7777
```http
78-
GET https://{subdomain}.{baseDomain}/api/dataExport/destinations/{destinationId}?api-version=1.2-preview
78+
GET https://{subdomain}.{baseDomain}/api/dataExport/destinations/{destinationId}?api-version=2022-06-30-preview
7979
```
8080

8181
The response to this request looks like the following example:
@@ -96,7 +96,7 @@ The response to this request looks like the following example:
9696
Use the following request to retrieve a list of destinations from your application:
9797

9898
```http
99-
GET https://{subdomain}.{baseDomain}/api/dataExport/destinations?api-version=1.2-preview
99+
GET https://{subdomain}.{baseDomain}/api/dataExport/destinations?api-version=2022-06-30-preview
100100
```
101101

102102
The response to this request looks like the following example:
@@ -131,7 +131,7 @@ The response to this request looks like the following example:
131131
### Patch a destination
132132

133133
```http
134-
PATCH https://{subdomain}.{baseDomain}/api/dataExport/destinations/{destinationId}?api-version=1.2-preview
134+
PATCH https://{subdomain}.{baseDomain}/api/dataExport/destinations/{destinationId}?api-version=2022-06-30-preview
135135
```
136136

137137
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:
@@ -163,15 +163,15 @@ The response to this request looks like the following example:
163163
Use the following request to delete a destination:
164164

165165
```http
166-
DELETE https://{subdomain}.{baseDomain}/api/dataExport/destinations/{destinationId}?api-version=1.2-preview
166+
DELETE https://{subdomain}.{baseDomain}/api/dataExport/destinations/{destinationId}?api-version=2022-06-30-preview
167167
```
168168

169169
### Create or update an export definition
170170

171171
Use the following request to create or update a data export definition:
172172

173173
```http
174-
PUT https://{subdomain}.{baseDomain}/api/dataExport/exports/{exportId}?api-version=1.2-preview
174+
PUT https://{subdomain}.{baseDomain}/api/dataExport/exports/{exportId}?api-version=2022-06-30-preview
175175
```
176176

177177
The following example shows a request body that creates an export definition for device telemetry:
@@ -233,7 +233,7 @@ The response to this request looks like the following example:
233233
Use the following request to retrieve details of an export definition from your application:
234234

235235
```http
236-
GET https://{subdomain}.{baseDomain}/api/dataExport/exports/{exportId}?api-version=1.2-preview
236+
GET https://{subdomain}.{baseDomain}/api/dataExport/exports/{exportId}?api-version=2022-06-30-preview
237237
```
238238

239239
The response to this request looks like the following example:
@@ -254,7 +254,7 @@ The response to this request looks like the following example:
254254
Use the following request to retrieve a list of export definitions from your application:
255255

256256
```http
257-
GET https://{subdomain}.{baseDomain}/api/dataExport/exports?api-version=1.2-preview
257+
GET https://{subdomain}.{baseDomain}/api/dataExport/exports?api-version=2022-06-30-preview
258258
```
259259

260260
The response to this request looks like the following example:
@@ -303,7 +303,7 @@ The response to this request looks like the following example:
303303
### Patch an export definition
304304

305305
```http
306-
PATCH https://{subdomain}.{baseDomain}/dataExport/exports/{exportId}?api-version=1.2-preview
306+
PATCH https://{subdomain}.{baseDomain}/dataExport/exports/{exportId}?api-version=2022-06-30-preview
307307
```
308308

309309
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:
@@ -353,7 +353,7 @@ The response to this request looks like the following example:
353353
Use the following request to delete an export definition:
354354

355355
```http
356-
DELETE https://{subdomain}.{baseDomain}/api/dataExport/destinations/{destinationId}?api-version=1.2-preview
356+
DELETE https://{subdomain}.{baseDomain}/api/dataExport/destinations/{destinationId}?api-version=2022-06-30-preview
357357
```
358358

359359
## Next steps

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

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -986,17 +986,14 @@ The response to this request looks like the following example:
986986

987987
You can use ODATA filters to filter the results returned by the list device templates API.
988988

989-
> [!NOTE]
990-
> Currently, ODATA support is only available for `api-version=1.2-preview`.
991-
992989
### $top
993990

994991
Use the **$top** filter to set the result size. The maximum returned result size is 100, and the default size is 25.
995992

996993
Use the following request to retrieve the top 10 device templates from your application:
997994

998995
```http
999-
GET https://{subdomain}.{baseDomain}/api/deviceTemplates?api-version=1.2-preview&$top=10
996+
GET https://{subdomain}.{baseDomain}/api/deviceTemplates?api-version=2022-07-31&$top=10
1000997
```
1001998

1002999
The response to this request looks like the following example:
@@ -1050,7 +1047,7 @@ The response to this request looks like the following example:
10501047
},
10511048
...
10521049
],
1053-
"nextLink": "https://custom-12qmyn6sm0x.azureiotcentral.com/api/deviceTemplates?api-version=1.2-preview&%24top=1&%24skiptoken=%7B%22token%22%3A%22%2BRID%3A%7EJWYqAKZQKp20qCoAAAAACA%3D%3D%23RT%3A1%23TRC%3A1%23ISV%3A2%23IEO%3A65551%23QCF%3A4%22%2C%22range%22%3A%7B%22min%22%3A%2205C1DFFFFFFFFC%22%2C%22max%22%3A%22FF%22%7D%7D"
1050+
"nextLink": "https://custom-12qmyn6sm0x.azureiotcentral.com/api/deviceTemplates?api-version=2022-07-31&%24top=1&%24skiptoken=%7B%22token%22%3A%22%2BRID%3A%7EJWYqAKZQKp20qCoAAAAACA%3D%3D%23RT%3A1%23TRC%3A1%23ISV%3A2%23IEO%3A65551%23QCF%3A4%22%2C%22range%22%3A%7B%22min%22%3A%2205C1DFFFFFFFFC%22%2C%22max%22%3A%22FF%22%7D%7D"
10541051
}
10551052
```
10561053

@@ -1097,7 +1094,7 @@ $filter=contains(displayName, 'template1) eq false
10971094
The following example shows how to retrieve all the device templates where the display name contains the string `thermostat`:
10981095

10991096
```http
1100-
GET https://{subdomain}.{baseDomain}/api/deviceTemplates?api-version=1.2-preview&$filter=contains(displayName, 'thermostat')
1097+
GET https://{subdomain}.{baseDomain}/api/deviceTemplates?api-version=2022-07-31&$filter=contains(displayName, 'thermostat')
11011098
```
11021099

11031100
The response to this request looks like the following example:
@@ -1187,7 +1184,7 @@ $orderby=displayName desc
11871184
The following example shows how to retrieve all the device templates where the result is sorted by `displayName` :
11881185

11891186
```http
1190-
GET https://{subdomain}.{baseDomain}/api/deviceTemplates?api-version=1.2-preview&$orderby=displayName
1187+
GET https://{subdomain}.{baseDomain}/api/deviceTemplates?api-version=2022-07-31&$orderby=displayName
11911188
```
11921189

11931190
The response to this request looks like the following example:
@@ -1270,7 +1267,7 @@ You can also combine two or more filters.
12701267
The following example shows how to retrieve the top 2 device templates where the display name contains the string `thermostat`.
12711268

12721269
```http
1273-
GET https://{subdomain}.{baseDomain}/api/deviceTemplates?api-version=1.2-preview&$filter=contains(displayName, 'thermostat')&$top=2
1270+
GET https://{subdomain}.{baseDomain}/api/deviceTemplates?api-version=2022-07-31&$filter=contains(displayName, 'thermostat')&$top=2
12741271
```
12751272

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

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

Lines changed: 12 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -201,17 +201,14 @@ The response to this request looks like the following example:
201201

202202
You can use ODATA filters to filter the results returned by the list devices API.
203203

204-
> [!NOTE]
205-
> Currently, ODATA support is only available for `api-version=1.2-preview`
206-
207204
### $top
208205

209206
Use the **$top** to set the result size, the maximum returned result size is 100, the default size is 25.
210207

211208
Use the following request to retrieve a top 10 device from your application:
212209

213210
```http
214-
GET https://{subdomain}.{baseDomain}/api/devices?api-version=1.2-preview&$top=10
211+
GET https://{subdomain}.{baseDomain}/api/devices?api-version=2022-07-31&$top=10
215212
```
216213

217214
The response to this request looks like the following example:
@@ -239,7 +236,7 @@ The response to this request looks like the following example:
239236
},
240237
...
241238
],
242-
"nextLink": "https://custom-12qmyn6sm0x.azureiotcentral.com/api/devices?api-version=1.2-preview&%24top=1&%24skiptoken=%257B%2522token%2522%253A%2522%252BRID%253A%7EJWYqAOis7THQbBQAAAAAAg%253D%253D%2523RT%253A1%2523TRC%253A1%2523ISV%253A2%2523IEO%253A65551%2523QCF%253A4%2522%252C%2522range%2522%253A%257B%2522min%2522%253A%2522%2522%252C%2522max%2522%253A%252205C1D7F7591D44%2522%257D%257D"
239+
"nextLink": "https://custom-12qmyn6sm0x.azureiotcentral.com/api/devices?api-version=2022-07-31&%24top=1&%24skiptoken=%257B%2522token%2522%253A%2522%252BRID%253A%7EJWYqAOis7THQbBQAAAAAAg%253D%253D%2523RT%253A1%2523TRC%253A1%2523ISV%253A2%2523IEO%253A65551%2523QCF%253A4%2522%252C%2522range%2522%253A%257B%2522min%2522%253A%2522%2522%252C%2522max%2522%253A%252205C1D7F7591D44%2522%257D%257D"
243240
}
244241
```
245242

@@ -254,10 +251,10 @@ Use **$filter** to create expressions that filter the list of devices. The follo
254251
| -------------------- | ------ | --------------------------------------- |
255252
| Equals | eq | id eq 'device1' and scopes eq 'redmond' |
256253
| Not Equals | ne | Enabled ne true |
257-
| Less than or equals | le | indexof(displayName, 'device1') le -1 |
258-
| Less than | lt | indexof(displayName, 'device1') lt 0 |
259-
| Greater than or equals | ge | indexof(displayName, 'device1') ge 0 |
260-
| Greater than | gt | indexof(displayName, 'device1') gt 0 |
254+
| Less than or equals | le | contains(displayName, 'device1') le -1 |
255+
| Less than | lt | contains(displayName, 'device1') lt 0 |
256+
| Greater than or equals | ge | contains(displayName, 'device1') ge 0 |
257+
| Greater than | gt | contains(displayName, 'device1') gt 0 |
261258

262259
The following table shows the logic operators you can use in *$filter* expressions:
263260

@@ -280,16 +277,16 @@ Currently, *$filter* works with the following device fields:
280277

281278
**$filter supported functions:**
282279

283-
Currently, the only supported filter function for device lists is the `indexof` function:
280+
Currently, the only supported filter function for device lists is the `contains` function:
284281

285282
```
286-
$filter=indexof(displayName, 'device1') ge 0
283+
$filter=contains(displayName, 'device1') ge 0
287284
```
288285

289-
The following example shows how to retrieve all the devices where the display name has index the string `thermostat`:
286+
The following example shows how to retrieve all the devices where the display name contains the string `thermostat`:
290287

291288
```http
292-
GET https://{subdomain}.{baseDomain}/api/deviceTemplates?api-version=1.2-preview&$filter=index(displayName, 'thermostat')
289+
GET https://{subdomain}.{baseDomain}/api/deviceTemplates?api-version=2022-07-31&$filter=contains(displayName, 'thermostat')
293290
```
294291

295292
The response to this request looks like the following example:
@@ -331,7 +328,7 @@ $orderby=displayName desc
331328
The following example shows how to retrieve all the device templates where the result is sorted by `displayName` :
332329

333330
```http
334-
GET https://{subdomain}.{baseDomain}/api/devices?api-version=1.2-preview&$orderby=displayName
331+
GET https://{subdomain}.{baseDomain}/api/devices?api-version=2022-07-31&$orderby=displayName
335332
```
336333

337334
The response to this request looks like the following example:
@@ -366,7 +363,7 @@ You can also combine two or more filters.
366363
The following example shows how to retrieve the top 2 device where the display name contains the string `thermostat`.
367364

368365
```http
369-
GET https://{subdomain}.{baseDomain}/api/deviceTemplates?api-version=1.2-preview&$filter=contains(displayName, 'thermostat')&$top=2
366+
GET https://{subdomain}.{baseDomain}/api/deviceTemplates?api-version=2022-07-31&$filter=contains(displayName, 'thermostat')&$top=2
370367
```
371368

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

0 commit comments

Comments
 (0)