Person Group Person - Create
Create a new person in a specified person group.
POST {Endpoint}/face/v1.0/persongroups/{personGroupId}/persons
URI Parameters
Name | In | Required | Type | Description |
---|---|---|---|---|
Endpoint
|
path | True |
string |
Supported Cognitive Services endpoints (protocol and hostname, for example: https://westus.api.cognitive.microsoft.com). |
person
|
path | True |
string |
Id referencing a particular person group. Regex pattern: |
Request Header
Name | Required | Type | Description |
---|---|---|---|
Ocp-Apim-Subscription-Key | True |
string |
Request Body
Name | Type | Description |
---|---|---|
name |
string |
User defined name, maximum length is 128. |
userData |
string |
User specified data. Length should not exceed 16KB. |
Responses
Name | Type | Description |
---|---|---|
200 OK |
A successful call returns a new personId created. |
|
Other Status Codes |
Error response. |
Security
Ocp-Apim-Subscription-Key
Type:
apiKey
In:
header
Examples
Create new person for person group example
Sample Request
POST {Endpoint}/face/v1.0/persongroups/abc/persons
{
"name": "mike",
"userData": "{additional data associated with mike}"
}
Sample Response
{
"personId": "4caa25ee-3bc6-4e88-adf8-12455ce7aab0"
}
Definitions
Name | Description |
---|---|
APIError |
Error information returned by the API |
Error |
Error body. |
Name |
A combination of user defined name and user specified data for the person, largePersonGroup/personGroup, and largeFaceList/faceList. |
Person |
Person object. |
APIError
Error information returned by the API
Name | Type | Description |
---|---|---|
error |
Error body. |
Error
Error body.
Name | Type | Description |
---|---|---|
code |
string |
|
message |
string |
NameAndUserDataContract
A combination of user defined name and user specified data for the person, largePersonGroup/personGroup, and largeFaceList/faceList.
Name | Type | Description |
---|---|---|
name |
string |
User defined name, maximum length is 128. |
userData |
string |
User specified data. Length should not exceed 16KB. |
Person
Person object.
Name | Type | Description |
---|---|---|
name |
string |
User defined name, maximum length is 128. |
persistedFaceIds |
string[] |
PersistedFaceIds of registered faces in the person. These persistedFaceIds are returned from Person - Add a Person Face, and will not expire. |
personId |
string |
PersonId of the target face list. |
userData |
string |
User specified data. Length should not exceed 16KB. |