LargePersonGroupClient.GetPersonsAsync 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
GetPersonsAsync(String, Nullable<Int32>, RequestContext) |
[Protocol Method] List all persons' information in the specified Large Person Group, including personId, name, userData and persistedFaceIds of registered person faces.
|
GetPersonsAsync(String, Nullable<Int32>, CancellationToken) |
List all persons' information in the specified Large Person Group, including personId, name, userData and persistedFaceIds of registered person faces. |
GetPersonsAsync(String, Nullable<Int32>, RequestContext)
- Source:
- LargePersonGroupClient.cs
[Protocol Method] List all persons' information in the specified Large Person Group, including personId, name, userData and persistedFaceIds of registered person faces.
- This protocol method allows explicit creation of the request and processing of the response for advanced scenarios.
- Please try the simpler GetPersonsAsync(String, Nullable<Int32>, CancellationToken) convenience overload with strongly typed models first.
public virtual System.Threading.Tasks.Task<Azure.Response> GetPersonsAsync (string start, int? top, Azure.RequestContext context);
abstract member GetPersonsAsync : string * Nullable<int> * Azure.RequestContext -> System.Threading.Tasks.Task<Azure.Response>
override this.GetPersonsAsync : string * Nullable<int> * Azure.RequestContext -> System.Threading.Tasks.Task<Azure.Response>
Public Overridable Function GetPersonsAsync (start As String, top As Nullable(Of Integer), context As RequestContext) As Task(Of 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 GetPersonsAsync and parse the result.
Uri endpoint = new Uri("<endpoint>");
AzureKeyCredential credential = new AzureKeyCredential("<key>");
LargePersonGroupClient client = new FaceAdministrationClient(endpoint, credential).GetLargePersonGroupClient("your_large_person_group_id");
Response response = await client.GetPersonsAsync("00000000-0000-0000-0000-000000000000", 20, null);
JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement;
Console.WriteLine(result[0].GetProperty("personId").ToString());
Console.WriteLine(result[0].GetProperty("name").ToString());
Applies to
GetPersonsAsync(String, Nullable<Int32>, CancellationToken)
- Source:
- LargePersonGroupClient.cs
List all persons' information in the specified Large Person Group, including personId, name, userData and persistedFaceIds of registered person faces.
public virtual System.Threading.Tasks.Task<Azure.Response<System.Collections.Generic.IReadOnlyList<Azure.AI.Vision.Face.LargePersonGroupPerson>>> GetPersonsAsync (string start = default, int? top = default, System.Threading.CancellationToken cancellationToken = default);
abstract member GetPersonsAsync : string * Nullable<int> * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response<System.Collections.Generic.IReadOnlyList<Azure.AI.Vision.Face.LargePersonGroupPerson>>>
override this.GetPersonsAsync : string * Nullable<int> * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response<System.Collections.Generic.IReadOnlyList<Azure.AI.Vision.Face.LargePersonGroupPerson>>>
Public Overridable Function GetPersonsAsync (Optional start As String = Nothing, Optional top As Nullable(Of Integer) = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Task(Of Response(Of IReadOnlyList(Of LargePersonGroupPerson)))
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 GetPersonsAsync.
Uri endpoint = new Uri("<endpoint>");
AzureKeyCredential credential = new AzureKeyCredential("<key>");
LargePersonGroupClient client = new FaceAdministrationClient(endpoint, credential).GetLargePersonGroupClient("your_large_person_group_id");
Response<IReadOnlyList<LargePersonGroupPerson>> response = await client.GetPersonsAsync();
Remarks
Please refer to https://learn.microsoft.com/rest/api/face/person-group-operations/get-large-person-group-persons for more details.
Applies to
Azure SDK for .NET