Skip to content

Commit fbbeb97

Browse files
committed
more sanity
1 parent 1429d83 commit fbbeb97

9 files changed

+90
-81
lines changed

articles/defender-for-iot/organizations/api/management-alert-apis.md

Lines changed: 17 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -137,13 +137,13 @@ For more information, see [Sensor API version reference](../references-work-with
137137

138138
**API**:
139139

140-
```curl
140+
```rest
141141
curl -k -H "Authorization: <AUTH_TOKEN>" 'https://<>IP_ADDRESS>/external/v1/alerts?state=&zoneId=&fromTime=&toTime=&siteId=&sensor='
142142
```
143143

144144
**Example**:
145145

146-
```curl
146+
```rest
147147
curl -k -H "Authorization: 1234b734a9244d54ab8d40aedddcabcd" 'https://127.0.0.1/external/v1/alerts?state=unhandled&zoneId=1&fromTime=0&toTime=1594551777000&siteId=1&sensor=1'
148148
```
149149

@@ -214,15 +214,15 @@ Array of JSON objects that represent devices.
214214

215215

216216

217-
### Response example Successful
217+
### Response example: Successful
218218

219219
```rest
220220
{
221221
"content": "Alert update request finished successfully"
222222
}
223223
```
224224

225-
### Response example Unsuccessful
225+
### Response example: Unsuccessful
226226

227227
```rest
228228
{
@@ -236,13 +236,13 @@ Array of JSON objects that represent devices.
236236

237237
**APIs**:
238238

239-
```curl
239+
```rest
240240
curl -k -X PUT -d '{"action": "<ACTION>"}' -H "Authorization: <AUTH_TOKEN>" https://<IP_ADDRESS>/external/v1/alerts/<UUID>
241241
```
242242

243243
**Example**:
244244

245-
```curl
245+
```rest
246246
curl -k -X PUT -d '{"action": "handle"}' -H "Authorization: 1234b734a9244d54ab8d40aedddcabcd" https://127.0.0.1/external/v1/alerts/1-1594550943000
247247
```
248248
---
@@ -296,13 +296,13 @@ Creates a new maintenance window.
296296

297297
**API**:
298298

299-
```curl
299+
```rest
300300
curl -k -X POST -d '{"ticketId": "<TICKET_ID>",ttl": <TIME_TO_LIVE>,"engines": [<ENGINE1, ENGINE2...ENGINEn>],"sensorIds": [<SENSOR_ID1, SENSOR_ID2...SENSOR_IDn>],"subnets": [<SUBNET1, SUBNET2....SUBNETn>]}' -H "Authorization: <AUTH_TOKEN>" https://<IP address>/external/v1/maintenanceWindow
301301
```
302302

303303
**Example**:
304304

305-
```curl
305+
```rest
306306
curl -k -X POST -d '{"ticketId": "a5fe99c-d914-4bda-9332-307384fe40bf","ttl": "20","engines": ["ANOMALY"],"sensorIds": ["5","3"],"subnets": ["10.0.0.0/16"]}' -H "Authorization: 1234b734a9244d54ab8d40aedddcabcd" https://127.0.0.1/external/v1/maintenanceWindow
307307
```
308308
---
@@ -337,13 +337,13 @@ Closes an existing maintenance window.
337337

338338
**API**:
339339

340-
```curl
340+
```rest
341341
curl -k -X DELETE -d '{"ticketId": "<TICKET_ID>"}' -H "Authorization: <AUTH_TOKEN>" https://<IP address>/external/v1/maintenanceWindow
342342
```
343343

344344
**Example**:
345345

346-
```curl
346+
```rest
347347
curl -k -X DELETE -d '{"ticketId": "a5fe99c-d914-4bda-9332-307384fe40bf"}' -H "Authorization: 1234b734a9244d54ab8d40aedddcabcd" https://127.0.0.1/external/v1/maintenanceWindow
348348
```
349349

@@ -400,13 +400,13 @@ Array of JSON objects that represent maintenance window operations.
400400

401401
**API**:
402402

403-
```curl
403+
```rest
404404
curl -k -H "Authorization: <AUTH_TOKEN>" 'https://<IP_ADDRESS>/external/v1/maintenanceWindow?fromDate=&toDate=&ticketId=&tokenName='
405405
```
406406

407407
**Example**:
408408

409-
```curl
409+
```rest
410410
curl -k -H "Authorization: 1234b734a9244d54ab8d40aedddcabcd" 'https://127.0.0.1/external/v1/maintenanceWindow?fromDate=2020-01-01&toDate=2020-07-14&ticketId=a5fe99c-d914-4bda-9332-307384fe40bf&tokenName=a'
411411
```
412412

@@ -446,13 +446,13 @@ This method is useful when you want to set a longer duration than the currently
446446

447447
**API**:
448448

449-
```curl
449+
```rest
450450
curl -k -X PUT -d '{"ticketId": "<TICKET_ID>",ttl": "<TIME_TO_LIVE>"}' -H "Authorization: <AUTH_TOKEN>" https://<IP address>/external/v1/maintenanceWindow
451451
```
452452

453453
**Example**:
454454

455-
```curl
455+
```rest
456456
curl -k -X PUT -d '{"ticketId": "a5fe99c-d914-4bda-9332-307384fe40bf","ttl": "20"}' -H "Authorization: 1234b734a9244d54ab8d40aedddcabcd" https://127.0.0.1/external/v1/maintenanceWindow
457457
```
458458
---
@@ -525,15 +525,16 @@ Message string with the operation status details:
525525

526526
**APIs**
527527

528-
```curl
528+
```rest
529529
curl -k -H "Authorization: <AUTH_TOKEN>" 'https://<IP_ADDRESS>/external/v2/alerts/pcap/<ID>'
530530
```
531531

532532
***Example**:
533533

534-
```curl
534+
```rest
535535
curl -k -H "Authorization: 1234b734a9244d54ab8d40aedddcabcd" 'https://10.1.0.1/external/v2/alerts/pcap/1'
536536
```
537+
---
537538

538539
## Next steps
539540

articles/defender-for-iot/organizations/api/management-appliances-apis.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -107,13 +107,13 @@ A JSON array of appliance objects that represent sensor appliances.
107107

108108
**API**:
109109

110-
```curl
110+
```rest
111111
curl -k -H "Authorization: <AUTH_TOKEN>" 'https://<>IP_ADDRESS>/external/v1/appliances'
112112
```
113113

114114
**Example**:
115115

116-
```curl
116+
```rest
117117
curl -k -H "Authorization: 1234b734a9244d54ab8d40aedddcabcd" 'https://127.0.0.1/external/v1/appliances'
118118
```
119119
---

articles/defender-for-iot/organizations/api/management-auth-apis.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -76,13 +76,13 @@ response:
7676

7777
**API**:
7878

79-
```curl
79+
```rest
8080
curl -k -d '{"username": "<USER_NAME>","password": "<CURRENT_PASSWORD>","new_password": "<NEW_PASSWORD>"}' -H 'Content-Type: application/json' https://<IP_ADDRESS>/external/authentication/set_password
8181
```
8282

8383
**Example**:
8484

85-
```curl
85+
```rest
8686
curl -k -d '{"username": "myUser","password": "1234@abcd","new_password": "abcd@1234"}' -H 'Content-Type: application/json' https://127.0.0.1/external/authentication/set_password
8787
```
8888
---
@@ -167,13 +167,13 @@ response:
167167

168168
**API**:
169169

170-
```curl
170+
```rest
171171
curl -k -d '{"admin_username":"<ADMIN_USERNAME>","admin_password":"<ADMIN_PASSWORD>","username": "<USER_NAME>","new_password": "<NEW_PASSWORD>"}' -H 'Content-Type: application/json' https://<IP_ADDRESS>/external/authentication/set_password_by_admin
172172
```
173173

174174
**Example**:
175175

176-
```curl
176+
```rest
177177
curl -k -d '{"admin_user":"adminUser","admin_password": "1234@abcd","username": "myUser","new_password": "abcd@1234"}' -H 'Content-Type: application/json' https://127.0.0.1/external/authentication/set_password_by_admin
178178
```
179179
---
@@ -242,13 +242,13 @@ response:
242242

243243
**API**:
244244

245-
```curl
245+
```rest
246246
curl -k -X POST -H "Authorization: <AUTH_TOKEN>" -H "Content-Type: application/json" -d '{"username": <USER NAME>, "password": <PASSWORD>}' https://<IP_ADDRESS>/external/authentication/validation
247247
```
248248

249249
**Example**:
250250

251-
```curl
251+
```rest
252252
curl -k -X POST -H "Authorization: 1234b734a9244d54ab8d40aedddcabcd" -H "Content-Type: application/json" -d '{"username": "test", "password": "test"}' https://127.0.0.1/external/authentication/validation
253253
```
254254
---

articles/defender-for-iot/organizations/api/management-integration-apis.md

Lines changed: 31 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -146,20 +146,20 @@ This API returns data about all devices that were updated after the given timest
146146
}
147147
```
148148

149-
# [cURL](#tab/devices-curl)
149+
# [cURL command](#tab/devices-curl)
150150

151151

152152
**Type**: GET
153153

154154
**API**:
155155

156-
```curl
156+
```rest
157157
curl -k -H "Authorization: <Authorization token>" "https://<IP address>/external/v3/integration/devices/<Timestamp>"
158158
```
159159

160160
**Example**:
161161

162-
```curl
162+
```rest
163163
curl -k -H "Authorization: 1234b734a9244d54ab8d40aedddcabcd" "https://127.0.0.1/external/v3/integration/devices/<Timestamp>"
164164
```
165165

@@ -241,19 +241,19 @@ This API returns data about all device connections that were updated after the g
241241
},
242242
```
243243

244-
# [cURL](#tab/connections-curl)
244+
# [cURL command](#tab/connections-curl)
245245

246246
**Type**: GET
247247

248248
**API**:
249249

250-
```curl
250+
```rest
251251
curl -k -H "Authorization: <Authorization token>" "https://<IP address>/external/v3/integration/connections/1664781014000"
252252
```
253253

