@@ -152,9 +152,43 @@ print(response.text)
152
152
```
153
153
---
154
154
155
+ ### Deploy the incident
156
+
157
+
158
+ Use the following command to deploy the incident, making it available for the analysis of new content.
159
+
160
+ #### [ cURL] ( #tab/curl )
161
+
162
+ ``` shell
163
+ curl --location ' https://<endpoint>/contentsafety/text/incidents/<text-incident-name>:deploy?api-version=2024-02-15-preview' \
164
+ --header ' Ocp-Apim-Subscription-Key: <your-content-safety-key>' \
165
+ --header ' Content-Type: application/json'
166
+ ```
167
+
168
+ #### [ Python] ( #tab/python )
169
+
170
+ ``` python
171
+ import requests
172
+ import json
173
+
174
+ url = " https://<endpoint>/contentsafety/text/incidents/<text-incident-name>:deploy?api-version=2024-02-15-preview"
175
+
176
+ payload = {}
177
+ headers = {
178
+ ' Ocp-Apim-Subscription-Key' : ' <your-content-safety-key>' ,
179
+ ' Content-Type' : ' application/json'
180
+ }
181
+
182
+ response = requests.request(" POST" , url, headers = headers, data = payload)
183
+
184
+ print (response.text)
185
+
186
+ ```
187
+ ---
188
+
155
189
### Detect text incidents
156
190
157
- Run the following command to analyze sample text content for the incident you just defined .
191
+ Run the following command to analyze sample text content for the incident you just deployed .
158
192
159
193
#### [ cURL] ( #tab/curl )
160
194
@@ -313,9 +347,42 @@ print(response.text)
313
347
```
314
348
---
315
349
316
- ### Analyze image with incident response
350
+ ### Deploy the incident
351
+
352
+ Use the following command to deploy the incident, making it available for the analysis of new content.
353
+
354
+ #### [ cURL] ( #tab/curl )
355
+
356
+ ``` shell
357
+ curl --location ' https://<endpoint>/contentsafety/image/incidents/<image-incident-name>:deploy?api-version=2024-02-15-preview' \
358
+ --header ' Ocp-Apim-Subscription-Key: <your-content-safety-key>' \
359
+ --header ' Content-Type: application/json'
360
+ ```
361
+
362
+ #### [ Python] ( #tab/python )
363
+
364
+ ``` python
365
+ import requests
366
+ import json
367
+
368
+ url = " https://<endpoint>/contentsafety/image/incidents/<image-incident-name>:deploy?api-version=2024-02-15-preview"
369
+
370
+ payload = {}
371
+ headers = {
372
+ ' Ocp-Apim-Subscription-Key' : ' <your-content-safety-key>' ,
373
+ ' Content-Type' : ' application/json'
374
+ }
375
+
376
+ response = requests.request(" POST" , url, headers = headers, data = payload)
377
+
378
+ print (response.text)
379
+
380
+ ```
381
+ ---
382
+
383
+ ### Detect image incidents
317
384
318
- Use the following command to upload a sample image and test it against the incient you created . You can either use a URL pointing to the image in an Azure blob storage container, or you can add the image data as a Base64 string.
385
+ Use the following command to upload a sample image and test it against the incient you deployed . You can either use a URL pointing to the image in an Azure blob storage container, or you can add the image data as a Base64 string.
319
386
320
387
#### [ cURL] ( #tab/curl )
321
388
0 commit comments