@@ -52,10 +52,7 @@ The following command creates an incident with a name and definition.
52
52
curl --location --request PATCH ' https://<endpoint>/contentsafety/text/incidents/<text-incident-name>?api-version=2024-02-15-preview' \
53
53
--header ' Ocp-Apim-Subscription-Key: <your-content-safety-key>' \
54
54
--header ' Content-Type: application/json' \
55
- --data ' {
56
- \"incidentName\": \"<text-incident-name>\",
57
- \"incidentDefinition\": \"string\"
58
- }'
55
+ --data ' { \"incidentName\": \"<test-incident>\", \"incidentDefinition\": \"<string>\"}'
59
56
```
60
57
61
58
#### [ Python] ( #tab/python )
@@ -115,9 +112,9 @@ curl --location 'https://<endpoint>/contentsafety/text/incidents/<text-incident-
115
112
--header ' Ocp-Apim-Subscription-Key: <your-content-safety-key>' \
116
113
--header ' Content-Type: application/json' \
117
114
--data-raw ' {
118
- "IncidentSamples": [
119
- { "text": "<text-example-1>"},
120
- { "text": "<text-example-2>"},
115
+ \ "IncidentSamples\ ": [
116
+ { \ "text\ ": \ "<text-example-1>\ "},
117
+ { \ "text\ ": \ "<text-example-2>\ "},
121
118
...
122
119
]
123
120
}'
@@ -198,9 +195,9 @@ curl --location 'https://<endpoint>/contentsafety/text:detectIncidents?api-versi
198
195
--header ' Ocp-Apim-Subscription-Key: <your-content-safety-key>' \
199
196
--header ' Content-Type: application/json' \
200
197
--data ' {
201
- "text": "<test-text>",
202
- "incidentNames": [
203
- "<text-incident-name>"
198
+ \ "text\ ": \ "<test-text>\ ",
199
+ \ "incidentNames\ ": [
200
+ \ "<text-incident-name>\ "
204
201
]
205
202
}'
206
203
```
@@ -309,11 +306,11 @@ curl --location 'https://<endpoint>/contentsafety/image/incidents/<image-inciden
309
306
--header ' Ocp-Apim-Subscription-Key: <your-content-safety-key>' \
310
307
--header ' Content-Type: application/json' \
311
308
--data ' {
312
- "IncidentSamples": [
309
+ \ "IncidentSamples\ ": [
313
310
{
314
- "image": {
315
- "content": "<base64-data>",
316
- "bloburl": "<your-blob-storage-url>.png"
311
+ \ "image\ ": {
312
+ \ "content\ ": \ "<base64-data>\ ",
313
+ \ "bloburl\ ": \ "<your-blob-storage-url>.png\ "
317
314
}
318
315
}
319
316
]
@@ -394,12 +391,12 @@ curl --location 'https://<endpoint>/contentsafety/image:detectIncidents?api-vers
394
391
--header ' Ocp-Apim-Subscription-Key: <your-content-safety-key>' \
395
392
--header ' Content-Type: application/json' \
396
393
--data ' {
397
- "image": {
398
- "url": "<your-blob-storage-url>/image.png",
394
+ \ "image\ ": {
395
+ \ "url\ ": \ "<your-blob-storage-url>/image.png\ ",
399
396
"content": "<base64-data>"
400
397
},
401
- "incidentNames": [
402
- "<image-incident-name>"
398
+ \ "incidentNames\ ": [
399
+ \ "<image-incident-name>\ "
403
400
]
404
401
}
405
402
}'
@@ -588,8 +585,8 @@ curl --location 'https://<endpoint>/contentsafety/text/incidents/<text-incident-
588
585
--header ' Ocp-Apim-Subscription-Key: <your-content-safety-key>' \
589
586
--header ' Content-Type: application/json' \
590
587
--data ' {
591
- "IncidentSampleIds": [
592
- "<your-incident-sample-id>"
588
+ \ "IncidentSampleIds\ ": [
589
+ \ "<your-incident-sample-id>\ "
593
590
]
594
591
}'
595
592
```
@@ -769,8 +766,8 @@ curl --location 'https://<endpoint>/contentsafety/image/incidents/<image-inciden
769
766
--header ' Ocp-Apim-Subscription-Key: <your-content-safety-key>' \
770
767
--header ' Content-Type: application/json' \
771
768
--data ' {
772
- "IncidentSampleIds": [
773
- "<your-incident-sample-id>"
769
+ \ "IncidentSampleIds\ ": [
770
+ \ "<your-incident-sample-id>\ "
774
771
]
775
772
}'
776
773
```
0 commit comments