254254
**Example**:
255255

256-
```curl
256+
```rest
257257
curl -k -H "Authorization: 1234b734a9244d54ab8d40aedddcabcd" "https://127.0.0.1/external/v3/integration/connections/1664781014000"
258258
```
259259

@@ -403,19 +403,19 @@ This API returns data about a specific device per a given device ID.
403403
}]
404404
```
405405

406-
# [cURL](#tab/device-curl)
406+
# [cURL command](#tab/device-curl)
407407

408408
**Type**: GET
409409

410410
**API**:
411411

412-
```curl
412+
```rest
413413
curl -k -H "Authorization: <Authorization token>" "https://<IP address>/external/v3/integration/device/<device ID>"
414414
```
415415

416416
**Example**:
417417

418-
```curl
418+
```rest
419419
curl -k -H "Authorization: 1234b734a9244d54ab8d40aedddcabcd" "https://127.0.0.1/external/v3/integration/device/1"
420420
```
421421

@@ -463,19 +463,19 @@ This API returns a list of IDs of recently deleted devices, from the supplied ti
463463
}]
464464
```
465465

466-
# [cURL](#tab/deleteddevices-curl)
466+
# [cURL command](#tab/deleteddevices-curl)
467467

468468
**Type**: GET
469469

470470
**API**:
471471

472-
```curl
472+
```rest
473473
curl -k -H "Authorization: <Authorization token>" "https://<IP address>/external/v3/integration/deleteddevices/<timestamp>"
474474
```
475475

