FaceSessionClient.GetLivenessSessionAuditEntries Method

Definition

Overloads

GetLivenessSessionAuditEntries(String, String, Nullable<Int32>, RequestContext)

[Protocol Method] Gets session requests and response body for the session.

GetLivenessSessionAuditEntries(String, String, Nullable<Int32>, CancellationToken)

Gets session requests and response body for the session.

GetLivenessSessionAuditEntries(String, String, Nullable<Int32>, RequestContext)

Source:
FaceSessionClient.cs

[Protocol Method] Gets session requests and response body for the session.

public virtual Azure.Response GetLivenessSessionAuditEntries (string sessionId, string start, int? top, Azure.RequestContext context);
abstract member GetLivenessSessionAuditEntries : string * string * Nullable<int> * Azure.RequestContext -> Azure.Response
override this.GetLivenessSessionAuditEntries : string * string * Nullable<int> * Azure.RequestContext -> Azure.Response
Public Overridable Function GetLivenessSessionAuditEntries (sessionId As String, start As String, top As Nullable(Of Integer), context As RequestContext) As Response

Parameters

sessionId
String

The unique ID to reference this session.

start
String

List resources greater than the "start". It contains no more than 64 characters. Default is empty.

top
Nullable<Int32>

The number of items to list, ranging in [1, 1000]. Default is 1000.

context
RequestContext

The request context, which can override default behaviors of the client pipeline on a per-call basis.

Returns

The response returned from the service.

Exceptions

sessionId is null.

sessionId is an empty string, and was expected to be non-empty.

Service returned a non-success status code.

Examples

This sample shows how to call GetLivenessSessionAuditEntries and parse the result.

Uri endpoint = new Uri("<https://my-service.azure.com>");
AzureKeyCredential credential = new AzureKeyCredential("<key>");
FaceSessionClient client = new FaceSessionClient(endpoint, credential);

Response response = client.GetLivenessSessionAuditEntries("<sessionId>", null, null, null);

JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement;
Console.WriteLine(result[0].GetProperty("id").ToString());
Console.WriteLine(result[0].GetProperty("sessionId").ToString());
Console.WriteLine(result[0].GetProperty("requestId").ToString());
Console.WriteLine(result[0].GetProperty("clientRequestId").ToString());
Console.WriteLine(result[0].GetProperty("receivedDateTime").ToString());
Console.WriteLine(result[0].GetProperty("request").GetProperty("url").ToString());
Console.WriteLine(result[0].GetProperty("request").GetProperty("method").ToString());
Console.WriteLine(result[0].GetProperty("request").GetProperty("contentType").ToString());
Console.WriteLine(result[0].GetProperty("response").GetProperty("body").ToString());
Console.WriteLine(result[0].GetProperty("response").GetProperty("statusCode").ToString());
Console.WriteLine(result[0].GetProperty("response").GetProperty("latencyInMilliseconds").ToString());
Console.WriteLine(result[0].GetProperty("digest").ToString());

This sample shows how to call GetLivenessSessionAuditEntries with all parameters and parse the result.

Uri endpoint = new Uri("<https://my-service.azure.com>");
AzureKeyCredential credential = new AzureKeyCredential("<key>");
FaceSessionClient client = new FaceSessionClient(endpoint, credential);

Response response = client.GetLivenessSessionAuditEntries("<sessionId>", "<start>", 1234, null);

JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement;
Console.WriteLine(result[0].GetProperty("id").ToString());
Console.WriteLine(result[0].GetProperty("sessionId").ToString());
Console.WriteLine(result[0].GetProperty("requestId").ToString());
Console.WriteLine(result[0].GetProperty("clientRequestId").ToString());
Console.WriteLine(result[0].GetProperty("receivedDateTime").ToString());
Console.WriteLine(result[0].GetProperty("request").GetProperty("url").ToString());
Console.WriteLine(result[0].GetProperty("request").GetProperty("method").ToString());
Console.WriteLine(result[0].GetProperty("request").GetProperty("contentLength").ToString());
Console.WriteLine(result[0].GetProperty("request").GetProperty("contentType").ToString());
Console.WriteLine(result[0].GetProperty("request").GetProperty("userAgent").ToString());
Console.WriteLine(result[0].GetProperty("response").GetProperty("body").GetProperty("livenessDecision").ToString());
Console.WriteLine(result[0].GetProperty("response").GetProperty("body").GetProperty("target").GetProperty("faceRectangle").GetProperty("top").ToString());
Console.WriteLine(result[0].GetProperty("response").GetProperty("body").GetProperty("target").GetProperty("faceRectangle").GetProperty("left").ToString());
Console.WriteLine(result[0].GetProperty("response").GetProperty("body").GetProperty("target").GetProperty("faceRectangle").GetProperty("width").ToString());
Console.WriteLine(result[0].GetProperty("response").GetProperty("body").GetProperty("target").GetProperty("faceRectangle").GetProperty("height").ToString());
Console.WriteLine(result[0].GetProperty("response").GetProperty("body").GetProperty("target").GetProperty("fileName").ToString());
Console.WriteLine(result[0].GetProperty("response").GetProperty("body").GetProperty("target").GetProperty("timeOffsetWithinFile").ToString());
Console.WriteLine(result[0].GetProperty("response").GetProperty("body").GetProperty("target").GetProperty("imageType").ToString());
Console.WriteLine(result[0].GetProperty("response").GetProperty("body").GetProperty("modelVersionUsed").ToString());
Console.WriteLine(result[0].GetProperty("response").GetProperty("body").GetProperty("verifyResult").GetProperty("verifyImage").GetProperty("faceRectangle").GetProperty("top").ToString());
Console.WriteLine(result[0].GetProperty("response").GetProperty("body").GetProperty("verifyResult").GetProperty("verifyImage").GetProperty("faceRectangle").GetProperty("left").ToString());
Console.WriteLine(result[0].GetProperty("response").GetProperty("body").GetProperty("verifyResult").GetProperty("verifyImage").GetProperty("faceRectangle").GetProperty("width").ToString());
Console.WriteLine(result[0].GetProperty("response").GetProperty("body").GetProperty("verifyResult").GetProperty("verifyImage").GetProperty("faceRectangle").GetProperty("height").ToString());
Console.WriteLine(result[0].GetProperty("response").GetProperty("body").GetProperty("verifyResult").GetProperty("verifyImage").GetProperty("qualityForRecognition").ToString());
Console.WriteLine(result[0].GetProperty("response").GetProperty("body").GetProperty("verifyResult").GetProperty("matchConfidence").ToString());
Console.WriteLine(result[0].GetProperty("response").GetProperty("body").GetProperty("verifyResult").GetProperty("isIdentical").ToString());
Console.WriteLine(result[0].GetProperty("response").GetProperty("statusCode").ToString());
Console.WriteLine(result[0].GetProperty("response").GetProperty("latencyInMilliseconds").ToString());
Console.WriteLine(result[0].GetProperty("digest").ToString());

Applies to

GetLivenessSessionAuditEntries(String, String, Nullable<Int32>, CancellationToken)

Source:
FaceSessionClient.cs

Gets session requests and response body for the session.

public virtual Azure.Response<System.Collections.Generic.IReadOnlyList<Azure.AI.Vision.Face.LivenessSessionAuditEntry>> GetLivenessSessionAuditEntries (string sessionId, string start = default, int? top = default, System.Threading.CancellationToken cancellationToken = default);
abstract member GetLivenessSessionAuditEntries : string * string * Nullable<int> * System.Threading.CancellationToken -> Azure.Response<System.Collections.Generic.IReadOnlyList<Azure.AI.Vision.Face.LivenessSessionAuditEntry>>
override this.GetLivenessSessionAuditEntries : string * string * Nullable<int> * System.Threading.CancellationToken -> Azure.Response<System.Collections.Generic.IReadOnlyList<Azure.AI.Vision.Face.LivenessSessionAuditEntry>>
Public Overridable Function GetLivenessSessionAuditEntries (sessionId As String, Optional start As String = Nothing, Optional top As Nullable(Of Integer) = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Response(Of IReadOnlyList(Of LivenessSessionAuditEntry))

Parameters

sessionId
String

The unique ID to reference this session.

start
String

List resources greater than the "start". It contains no more than 64 characters. Default is empty.

top
Nullable<Int32>

The number of items to list, ranging in [1, 1000]. Default is 1000.

cancellationToken
CancellationToken

The cancellation token to use.

Returns

Exceptions

sessionId is null.

sessionId is an empty string, and was expected to be non-empty.

Examples

This sample shows how to call GetLivenessSessionAuditEntries.

Uri endpoint = new Uri("<https://my-service.azure.com>");
AzureKeyCredential credential = new AzureKeyCredential("<key>");
FaceSessionClient client = new FaceSessionClient(endpoint, credential);

Response<IReadOnlyList<LivenessSessionAuditEntry>> response = client.GetLivenessSessionAuditEntries("<sessionId>");

This sample shows how to call GetLivenessSessionAuditEntries with all parameters.

Uri endpoint = new Uri("<https://my-service.azure.com>");
AzureKeyCredential credential = new AzureKeyCredential("<key>");
FaceSessionClient client = new FaceSessionClient(endpoint, credential);

Response<IReadOnlyList<LivenessSessionAuditEntry>> response = client.GetLivenessSessionAuditEntries("<sessionId>", start: "<start>", top: 1234);

Applies to