Person Group Operations - Get Person Group Training Status

To check Person Group training status completed or still ongoing. Person Group training is an asynchronous operation triggered by "Train Person Group" API.

GET {endpoint}/face/{apiVersion}/persongroups/{personGroupId}/training

URI Parameters

Name In Required Type Description
apiVersion
path True

string

API Version

endpoint
path True

string

uri

Supported Cognitive Services endpoints (protocol and hostname, for example: https://{resource-name}.cognitiveservices.azure.com).

personGroupId
path True

string

ID of the container.

Regex pattern: ^[a-z0-9-_]+$

Responses

Name Type Description
200 OK

TrainingResult

A successful call returns the Person Group's training status.

Other Status Codes

FaceErrorResponse

An unexpected error response.

Headers

x-ms-error-code: string

Security

Ocp-Apim-Subscription-Key

The secret key for your Azure AI Face subscription.

Type: apiKey
In: header

AADToken

The Azure Active Directory OAuth2 Flow

Type: oauth2
Flow: accessCode
Authorization URL: https://api.example.com/oauth2/authorize
Token URL: https://api.example.com/oauth2/token

Scopes

Name Description
https://cognitiveservices.azure.com/.default

Examples

Get Training Status of PersonGroup

Sample request

GET {endpoint}/face/v1.2-preview.1/persongroups/your_person_group_id/training

Sample response

{
  "status": "notStarted",
  "createdDateTime": "2024-03-05T11:07:58.371Z",
  "lastActionDateTime": "2024-03-05T11:07:58.371Z",
  "lastSuccessfulTrainingDateTime": "2024-03-05T11:07:58.371Z",
  "message": null
}

Definitions

Name Description
FaceError

The error object. For comprehensive details on error codes and messages returned by the Face Service, please refer to the following link: https://aka.ms/face-error-codes-and-messages.

FaceErrorResponse

A response containing error details.

OperationStatus

The status of long running operation.

TrainingResult

Training result of a container

FaceError

The error object. For comprehensive details on error codes and messages returned by the Face Service, please refer to the following link: https://aka.ms/face-error-codes-and-messages.

Name Type Description
code

string

One of a server-defined set of error codes.

message

string

A human-readable representation of the error.

FaceErrorResponse

A response containing error details.

Name Type Description
error

FaceError

The error object.

OperationStatus

The status of long running operation.

Name Type Description
failed

string

The operation is failed.

notStarted

string

The operation is not started.

running

string

The operation is still running.

succeeded

string

The operation is succeeded.

TrainingResult

Training result of a container

Name Type Description
createdDateTime

string

A combined UTC date and time string that describes the created time of the person group, large person group or large face list.

lastActionDateTime

string

A combined UTC date and time string that describes the last modify time of the person group, large person group or large face list, could be null value when the group is not successfully trained.

lastSuccessfulTrainingDateTime

string

A combined UTC date and time string that describes the last successful training time of the person group, large person group or large face list.

message

string

Show failure message when training failed (omitted when training succeed).

status

OperationStatus

Training status of the container.