476476
**Example**:
477477

478-
```curl
478+
```rest
479479
curl -k -H "Authorization: 1234b734a9244d54ab8d40aedddcabcd" "https://127.0.0.1/external/v3/integration/deleteddevices/1664781014000"
480480
```
481481

@@ -508,7 +508,7 @@ An array of the following fields:
508508
|**u_id** | Long integer | Not nullable | Defines the internal sensor ID, to be used in the [devices (Create and update devices)](#devices-create-and-update-devices) API.|
509509
| **u_name** | String | Not nullable | Defines the sensor appliance's name. |
510510
| **u_interface_address** | String | Not nullable | Defines the sensor appliance's network address.|
511-
|**u_connection_state** |String |Not nullable | Defines the device's connection state with an on-premises management console, using one of the following values: <br><br>- **SYNCED**: Connection is successful. <br>- **OUT_OF_SYNC**: On-premises management console cannot process data received from the sensor. <br>- **TIME_DIFF_OFFSET**: Time drift detected. On-premises management console has been disconnected from the sensor. <br>**DISCONNECTED**: Sensor not communicating with management console. Check network connectivity. |
511+
|**u_connection_state** |String |Not nullable | Defines the device's connection state with an on-premises management console, using one of the following values: <br><br>- **SYNCED**: Connection is successful. <br>- `OUT_OF_SYNC`: On-premises management console cannot process data received from the sensor. <br>- `TIME_DIFF_OFFSET`: Time drift detected. On-premises management console has been disconnected from the sensor. <br>`DISCONNECTED`: Sensor not communicating with management console. Check network connectivity. |
512512
|**u_version** | String | Not nullable | A string representation of the sensor's software version. |
513513
| **u_alert_count** | Long integer | Not nullable | The current number of alerts triggered by the sensor. |
514514
| **u_device_count** | Long integer | Not nullable | The current number of devices detected by the sensor. |
@@ -518,7 +518,7 @@ An array of the following fields:
518518
| **u_uid** |String | Not nullable | Defines the sensor's globally unique identifier. |
519519
| **u_zone_id** | Long integer | Nullable | Define's the device's zone. |
520520
| **u_is_in_learning_mode** | Boolean | Not nullable | Determines whether the sensor is in learning mode. |
521-
| **u_remote_upgrade_stage** | String |Nullable |Defines a current stage in a version update process as one of the following: <br> - **UPLOADING** <br>- **PREPARE_TO_INSTALL** <br>- **STOPPING_PROCESSES** <br>- **BACKING_UP_DATA** <br>- **TAKING_SNAPSHOT** <br>- **UPDATING_CONFIGURATION** <br>- **UPDATING_DEPENDENCIES** <br>- **UPDATING_LIBRARIES** <br>- **PATCHING_DATABASES** <br>- **STARTING_PROCESSES** <br>- **VALIDATING_SYSTEM_SANITY** <br>- **VALIDATION_SUCCEEDED_REBOOTING** <br>- **SUCCESS** <br>- **FAILURE** <br>- **UPGRADE_STARTED** <br>- **STARTING_INSTALLATION** <br>- **INSTALLING_OPERATING_SYSTEM**|
521+
| **u_remote_upgrade_stage** | String |Nullable |Defines a current stage in a version update process as one of the following: <br> - `UPLOADING` <br>- `PREPARE_TO_INSTALL` <br>- `STOPPING_PROCESSES` <br>- `BACKING_UP_DATA` <br>- `TAKING_SNAPSHOT` <br>- `UPDATING_CONFIGURATION` <br>- `UPDATING_DEPENDENCIES` <br>- `UPDATING_LIBRARIES` <br>- `PATCHING_DATABASES` <br>- `STARTING_PROCESSES` <br>- `VALIDATING_SYSTEM_SANITY` <br>- `VALIDATION_SUCCEEDED_REBOOTING` <br>- `SUCCESS` <br>- `FAILURE` <br>- `UPGRADE_STARTED` <br>- `STARTING_INSTALLATION` <br>- `INSTALLING_OPERATING_SYSTEM`|
522522

523523
#### Response example
524524

@@ -543,19 +543,19 @@ An array of the following fields:
543543
];
544544
```
545545

