LargeFaceListClient.GetFaces Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
GetFaces(String, Nullable<Int32>, RequestContext) |
[Protocol Method] List faces' persistedFaceId and userData in a specified Large Face List.
|
GetFaces(String, Nullable<Int32>, CancellationToken) |
List faces' persistedFaceId and userData in a specified Large Face List. |
GetFaces(String, Nullable<Int32>, RequestContext)
- Source:
- LargeFaceListClient.cs
[Protocol Method] List faces' persistedFaceId and userData in a specified Large Face List.
- This protocol method allows explicit creation of the request and processing of the response for advanced scenarios.
- Please try the simpler GetFaces(String, Nullable<Int32>, CancellationToken) convenience overload with strongly typed models first.
public virtual Azure.Response GetFaces (string start, int? top, Azure.RequestContext context);
abstract member GetFaces : string * Nullable<int> * Azure.RequestContext -> Azure.Response
override this.GetFaces : string * Nullable<int> * Azure.RequestContext -> Azure.Response
Public Overridable Function GetFaces (start As String, top As Nullable(Of Integer), context As RequestContext) As Response
Parameters
- start
- String
List resources greater than the "start". It contains no more than 64 characters. Default is empty.
- 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
Service returned a non-success status code.
Examples
This sample shows how to call GetFaces and parse the result.
Uri endpoint = new Uri("<endpoint>");
AzureKeyCredential credential = new AzureKeyCredential("<key>");
LargeFaceListClient client = new FaceAdministrationClient(endpoint, credential).GetLargeFaceListClient("your_large_face_list_id");
Response response = client.GetFaces("00000000-0000-0000-0000-000000000000", 20, null);
JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement;
Console.WriteLine(result[0].GetProperty("persistedFaceId").ToString());
Applies to
GetFaces(String, Nullable<Int32>, CancellationToken)
- Source:
- LargeFaceListClient.cs
List faces' persistedFaceId and userData in a specified Large Face List.
public virtual Azure.Response<System.Collections.Generic.IReadOnlyList<Azure.AI.Vision.Face.LargeFaceListFace>> GetFaces (string start = default, int? top = default, System.Threading.CancellationToken cancellationToken = default);
abstract member GetFaces : string * Nullable<int> * System.Threading.CancellationToken -> Azure.Response<System.Collections.Generic.IReadOnlyList<Azure.AI.Vision.Face.LargeFaceListFace>>
override this.GetFaces : string * Nullable<int> * System.Threading.CancellationToken -> Azure.Response<System.Collections.Generic.IReadOnlyList<Azure.AI.Vision.Face.LargeFaceListFace>>
Public Overridable Function GetFaces (Optional start As String = Nothing, Optional top As Nullable(Of Integer) = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Response(Of IReadOnlyList(Of LargeFaceListFace))
Parameters
- start
- String
List resources greater than the "start". It contains no more than 64 characters. Default is empty.
- cancellationToken
- CancellationToken
The cancellation token to use.
Returns
Examples
This sample shows how to call GetFaces.
Uri endpoint = new Uri("<endpoint>");
AzureKeyCredential credential = new AzureKeyCredential("<key>");
LargeFaceListClient client = new FaceAdministrationClient(endpoint, credential).GetLargeFaceListClient("your_large_face_list_id");
Response<IReadOnlyList<LargeFaceListFace>> response = client.GetFaces();
Remarks
Please refer to https://learn.microsoft.com/rest/api/face/face-list-operations/get-large-face-list-faces for more details.
Applies to
Azure SDK for .NET