-
Notifications
You must be signed in to change notification settings - Fork 5.1k
/
Face.json
9416 lines (9416 loc) · 375 KB
/
Face.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
{
"swagger": "2.0",
"info": {
"title": "Azure AI Face API",
"version": "v1.1-preview.1",
"x-typespec-generated": [
{
"emitter": "@azure-tools/typespec-autorest"
}
]
},
"schemes": [
"https"
],
"x-ms-parameterized-host": {
"hostTemplate": "{endpoint}/face/{apiVersion}",
"useSchemePrefix": false,
"parameters": [
{
"name": "endpoint",
"in": "path",
"description": "Supported Cognitive Services endpoints (protocol and hostname, for example:\nhttps://{resource-name}.cognitiveservices.azure.com).",
"required": true,
"type": "string",
"format": "uri",
"x-ms-skip-url-encoding": true
},
{
"name": "apiVersion",
"in": "path",
"description": "API Version",
"required": true,
"type": "string",
"enum": [
"v1.1-preview.1"
],
"x-ms-enum": {
"name": "Versions",
"modelAsString": true,
"values": [
{
"name": "v1_1_preview_1",
"value": "v1.1-preview.1",
"description": "v1.1-preview.1"
}
]
}
}
]
},
"produces": [
"application/json"
],
"consumes": [
"application/json"
],
"security": [
{
"KeyAuth": []
},
{
"AADToken": [
"https://cognitiveservices.azure.com/.default"
]
}
],
"securityDefinitions": {
"AADToken": {
"type": "oauth2",
"description": "The Azure Active Directory OAuth2 Flow",
"flow": "accessCode",
"authorizationUrl": "https://api.example.com/oauth2/authorize",
"scopes": {
"https://cognitiveservices.azure.com/.default": ""
},
"tokenUrl": "https://api.example.com/oauth2/token"
},
"KeyAuth": {
"type": "apiKey",
"description": "The secret key for your Azure AI Face subscription.",
"name": "Ocp-Apim-Subscription-Key",
"in": "header"
}
},
"tags": [],
"paths": {
"/detect": {
"post": {
"operationId": "FaceDetectionOperations_DetectFromUrl",
"summary": "Detect human faces in an image, return face rectangles, and optionally with faceIds, landmarks, and attributes.",
"description": "> [!IMPORTANT]\n> To mitigate potential misuse that can subject people to stereotyping, discrimination, or unfair denial of services, we are retiring Face API attributes that predict emotion, gender, age, smile, facial hair, hair, and makeup. Read more about this decision https://azure.microsoft.com/en-us/blog/responsible-ai-investments-and-safeguards-for-facial-recognition/.\n\n*\n * No image will be stored. Only the extracted face feature(s) will be stored on server. The faceId is an identifier of the face feature and will be used in \"Identify\", \"Verify\", and \"Find Similar\". The stored face features will expire and be deleted at the time specified by faceIdTimeToLive after the original detection call.\n * Optional parameters include faceId, landmarks, and attributes. Attributes include headPose, glasses, occlusion, accessories, blur, exposure, noise, mask, and qualityForRecognition. Some of the results returned for specific attributes may not be highly accurate.\n * JPEG, PNG, GIF (the first frame), and BMP format are supported. The allowed image file size is from 1KB to 6MB.\n * The minimum detectable face size is 36x36 pixels in an image no larger than 1920x1080 pixels. Images with dimensions higher than 1920x1080 pixels will need a proportionally larger minimum face size.\n * Up to 100 faces can be returned for an image. Faces are ranked by face rectangle size from large to small.\n * For optimal results when querying \"Identify\", \"Verify\", and \"Find Similar\" ('returnFaceId' is true), please use faces that are: frontal, clear, and with a minimum size of 200x200 pixels (100 pixels between eyes).\n * Different 'detectionModel' values can be provided. To use and compare different detection models, please refer to https://learn.microsoft.com/en-us/azure/ai-services/computer-vision/how-to/specify-detection-model\n * 'detection_02': Face attributes and landmarks are disabled if you choose this detection model.\n * 'detection_03': Face attributes (mask and headPose only) and landmarks are supported if you choose this detection model.\n * Different 'recognitionModel' values are provided. If follow-up operations like \"Verify\", \"Identify\", \"Find Similar\" are needed, please specify the recognition model with 'recognitionModel' parameter. The default value for 'recognitionModel' is 'recognition_01', if latest model needed, please explicitly specify the model you need in this parameter. Once specified, the detected faceIds will be associated with the specified recognition model. More details, please refer to https://learn.microsoft.com/en-us/azure/ai-services/computer-vision/how-to/specify-recognition-model.",
"parameters": [
{
"name": "detectionModel",
"in": "query",
"description": "The 'detectionModel' associated with the detected faceIds. Supported 'detectionModel' values include 'detection_01', 'detection_02' and 'detection_03'. The default value is 'detection_01'.",
"required": false,
"type": "string",
"default": "detection_01",
"enum": [
"detection_01",
"detection_02",
"detection_03"
],
"x-ms-enum": {
"name": "DetectionModel",
"modelAsString": true,
"values": [
{
"name": "detection_01",
"value": "detection_01",
"description": "The default detection model. Recommend for near frontal face detection. For scenarios with exceptionally large angle (head-pose) faces, occluded faces or wrong image orientation, the faces in such cases may not be detected."
},
{
"name": "detection_02",
"value": "detection_02",
"description": "Detection model released in 2019 May with improved accuracy especially on small, side and blurry faces."
},
{
"name": "detection_03",
"value": "detection_03",
"description": "Detection model released in 2021 February with improved accuracy especially on small faces."
}
]
}
},
{
"name": "recognitionModel",
"in": "query",
"description": "The 'recognitionModel' associated with the detected faceIds. Supported 'recognitionModel' values include 'recognition_01', 'recognition_02', 'recognition_03' or 'recognition_04'. The default value is 'recognition_01'. 'recognition_04' is recommended since its accuracy is improved on faces wearing masks compared with 'recognition_03', and its overall accuracy is improved compared with 'recognition_01' and 'recognition_02'.",
"required": false,
"type": "string",
"default": "recognition_01",
"enum": [
"recognition_01",
"recognition_02",
"recognition_03",
"recognition_04"
],
"x-ms-enum": {
"name": "RecognitionModel",
"modelAsString": true,
"values": [
{
"name": "recognition_01",
"value": "recognition_01",
"description": "The default recognition model for \"Detect\". All those faceIds created before 2019 March are bonded with this recognition model."
},
{
"name": "recognition_02",
"value": "recognition_02",
"description": "Recognition model released in 2019 March."
},
{
"name": "recognition_03",
"value": "recognition_03",
"description": "Recognition model released in 2020 May."
},
{
"name": "recognition_04",
"value": "recognition_04",
"description": "Recognition model released in 2021 February. It's recommended to use this recognition model for better recognition accuracy."
}
]
}
},
{
"name": "returnFaceId",
"in": "query",
"description": "Return faceIds of the detected faces or not. The default value is true.",
"required": false,
"type": "boolean",
"default": true
},
{
"name": "returnFaceAttributes",
"in": "query",
"description": "Analyze and return the one or more specified face attributes in the comma-separated string like 'returnFaceAttributes=headPose,glasses'. Face attribute analysis has additional computational and time cost.",
"required": false,
"type": "array",
"items": {
"type": "string",
"enum": [
"headPose",
"glasses",
"occlusion",
"accessories",
"blur",
"exposure",
"noise",
"mask",
"qualityForRecognition",
"age",
"smile",
"facialHair",
"hair"
],
"x-ms-enum": {
"name": "FaceAttributeType",
"modelAsString": true,
"values": [
{
"name": "headPose",
"value": "headPose",
"description": "3-D roll/yaw/pitch angles for face direction."
},
{
"name": "glasses",
"value": "glasses",
"description": "Glasses type. Values include 'NoGlasses', 'ReadingGlasses', 'Sunglasses', 'SwimmingGoggles'."
},
{
"name": "occlusion",
"value": "occlusion",
"description": "Whether each facial area is occluded, including forehead, eyes and mouth."
},
{
"name": "accessories",
"value": "accessories",
"description": "Accessories around face, including 'headwear', 'glasses' and 'mask'. Empty array means no accessories detected. Note this is after a face is detected. Large mask could result in no face to be detected."
},
{
"name": "blur",
"value": "blur",
"description": "Face is blurry or not. Level returns 'Low', 'Medium' or 'High'. Value returns a number between [0,1], the larger the blurrier."
},
{
"name": "exposure",
"value": "exposure",
"description": "Face exposure level. Level returns 'GoodExposure', 'OverExposure' or 'UnderExposure'."
},
{
"name": "noise",
"value": "noise",
"description": "Noise level of face pixels. Level returns 'Low', 'Medium' and 'High'. Value returns a number between [0,1], the larger the noisier"
},
{
"name": "mask",
"value": "mask",
"description": "Whether each face is wearing a mask. Mask type returns 'noMask', 'faceMask', 'otherMaskOrOcclusion', or 'uncertain'. Value returns a boolean 'noseAndMouthCovered' indicating whether nose and mouth are covered."
},
{
"name": "qualityForRecognition",
"value": "qualityForRecognition",
"description": "The overall image quality regarding whether the image being used in the detection is of sufficient quality to attempt face recognition on. The value is an informal rating of low, medium, or high. Only 'high' quality images are recommended for person enrollment and quality at or above 'medium' is recommended for identification scenarios. The attribute is only available when using any combinations of detection models detection_01 or detection_03, and recognition models recognition_03 or recognition_04."
},
{
"name": "age",
"value": "age",
"description": "Age in years."
},
{
"name": "smile",
"value": "smile",
"description": "Smile intensity, a number between [0,1]."
},
{
"name": "facialHair",
"value": "facialHair",
"description": "Properties describing facial hair attributes."
},
{
"name": "hair",
"value": "hair",
"description": "Properties describing hair attributes."
}
]
}
},
"collectionFormat": "csv"
},
{
"name": "returnFaceLandmarks",
"in": "query",
"description": "Return face landmarks of the detected faces or not. The default value is false.",
"required": false,
"type": "boolean",
"default": false
},
{
"name": "returnRecognitionModel",
"in": "query",
"description": "Return 'recognitionModel' or not. The default value is false. This is only applicable when returnFaceId = true.",
"required": false,
"type": "boolean",
"default": false
},
{
"name": "faceIdTimeToLive",
"in": "query",
"description": "The number of seconds for the face ID being cached. Supported range from 60 seconds up to 86400 seconds. The default value is 86400 (24 hours).",
"required": false,
"type": "integer",
"format": "int32",
"default": 86400,
"minimum": 60,
"maximum": 86400
},
{
"name": "body",
"in": "body",
"required": true,
"schema": {
"type": "object",
"properties": {
"url": {
"type": "string",
"format": "uri",
"description": "URL of input image."
}
},
"required": [
"url"
]
}
}
],
"responses": {
"200": {
"description": "A successful call returns an array of face entries ranked by face rectangle size in descending order. An empty response indicates no faces detected.",
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/FaceDetectionResult"
},
"x-ms-identifiers": []
}
},
"default": {
"description": "An unexpected error response.",
"schema": {
"$ref": "#/definitions/FaceErrorResponse"
},
"headers": {
"x-ms-error-code": {
"type": "string",
"description": "String error code indicating what went wrong."
}
}
}
},
"x-ms-examples": {
"Detect with Image URL": {
"$ref": "./examples/DetectFromUrl.json"
}
}
}
},
"/detectLiveness/singleModal/sessions": {
"get": {
"operationId": "LivenessSessionOperations_GetLivenessSessions",
"summary": "Lists sessions for /detectLiveness/SingleModal.",
"description": "List sessions from the last sessionId greater than the 'start'.\n\nThe result should be ordered by sessionId in ascending order.",
"parameters": [
{
"name": "start",
"in": "query",
"description": "List resources greater than the \"start\". It contains no more than 64 characters. Default is empty.",
"required": false,
"type": "string"
},
{
"name": "top",
"in": "query",
"description": "The number of items to list, ranging in [1, 1000]. Default is 1000.",
"required": false,
"type": "integer",
"format": "int32",
"default": 1000,
"minimum": 1,
"maximum": 1000
}
],
"responses": {
"200": {
"description": "The request has succeeded.",
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/LivenessSessionItem"
}
}
},
"default": {
"description": "An unexpected error response.",
"schema": {
"$ref": "#/definitions/FaceErrorResponse"
},
"headers": {
"x-ms-error-code": {
"type": "string",
"description": "String error code indicating what went wrong."
}
}
}
},
"x-ms-examples": {
"Get LivenessSessions": {
"$ref": "./examples/LivenessSessionOperations_GetLivenessSessions.json"
}
}
},
"post": {
"operationId": "LivenessSessionOperations_CreateLivenessSession",
"summary": "Create a new detect liveness session.",
"description": "A session is best for client device scenarios where developers want to authorize a client device to perform only a liveness detection without granting full access to their resource. Created sessions have a limited life span and only authorize clients to perform the desired action before access is expired.\n\nPermissions includes...\n>\n*\n * Ability to call /detectLiveness/singleModal for up to 3 retries.\n * A token lifetime of 10 minutes.\n\n> [!NOTE]\n> Client access can be revoked by deleting the session using the Delete Liveness Session operation. To retrieve a result, use the Get Liveness Session. To audit the individual requests that a client has made to your resource, use the List Liveness Session Audit Entries.",
"parameters": [
{
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/CreateLivenessSessionContent"
}
}
],
"responses": {
"200": {
"description": "A successful call create a session for a client device and provide an authorization token for use by the client application for a limited purpose and time.",
"schema": {
"$ref": "#/definitions/CreateLivenessSessionResult"
}
},
"default": {
"description": "An unexpected error response.",
"schema": {
"$ref": "#/definitions/FaceErrorResponse"
},
"headers": {
"x-ms-error-code": {
"type": "string",
"description": "String error code indicating what went wrong."
}
}
}
},
"x-ms-examples": {
"Create Liveness Session": {
"$ref": "./examples/LivenessSessionOperations_CreateLivenessSession.json"
}
}
}
},
"/detectLiveness/singleModal/sessions/{sessionId}": {
"get": {
"operationId": "LivenessSessionOperations_GetLivenessSessionResult",
"description": "Get session result of detectLiveness/singleModal call.",
"parameters": [
{
"name": "sessionId",
"in": "path",
"description": "The unique ID to reference this session.",
"required": true,
"type": "string"
}
],
"responses": {
"200": {
"description": "The request has succeeded.",
"schema": {
"$ref": "#/definitions/LivenessSession"
}
},
"default": {
"description": "An unexpected error response.",
"schema": {
"$ref": "#/definitions/FaceErrorResponse"
},
"headers": {
"x-ms-error-code": {
"type": "string",
"description": "String error code indicating what went wrong."
}
}
}
},
"x-ms-examples": {
"Get LivenessSession Result": {
"$ref": "./examples/LivenessSessionOperations_GetLivenessSessionResult.json"
}
}
},
"delete": {
"operationId": "LivenessSessionOperations_DeleteLivenessSession",
"summary": "Delete all session related information for matching the specified session id.",
"description": "> [!NOTE]\n> Deleting a session deactivates the Session Auth Token by blocking future API calls made with that Auth Token. While this can be used to remove any access for that token, those requests will still count towards overall resource rate limits. It's best to leverage TokenTTL to limit length of tokens in the case that it is misused.",
"parameters": [
{
"name": "sessionId",
"in": "path",
"description": "The unique ID to reference this session.",
"required": true,
"type": "string"
}
],
"responses": {
"200": {
"description": "The request has succeeded."
},
"default": {
"description": "An unexpected error response.",
"schema": {
"$ref": "#/definitions/FaceErrorResponse"
},
"headers": {
"x-ms-error-code": {
"type": "string",
"description": "String error code indicating what went wrong."
}
}
}
},
"x-ms-examples": {
"Delete Liveness Session": {
"$ref": "./examples/LivenessSessionOperations_DeleteLivenessSession.json"
}
}
}
},
"/detectLiveness/singleModal/sessions/{sessionId}/audit": {
"get": {
"operationId": "LivenessSessionOperations_GetLivenessSessionAuditEntries",
"description": "Gets session requests and response body for the session.",
"parameters": [
{
"name": "sessionId",
"in": "path",
"description": "The unique ID to reference this session.",
"required": true,
"type": "string"
},
{
"name": "start",
"in": "query",
"description": "List resources greater than the \"start\". It contains no more than 64 characters. Default is empty.",
"required": false,
"type": "string"
},
{
"name": "top",
"in": "query",
"description": "The number of items to list, ranging in [1, 1000]. Default is 1000.",
"required": false,
"type": "integer",
"format": "int32",
"default": 1000,
"minimum": 1,
"maximum": 1000
}
],
"responses": {
"200": {
"description": "The request has succeeded.",
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/LivenessSessionAuditEntry"
}
}
},
"default": {
"description": "An unexpected error response.",
"schema": {
"$ref": "#/definitions/FaceErrorResponse"
},
"headers": {
"x-ms-error-code": {
"type": "string",
"description": "String error code indicating what went wrong."
}
}
}
},
"x-ms-examples": {
"Get LivenessSession Audit Entries": {
"$ref": "./examples/LivenessSessionOperations_GetLivenessSessionAuditEntries.json"
}
}
}
},
"/detectLivenessWithVerify/singleModal/sessions": {
"get": {
"operationId": "LivenessSessionOperations_GetLivenessWithVerifySessions",
"summary": "Lists sessions for /detectLivenessWithVerify/SingleModal.",
"description": "List sessions from the last sessionId greater than the \"start\".\n\nThe result should be ordered by sessionId in ascending order.",
"parameters": [
{
"name": "start",
"in": "query",
"description": "List resources greater than the \"start\". It contains no more than 64 characters. Default is empty.",
"required": false,
"type": "string"
},
{
"name": "top",
"in": "query",
"description": "The number of items to list, ranging in [1, 1000]. Default is 1000.",
"required": false,
"type": "integer",
"format": "int32",
"default": 1000,
"minimum": 1,
"maximum": 1000
}
],
"responses": {
"200": {
"description": "The request has succeeded.",
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/LivenessSessionItem"
}
}
},
"default": {
"description": "An unexpected error response.",
"schema": {
"$ref": "#/definitions/FaceErrorResponse"
},
"headers": {
"x-ms-error-code": {
"type": "string",
"description": "String error code indicating what went wrong."
}
}
}
},
"x-ms-examples": {
"Get LivenessWithVerify Sessions": {
"$ref": "./examples/LivenessSessionOperations_GetLivenessWithVerifySessions.json"
}
}
},
"post": {
"operationId": "LivenessSessionOperations_CreateLivenessWithVerifySessionWithVerifyImage",
"summary": "Create a new liveness session with verify. Provide the verify image during session creation.",
"description": "A session is best for client device scenarios where developers want to authorize a client device to perform only a liveness detection without granting full access to their resource. Created sessions have a limited life span and only authorize clients to perform the desired action before access is expired.\n\nPermissions includes...\n>\n*\n * Ability to call /detectLivenessWithVerify/singleModal for up to 3 retries.\n * A token lifetime of 10 minutes.\n\n> [!NOTE]\n>\n> *\n> * Client access can be revoked by deleting the session using the Delete Liveness With Verify Session operation.\n> * To retrieve a result, use the Get Liveness With Verify Session.\n> * To audit the individual requests that a client has made to your resource, use the List Liveness With Verify Session Audit Entries.\n\nRecommended Option: VerifyImage is provided during session creation.",
"consumes": [
"multipart/form-data"
],
"parameters": [
{
"$ref": "#/parameters/CreateLivenessWithVerifySessionContent.Parameters"
},
{
"$ref": "#/parameters/CreateLivenessWithVerifySessionContent.VerifyImage"
}
],
"responses": {
"200": {
"description": "A successful call create a session for a client device and provide an authorization token for use by the client application for a limited purpose and time.",
"schema": {
"$ref": "#/definitions/CreateLivenessWithVerifySessionResult"
}
},
"default": {
"description": "An unexpected error response.",
"schema": {
"$ref": "#/definitions/FaceErrorResponse"
},
"headers": {
"x-ms-error-code": {
"type": "string",
"description": "String error code indicating what went wrong."
}
}
}
},
"x-ms-examples": {
"Create LivenessWithVerify Session with VerifyImage": {
"$ref": "./examples/LivenessSessionOperations_CreateLivenessWithVerifySessionWithVerifyImage.json"
}
}
}
},
"/detectLivenessWithVerify/singleModal/sessions/{sessionId}": {
"get": {
"operationId": "LivenessSessionOperations_GetLivenessWithVerifySessionResult",
"description": "Get session result of detectLivenessWithVerify/singleModal call.",
"parameters": [
{
"name": "sessionId",
"in": "path",
"description": "The unique ID to reference this session.",
"required": true,
"type": "string"
}
],
"responses": {
"200": {
"description": "The request has succeeded.",
"schema": {
"$ref": "#/definitions/LivenessWithVerifySession"
}
},
"default": {
"description": "An unexpected error response.",
"schema": {
"$ref": "#/definitions/FaceErrorResponse"
},
"headers": {
"x-ms-error-code": {
"type": "string",
"description": "String error code indicating what went wrong."
}
}
}
},
"x-ms-examples": {
"Get LivenessWithVerify Session Result": {
"$ref": "./examples/LivenessSessionOperations_GetLivenessWithVerifySessionResult.json"
}
}
},
"delete": {
"operationId": "LivenessSessionOperations_DeleteLivenessWithVerifySession",
"summary": "Delete all session related information for matching the specified session id.",
"description": "> [!NOTE]\n> Deleting a session deactivates the Session Auth Token by blocking future API calls made with that Auth Token. While this can be used to remove any access for that token, those requests will still count towards overall resource rate limits. It's best to leverage TokenTTL to limit length of tokens in the case that it is misused.",
"parameters": [
{
"name": "sessionId",
"in": "path",
"description": "The unique ID to reference this session.",
"required": true,
"type": "string"
}
],
"responses": {
"200": {
"description": "The request has succeeded."
},
"default": {
"description": "An unexpected error response.",
"schema": {
"$ref": "#/definitions/FaceErrorResponse"
},
"headers": {
"x-ms-error-code": {
"type": "string",
"description": "String error code indicating what went wrong."
}
}
}
},
"x-ms-examples": {
"Delete LivenessWithVerify Session": {
"$ref": "./examples/LivenessSessionOperations_DeleteLivenessWithVerifySession.json"
}
}
}
},
"/detectLivenessWithVerify/singleModal/sessions/{sessionId}/audit": {
"get": {
"operationId": "LivenessSessionOperations_GetLivenessWithVerifySessionAuditEntries",
"description": "Gets session requests and response body for the session.",
"parameters": [
{
"name": "sessionId",
"in": "path",
"description": "The unique ID to reference this session.",
"required": true,
"type": "string"
},
{
"name": "start",
"in": "query",
"description": "List resources greater than the \"start\". It contains no more than 64 characters. Default is empty.",
"required": false,
"type": "string"
},
{
"name": "top",
"in": "query",
"description": "The number of items to list, ranging in [1, 1000]. Default is 1000.",
"required": false,
"type": "integer",
"format": "int32",
"default": 1000,
"minimum": 1,
"maximum": 1000
}
],
"responses": {
"200": {
"description": "The request has succeeded.",
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/LivenessSessionAuditEntry"
}
}
},
"default": {
"description": "An unexpected error response.",
"schema": {
"$ref": "#/definitions/FaceErrorResponse"
},
"headers": {
"x-ms-error-code": {
"type": "string",
"description": "String error code indicating what went wrong."
}
}
}
},
"x-ms-examples": {
"Get LivenessWithVerify Session Audit Entries": {
"$ref": "./examples/LivenessSessionOperations_GetLivenessWithVerifySessionAuditEntries.json"
}
}
}
},
"/dynamicpersongroups": {
"get": {
"operationId": "PersonDirectoryOperations_GetDynamicPersonGroups",
"summary": "List all existing Dynamic Person Groups by dynamicPersonGroupId along with name and userData.",
"description": "Dynamic Person Groups are stored in alphabetical order of dynamicPersonGroupId.\n>\n*\n * \"start\" parameter (string, optional) specifies an ID value from which returned entries will have larger IDs based on string comparison. Setting \"start\" to an empty value indicates that entries should be returned starting from the first item.\n * \"top\" parameter (int, optional) determines the maximum number of entries to be returned, with a limit of up to 1000 entries per call. To retrieve additional entries beyond this limit, specify \"start\" with the personId of the last entry returned in the current call.\n\n> [!TIP]\n>\n> * For example, there are total 5 items with their IDs: \"itemId1\", ..., \"itemId5\".\n> * \"start=&top=\" will return all 5 items.\n> * \"start=&top=2\" will return \"itemId1\", \"itemId2\".\n> * \"start=itemId2&top=3\" will return \"itemId3\", \"itemId4\", \"itemId5\".",
"parameters": [
{
"name": "start",
"in": "query",
"description": "List resources greater than the \"start\". It contains no more than 64 characters. Default is empty.",
"required": false,
"type": "string"
},
{
"name": "top",
"in": "query",
"description": "The number of items to list, ranging in [1, 1000]. Default is 1000.",
"required": false,
"type": "integer",
"format": "int32",
"default": 1000,
"minimum": 1,
"maximum": 1000
}
],
"responses": {
"200": {
"description": "A successful call returns an array of Dynamic Person Groups and their information (dynamicPersonGroupId, name and userData).",
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/DynamicPersonGroup"
},
"x-ms-identifiers": []
}
},
"default": {
"description": "An unexpected error response.",
"schema": {
"$ref": "#/definitions/FaceErrorResponse"
},
"headers": {
"x-ms-error-code": {
"type": "string",
"description": "String error code indicating what went wrong."
}
}
}
},
"x-ms-examples": {
"Get DynamicPersonGroups": {
"$ref": "./examples/PersonDirectoryOperations_GetDynamicPersonGroups.json"
}
}
}
},
"/dynamicpersongroups/{dynamicPersonGroupId}": {
"get": {
"operationId": "PersonDirectoryOperations_GetDynamicPersonGroup",
"summary": "Retrieve the information of a Dynamic Person Group, including its name and userData.",
"description": "This API returns Dynamic Person Group information only, use Person Directory \"Get Dynamic Person Group Persons\" instead to retrieve person information under the Dynamic Person Group.",
"parameters": [
{
"name": "dynamicPersonGroupId",
"in": "path",
"description": "ID of the dynamic person group.",
"required": true,
"type": "string",
"minLength": 1,
"maxLength": 64,
"pattern": "^[a-z0-9-_]+$"
}
],
"responses": {
"200": {
"description": "A successful call returns the Dynamic Person Group's information.",
"schema": {
"$ref": "#/definitions/DynamicPersonGroup"
}
},
"default": {
"description": "An unexpected error response.",
"schema": {
"$ref": "#/definitions/FaceErrorResponse"
},
"headers": {
"x-ms-error-code": {
"type": "string",
"description": "String error code indicating what went wrong."
}
}
}
},
"x-ms-examples": {
"Get DynamicPersonGroup": {
"$ref": "./examples/PersonDirectoryOperations_GetDynamicPersonGroup.json"
}
}
},
"put": {
"operationId": "PersonDirectoryOperations_CreateDynamicPersonGroupWithPerson",
"summary": "Creates a new Dynamic Person Group with specified dynamicPersonGroupId, name, and user-provided userData.",
"description": "A Dynamic Person Group is a container that references Person Directory \"Create Person\". After creation, use Person Directory \"Update Dynamic Person Group\" to add/remove persons to/from the Dynamic Person Group.\n\nDynamic Person Group and user data will be stored on server until Person Directory \"Delete Dynamic Person Group\" is called. Use \"Identify From Dynamic Person Group\" with the dynamicPersonGroupId parameter to identify against persons.\n\nNo image will be stored. Only the person's extracted face feature(s) and userData will be stored on server until Person Directory \"Delete Person\" or \"Delete Person Face\" is called.\n\n'recognitionModel' does not need to be specified with Dynamic Person Groups. Dynamic Person Groups are references to Person Directory \"Create Person\" and therefore work with most all 'recognitionModels'. The faceId's provided during \"Identify\" determine the 'recognitionModel' used.",
"parameters": [
{
"name": "dynamicPersonGroupId",
"in": "path",
"description": "ID of the dynamic person group.",
"required": true,
"type": "string",
"minLength": 1,
"maxLength": 64,
"pattern": "^[a-z0-9-_]+$"
},
{
"name": "body",
"in": "body",
"required": true,
"schema": {
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "User defined name, maximum length is 128.",
"minLength": 1,
"maxLength": 128
},
"userData": {
"type": "string",
"description": "Optional user defined data. Length should not exceed 16K.",
"maxLength": 16384
},
"addPersonIds": {
"type": "array",
"description": "Array of personIds created by Person Directory \"Create Person\" to be added.",
"minItems": 1,
"items": {
"$ref": "#/definitions/Azure.Core.uuid"
}
}
},
"required": [
"name",
"addPersonIds"
]
}
}
],
"responses": {
"202": {
"description": "A successful call returns an empty response body. The service has accepted the request and will start processing soon. The client can query the operation status and result using the URL specified in the 'Operation-Location' response header. The URL expires in 48 hours. The URL provides the status of when Person Directory \"Get Dynamic Person Group References\" will return the changes made in this request.",
"headers": {
"operation-Location": {
"type": "string",
"format": "uri",
"description": "The location of an instance of OperationResult"
}
}
},
"default": {
"description": "An unexpected error response.",
"schema": {
"$ref": "#/definitions/FaceErrorResponse"
},
"headers": {
"x-ms-error-code": {
"type": "string",
"description": "String error code indicating what went wrong."
}
}
}
},
"x-ms-examples": {
"Create DynamicPersonGroup": {
"$ref": "./examples/PersonDirectoryOperations_CreateDynamicPersonGroupWithPerson.json"
}
},
"x-ms-long-running-operation": true
},
"patch": {
"operationId": "PersonDirectoryOperations_UpdateDynamicPersonGroupWithPersonChanges",
"summary": "Update the name or userData of an existing Dynamic Person Group, and manage its members by adding or removing persons.",
"description": "The properties keep unchanged if they are not in request body.",
"parameters": [
{
"name": "dynamicPersonGroupId",
"in": "path",