546-
# [cURL](#tab/sensors-curl)
546+
# [cURL command](#tab/sensors-curl)
547547

548548
**Type**: GET
549549

550550
**API**:
551551

552-
```curl
552+
```rest
553553
curl -k -H "Authorization: <Authorization token>" "https://<IP Address>/external/v3/integration/sensors"
554554
```
555555

556556
**Example**:
557557

558-
```curl
558+
```rest
559559
curl -k -H "Authorization: 1234b734a9244d54ab8d40aedddcabcd" "https://127.0.0.1/external/v3/integration/sensors"
560560
```
561561

@@ -614,9 +614,9 @@ This API returns a list of active CVEs for all devices that were updated since t
614614
|**u_cves** | JSON array of CVEs | Not nullable | An array of [CVE details](#u_cves-fields) objects |
615615

616616
> [!NOTE]
617-
> If Defender for IoT can confidently identify the MAC address of one of its IP addresses, the MAC address is returned in the **u_mac_address_objects** field directly.
617+
> If Defender for IoT can confidently identify the MAC address of one of its IP addresses, the MAC address is returned in the `u_mac_address_objects` field directly.
618618
>
619-
> If Defender for IoT is not entirely confident about a MAC address, such as if the traffic has been routed via a router, the MAC address is returned in the **u_guessed_mac_address** field instead, as part of the JSON array of IP addresses.
619+
> If Defender for IoT is not entirely confident about a MAC address, such as if the traffic has been routed via a router, the MAC address is returned in the `u_guessed_mac_address` field instead, as part of the JSON array of IP addresses.
620620
621621
#### u_ip_address_objects fields
622622

@@ -638,7 +638,7 @@ This API returns a list of active CVEs for all devices that were updated since t
638638
|**u_address** |String | Not nullable | Address of the specific interface, with the specific firmware where the CVE was detected. |
639639
| **u_cve_id**| String| Not nullable | Defines the CVE ID |
640640
|**u_score** | String| Not nullable | Defines the CVE risk score |
641-
| **u_attack_vector**|String | Not nullable | Defines the attack vector as one of the following: **ADJACENT_NETWORK**, **LOCAL**, **NETWORK** |
641+
| **u_attack_vector**|String | Not nullable | Defines the attack vector as one of the following: `ADJACENT_NETWORK`, `LOCAL`, `NETWORK` |
642642
| **u_description**| String| Not nullable | Defines the CVE description|
643643

644644
#### Response example
@@ -717,11 +717,21 @@ This API returns a list of active CVEs for all devices that were updated since t
717717
}
718718
```
719719

720-
# [cURL](#tab/devicecves-curl)
720+
# [cURL command](#tab/devicecves-curl)
721+
722+
**Type**: GET
723+
724+
**API**:
721725

722726
```rest
723727
curl -k -H "Authorization: <Authorization token>" "https://<IP Address>/external/v3/integration/devicecves/<timestamp>"
724728
```
729+
730+
**Examplle**:
731+
732+
```rest
733+
curl -k -H "Authorization: 1234b734a9244d54ab8d40aedddcabcd" "https://127.0.0.1/external/v3/integration/devicecves/1664781014000"
734+
```
725735
---
726736

727737
## Next steps

articles/defender-for-iot/organizations/api/management-inventory-apis.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -225,13 +225,13 @@ Array of JSON objects that represent devices.
225225

226226
**APIs**:
227227

228-
```curl
228+
```rest
229229
curl -k -H "Authorization: <AUTH_TOKEN>" 'https://<IP_ADDRESS>/external/v1/devices?siteId=&zoneId=&sensorId=&uthorized='
230230
```
231231

232232
**Example**:
233233

234-
```curl
234+
```rest
235235
curl -k -H "Authorization: 1234b734a9244d54ab8d40aedddcabcd" 'https://127.0.0.1/external/v1/devices?siteId=1&zoneId=2&sensorId=5&authorized=true'
236236
```
237237

0 commit comments

Comments
 (0)