@@ -50,7 +50,7 @@ In the commands below, replace `<your_api_key>`, `<your_endpoint>`, and other ne
50
50
The following command creates an incident with a name and definition.
51
51
52
52
``` bash
53
- curl --location --request PATCH ' https://<endpoint>/contentsafety/text/incidents/<text-incident-name>?api-version=2024-02-15-preview ' \
53
+ curl --location --request PATCH ' https://<endpoint>/contentsafety/text/incidents/<text-incident-name>?api-version=2024-02-15-preview' \
54
54
--header ' Ocp-Apim-Subscription-Key: <your-content-safety-key>' \
55
55
--header ' Content-Type: application/json' \
56
56
--data ' {
@@ -88,7 +88,7 @@ The following command creates an incident with a name and definition.
88
88
import requests
89
89
import json
90
90
91
- url = " https://<endpoint>/contentsafety/text/incidents/<text-incident-name>?api-version=2024-02-15-preview "
91
+ url = " https://<endpoint>/contentsafety/text/incidents/<text-incident-name>?api-version=2024-02-15-preview"
92
92
93
93
payload = json.dumps({
94
94
" incidentName" : " <text-incident-name>" ,
@@ -112,7 +112,7 @@ Use the following command to add text examples to the incident.
112
112
#### [ cURL] ( #tab/curl )
113
113
114
114
``` bash
115
- curl --location ' https://<endpoint>/contentsafety/text/incidents/<text-incident-name>:addIncidentSamples?api-version=2024-02-15-preview ' \
115
+ curl --location ' https://<endpoint>/contentsafety/text/incidents/<text-incident-name>:addIncidentSamples?api-version=2024-02-15-preview' \
116
116
--header ' Ocp-Apim-Subscription-Key: <your-content-safety-key>' \
117
117
--header ' Content-Type: application/json' \
118
118
--data-raw ' {
@@ -130,7 +130,7 @@ curl --location 'https://<endpoint>/contentsafety/text/incidents/<text-incident-
130
130
import requests
131
131
import json
132
132
133
- url = " https://<endpoint>/contentsafety/text/incidents/<text-incident-name>:addIncidentSamples?api-version=2024-02-15-preview "
133
+ url = " https://<endpoint>/contentsafety/text/incidents/<text-incident-name>:addIncidentSamples?api-version=2024-02-15-preview"
134
134
135
135
payload = json.dumps({
136
136
" IncidentSamples" : [
@@ -195,7 +195,7 @@ Run the following command to analyze sample text content for the incident you ju
195
195
#### [ cURL] ( #tab/curl )
196
196
197
197
``` bash
198
- curl --location ' https://<endpoint>/contentsafety/text:detectIncidents?api-version=2024-02-15-preview ' \
198
+ curl --location ' https://<endpoint>/contentsafety/text:detectIncidents?api-version=2024-02-15-preview' \
199
199
--header ' Ocp-Apim-Subscription-Key: <your-content-safety-key>' \
200
200
--header ' Content-Type: application/json' \
201
201
--data ' {
@@ -212,7 +212,7 @@ curl --location 'https://<endpoint>/contentsafety/text:detectIncidents?api-versi
212
212
import requests
213
213
import json
214
214
215
- url = " https://<endpoint>/contentsafety/text:detectIncidents?api-version=2024-02-15-preview "
215
+ url = " https://<endpoint>/contentsafety/text:detectIncidents?api-version=2024-02-15-preview"
216
216
217
217
payload = json.dumps({
218
218
" text" : " <test-text>" ,
@@ -245,7 +245,7 @@ The following command creates an image incident:
245
245
246
246
247
247
``` bash
248
- curl --location --request PATCH ' https://<endpoint>/contentsafety/image/incidents/<image-incident-name>?api-version=2024-02-15-preview ' \
248
+ curl --location --request PATCH ' https://<endpoint>/contentsafety/image/incidents/<image-incident-name>?api-version=2024-02-15-preview' \
249
249
--header ' Ocp-Apim-Subscription-Key: <your-content-safety-key>' \
250
250
--header ' Content-Type: application/json' \
251
251
--data ' {
@@ -281,7 +281,7 @@ The following command creates an image incident:
281
281
import requests
282
282
import json
283
283
284
- url = " https://<endpoint>/contentsafety/image/incidents/<image-incident-name>?api-version=2024-02-15-preview "
284
+ url = " https://<endpoint>/contentsafety/image/incidents/<image-incident-name>?api-version=2024-02-15-preview"
285
285
286
286
payload = json.dumps({
287
287
" incidentName" : " <image-incident-name>"
@@ -306,7 +306,7 @@ Use the following command to add examples images to your incident. The image sam
306
306
#### [ cURL] ( #tab/curl )
307
307
308
308
``` bash
309
- curl --location ' https://<endpoint>/contentsafety/image/incidents/<image-incident-name>:addIncidentSamples?api-version=2024-02-15-preview ' \
309
+ curl --location ' https://<endpoint>/contentsafety/image/incidents/<image-incident-name>:addIncidentSamples?api-version=2024-02-15-preview' \
310
310
--header ' Ocp-Apim-Subscription-Key: <your-content-safety-key>' \
311
311
--header ' Content-Type: application/json' \
312
312
--data ' {
@@ -327,7 +327,7 @@ curl --location 'https://<endpoint>/contentsafety/image/incidents/<image-inciden
327
327
import requests
328
328
import json
329
329
330
- url = " https://<endpoint>/contentsafety/image/incidents/<image-incident-name>:addIncidentSamples?api-version=2024-02-15-preview "
330
+ url = " https://<endpoint>/contentsafety/image/incidents/<image-incident-name>:addIncidentSamples?api-version=2024-02-15-preview"
331
331
332
332
payload = json.dumps({
333
333
" IncidentSamples" : [
@@ -391,7 +391,7 @@ Use the following command to upload a sample image and test it against the incid
391
391
#### [ cURL] ( #tab/curl )
392
392
393
393
``` bash
394
- curl --location ' https://<endpoint>/contentsafety/image:detectIncidents?api-version=2024-02-15-preview ' \
394
+ curl --location ' https://<endpoint>/contentsafety/image:detectIncidents?api-version=2024-02-15-preview' \
395
395
--header ' Ocp-Apim-Subscription-Key: <your-content-safety-key>' \
396
396
--header ' Content-Type: application/json' \
397
397
--data ' {
@@ -412,7 +412,7 @@ curl --location 'https://<endpoint>/contentsafety/image:detectIncidents?api-vers
412
412
import requests
413
413
import json
414
414
415
- url = " https://<endpoint>/contentsafety/image:detectIncidents?api-version=2024-02-15-preview "
415
+ url = " https://<endpoint>/contentsafety/image:detectIncidents?api-version=2024-02-15-preview"
416
416
417
417
payload = json.dumps({
418
418
" image" : {
@@ -446,7 +446,7 @@ The following operations are useful for managing incidents and incident samples.
446
446
#### [ cURL] ( #tab/curl )
447
447
448
448
``` bash
449
- curl --location GET ' https://<endpoint>/contentsafety/text/incidents?api-version=2024-02-15-preview ' \
449
+ curl --location GET ' https://<endpoint>/contentsafety/text/incidents?api-version=2024-02-15-preview' \
450
450
--header ' Ocp-Apim-Subscription-Key: <your-content-safety-key>'
451
451
```
452
452
@@ -455,7 +455,7 @@ curl --location GET 'https://<endpoint>/contentsafety/text/incidents?api-version
455
455
``` python
456
456
import requests
457
457
458
- url = " https://<endpoint>/contentsafety/text/incidents?api-version=2024-02-15-preview "
458
+ url = " https://<endpoint>/contentsafety/text/incidents?api-version=2024-02-15-preview"
459
459
460
460
payload = {}
461
461
headers = {
@@ -473,7 +473,7 @@ print(response.text)
473
473
#### [ cURL] ( #tab/curl )
474
474
475
475
``` bash
476
- curl --location GET ' https://<endpoint>/contentsafety/text/incidents/<text-incident-name>?api-version=2024-02-15-preview ' \
476
+ curl --location GET ' https://<endpoint>/contentsafety/text/incidents/<text-incident-name>?api-version=2024-02-15-preview' \
477
477
--header ' Ocp-Apim-Subscription-Key: <your-content-safety-key>'
478
478
```
479
479
@@ -482,7 +482,7 @@ curl --location GET 'https://<endpoint>/contentsafety/text/incidents/<text-incid
482
482
``` python
483
483
import requests
484
484
485
- url = " https://<endpoint>/contentsafety/text/incidents/<text-incident-name>?api-version=2024-02-15-preview "
485
+ url = " https://<endpoint>/contentsafety/text/incidents/<text-incident-name>?api-version=2024-02-15-preview"
486
486
487
487
payload = {}
488
488
headers = {
@@ -500,7 +500,7 @@ print(response.text)
500
500
#### [ cURL] ( #tab/curl )
501
501
502
502
``` bash
503
- curl --location --request DELETE ' https://<endpoint>/contentsafety/text/incidents/<text-incident-name>?api-version=2024-02-15-preview ' \
503
+ curl --location --request DELETE ' https://<endpoint>/contentsafety/text/incidents/<text-incident-name>?api-version=2024-02-15-preview' \
504
504
--header ' Ocp-Apim-Subscription-Key: <your-content-safety-key>'
505
505
```
506
506
@@ -509,7 +509,7 @@ curl --location --request DELETE 'https://<endpoint>/contentsafety/text/incident
509
509
``` python
510
510
import requests
511
511
512
- url = " https://<endpoint>/contentsafety/text/incidents/<text-incident-name>?api-version=2024-02-15-preview "
512
+ url = " https://<endpoint>/contentsafety/text/incidents/<text-incident-name>?api-version=2024-02-15-preview"
513
513
514
514
payload = {}
515
515
headers = {
@@ -529,15 +529,15 @@ This command retrieves the unique IDs of all the samples associated with a given
529
529
#### [ cURL] ( #tab/curl )
530
530
531
531
``` bash
532
- curl --location GET ' https://<endpoint>/contentsafety/text/incidents/<text-incident-name>/incidentsamples?api-version=2024-02-15-preview ' \
532
+ curl --location GET ' https://<endpoint>/contentsafety/text/incidents/<text-incident-name>/incidentsamples?api-version=2024-02-15-preview' \
533
533
--header ' Ocp-Apim-Subscription-Key: <your-content-safety-key>'
534
534
```
535
535
#### [ Python] ( #tab/python )
536
536
537
537
``` python
538
538
import requests
539
539
540
- url = " https://<endpoint>/contentsafety/text/incidents/<text-incident-name>/incidentsamples?api-version=2024-02-15-preview "
540
+ url = " https://<endpoint>/contentsafety/text/incidents/<text-incident-name>/incidentsamples?api-version=2024-02-15-preview"
541
541
542
542
payload = {}
543
543
headers = {
@@ -557,15 +557,15 @@ Use an incident sample ID to look up details about the sample.
557
557
#### [ cURL] ( #tab/curl )
558
558
559
559
``` bash
560
- curl --location GET ' https://<endpoint>/contentsafety/text/incidents/<text-incident-name>/incidentsamples/<your-incident-sample-id>?api-version=2024-02-15-preview ' \
560
+ curl --location GET ' https://<endpoint>/contentsafety/text/incidents/<text-incident-name>/incidentsamples/<your-incident-sample-id>?api-version=2024-02-15-preview' \
561
561
--header ' Ocp-Apim-Subscription-Key: <your-content-safety-key>'
562
562
```
563
563
#### [ Python] ( #tab/python )
564
564
565
565
``` python
566
566
import requests
567
567
568
- url = " https://<endpoint>/contentsafety/text/incidents/<text-incident-name>/incidentsamples/<your-incident-sample-id>?api-version=2024-02-15-preview "
568
+ url = " https://<endpoint>/contentsafety/text/incidents/<text-incident-name>/incidentsamples/<your-incident-sample-id>?api-version=2024-02-15-preview"
569
569
570
570
payload = {}
571
571
headers = {
@@ -585,7 +585,7 @@ Use an incident sample ID to retrieve and delete that sample.
585
585
#### [ cURL] ( #tab/curl )
586
586
587
587
``` bash
588
- curl --location ' https://<endpoint>/contentsafety/text/incidents/<text-incident-name>:removeIncidentSamples?api-version=2024-02-15-preview ' \
588
+ curl --location ' https://<endpoint>/contentsafety/text/incidents/<text-incident-name>:removeIncidentSamples?api-version=2024-02-15-preview' \
589
589
--header ' Ocp-Apim-Subscription-Key: <your-content-safety-key>' \
590
590
--header ' Content-Type: application/json' \
591
591
--data ' {
@@ -600,7 +600,7 @@ curl --location 'https://<endpoint>/contentsafety/text/incidents/<text-incident-
600
600
import requests
601
601
import json
602
602
603
- url = " https://<endpoint>/contentsafety/text/incidents/<text-incident-name>:removeIncidentSamples?api-version=2024-02-15-preview "
603
+ url = " https://<endpoint>/contentsafety/text/incidents/<text-incident-name>:removeIncidentSamples?api-version=2024-02-15-preview"
604
604
605
605
payload = json.dumps({
606
606
" IncidentSampleIds" : [
@@ -625,7 +625,7 @@ print(response.text)
625
625
#### [ cURL] ( #tab/curl )
626
626
627
627
``` bash
628
- curl --location GET ' https://<endpoint>/contentsafety/image/incidents?api-version=2024-02-15-preview ' \
628
+ curl --location GET ' https://<endpoint>/contentsafety/image/incidents?api-version=2024-02-15-preview' \
629
629
--header ' Ocp-Apim-Subscription-Key: <your-content-safety-key>'
630
630
```
631
631
@@ -634,7 +634,7 @@ curl --location GET 'https://<endpoint>/contentsafety/image/incidents?api-versio
634
634
``` python
635
635
import requests
636
636
637
- url = " https://<endpoint>/contentsafety/image/incidents?api-version=2024-02-15-preview "
637
+ url = " https://<endpoint>/contentsafety/image/incidents?api-version=2024-02-15-preview"
638
638
639
639
payload = {}
640
640
headers = {
@@ -652,15 +652,15 @@ print(response.text)
652
652
#### [ cURL] ( #tab/curl )
653
653
654
654
``` bash
655
- curl --location GET ' https://<endpoint>/contentsafety/image/incidents/<image-incident-name>?api-version=2024-02-15-preview ' \
655
+ curl --location GET ' https://<endpoint>/contentsafety/image/incidents/<image-incident-name>?api-version=2024-02-15-preview' \
656
656
--header ' Ocp-Apim-Subscription-Key: <your-content-safety-key>'
657
657
```
658
658
#### [ Python] ( #tab/python )
659
659
660
660
``` python
661
661
import requests
662
662
663
- url = " https://<endpoint>/contentsafety/image/incidents/<image-incident-name>?api-version=2024-02-15-preview "
663
+ url = " https://<endpoint>/contentsafety/image/incidents/<image-incident-name>?api-version=2024-02-15-preview"
664
664
665
665
payload = {}
666
666
headers = {
@@ -678,7 +678,7 @@ print(response.text)
678
678
#### [ cURL] ( #tab/curl )
679
679
680
680
``` bash
681
- curl --location --request DELETE ' https://<endpoint>/contentsafety/image/incidents/<image-incident-name>?api-version=2024-02-15-preview ' \
681
+ curl --location --request DELETE ' https://<endpoint>/contentsafety/image/incidents/<image-incident-name>?api-version=2024-02-15-preview' \
682
682
--header ' Ocp-Apim-Subscription-Key: <your-content-safety-key>'
683
683
```
684
684
@@ -687,7 +687,7 @@ curl --location --request DELETE 'https://<endpoint>/contentsafety/image/inciden
687
687
``` python
688
688
import requests
689
689
690
- url = " https://<endpoint>/contentsafety/image/incidents/<image-incident-name>?api-version=2024-02-15-preview "
690
+ url = " https://<endpoint>/contentsafety/image/incidents/<image-incident-name>?api-version=2024-02-15-preview"
691
691
692
692
payload = {}
693
693
headers = {
@@ -708,15 +708,15 @@ This command retrieves the unique IDs of all the samples associated with a given
708
708
#### [ cURL] ( #tab/curl )
709
709
710
710
``` bash
711
- curl --location GET ' https://<endpoint>/contentsafety/image/incidents/<image-incident-name>/incidentsamples?api-version=2024-02-15-preview ' \
711
+ curl --location GET ' https://<endpoint>/contentsafety/image/incidents/<image-incident-name>/incidentsamples?api-version=2024-02-15-preview' \
712
712
--header ' Ocp-Apim-Subscription-Key: <your-content-safety-key>'
713
713
```
714
714
#### [ Python] ( #tab/python )
715
715
716
716
``` python
717
717
import requests
718
718
719
- url = " https://<endpoint>/contentsafety/image/incidents/<image-incident-name>/incidentsamples?api-version=2024-02-15-preview "
719
+ url = " https://<endpoint>/contentsafety/image/incidents/<image-incident-name>/incidentsamples?api-version=2024-02-15-preview"
720
720
721
721
payload = {}
722
722
headers = {
@@ -737,15 +737,15 @@ Use an incident sample ID to look up details about the sample.
737
737
#### [ cURL] ( #tab/curl )
738
738
739
739
``` bash
740
- curl --location GET ' https://<endpoint>/contentsafety/image/incidents/<image-incident-name>/incidentsamples/<your-incident-sample-id>?api-version=2024-02-15-preview ' \
740
+ curl --location GET ' https://<endpoint>/contentsafety/image/incidents/<image-incident-name>/incidentsamples/<your-incident-sample-id>?api-version=2024-02-15-preview' \
741
741
--header ' Ocp-Apim-Subscription-Key: <your-content-safety-key>'
742
742
```
743
743
#### [ Python] ( #tab/python )
744
744
745
745
``` python
746
746
import requests
747
747
748
- url = " https://<endpoint>/contentsafety/image/incidents/<image-incident-name>/incidentsamples/<your-incident-sample-id>?api-version=2024-02-15-preview "
748
+ url = " https://<endpoint>/contentsafety/image/incidents/<image-incident-name>/incidentsamples/<your-incident-sample-id>?api-version=2024-02-15-preview"
749
749
750
750
payload = {}
751
751
headers = {
@@ -766,7 +766,7 @@ Use an incident sample ID to retrieve and delete that sample.
766
766
#### [ cURL] ( #tab/curl )
767
767
768
768
``` bash
769
- curl --location ' https://<endpoint>/contentsafety/image/incidents/<image-incident-name>:removeIncidentSamples?api-version=2024-02-15-preview ' \
769
+ curl --location ' https://<endpoint>/contentsafety/image/incidents/<image-incident-name>:removeIncidentSamples?api-version=2024-02-15-preview' \
770
770
--header ' Ocp-Apim-Subscription-Key: <your-content-safety-key>' \
771
771
--header ' Content-Type: application/json' \
772
772
--data ' {
@@ -781,7 +781,7 @@ curl --location 'https://<endpoint>/contentsafety/image/incidents/<image-inciden
781
781
import requests
782
782
import json
783
783
784
- url = " https://<endpoint>/contentsafety/image/incidents/<image-incident-name>:removeIncidentSamples?api-version=2024-02-15-preview "
784
+ url = " https://<endpoint>/contentsafety/image/incidents/<image-incident-name>:removeIncidentSamples?api-version=2024-02-15-preview"
785
785
786
786
payload = json.dumps({
787
787
" IncidentSampleIds" : [
0 commit comments