Person - Update a Person
更新人物的名字或者userData
ttp Method
`PATCH`
Request URL
`https://api.cognitive.azure.cn/face/v1.0/persongroups/{personGroupId}/persons/{personId} `
Request parameters
Request parameters
| 參數名|參數類型 |描述 |
| --- | --- | --- |
| personGroupId |string | 指定包含目標人物的人物組|
| personId |string | 目標人物的personId|
Request headers
| 請求頭 |類型 |描述 |
| --- | --- | --- |
| Content-Type (optional) |string |Media type of the body sent to the API. |
| Ocp-Apim-Subscription-Key | string | Subscription key which provides access to this API. Found in your Cognitive Services accounts. |
Request body
JSON fields in request body
| Fields | Type | Description|
| --- | --- | --- |
| name| String | 目標人物的顯示名稱。最大長度128 |
| userData | String | 用戶提供的附加到該人物的數據。最大16KB. |
~~~
{
"name":"Person1",
"userData":"user-provided data attached to the person."
}
~~~
Response 200
一個成功的調用返回一個空的響應體。
Response 400
| Error code | message|
| --- | --- |
| BadArgument | Name過長 |
| BadArgument | userData過長 |
| BadArgument | 錯誤的或無法解析的json body |
~~~
{
"error":{
"code":"BadArgument",
"message":"'userData' is too long."
}
}
~~~
Response 401
| Error Code | Error Message Description |
| --- | --- |
| Unspecified | 無效的subscription Key 或user/plan 被凍結 |
~~~
{
"error":{
"code": "Unspecified",
"message": "Access denied due to invalid subscription key. Make sure you are subscribed to an API you are trying to call and provide the right key."
}
}
~~~
Response 403
~~~
{
"error":{
"statusCode": 403,
"message": "Out of call volume quota. Quota will be replenished in 2.12 days."
}
}
~~~
Response 404
| Error Code | Error Message Description |
| --- | --- |
| PersonGroupNotFound |Person groupID無效。有效的格式應該是由數字組成的字符串,英文字母小寫,' - ','_',且不超過64個字符 |
| PersonGroupNotFound | 未找到Person group |
| PersonNotFound |無效的Person ID |
| PersonNotFound | 未找到Person |
~~~
{
"error":{
"code":"PersonGroupNotFound",
"message":"Person group 'sample_group' is not found."
}
}
~~~
Response 409
Error code and message returned in JSON
| Error Code |Error Message Description |
| --- | --- |
| PersonGroupTrainingNotFinished |該人物組仍在接受培訓。訓練完成后重試 |
| ConcurrentOperationConflict | 資源并發操作沖突 |
~~~
{
"error":{
"code":"PersonGroupTrainingNotFinished",
"message":"Person group 'sample_group' is under training."
}
}
~~~
Response 415
不支持的媒體類型錯誤。只有“application / json”對API有效。
~~~
{
"error":{
"code":"BadArgument",
"message":"Invalid Media Type"
}
}
~~~
Response 429
~~~
{
"error":{
"statusCode": 429,
"message": "Rate limit is exceeded. Try again in 26 seconds."
}
}
~~~
- 空白目錄
- Face
- Detect
- Find Similar
- Group
- Identify
- Verify
- Face List
- Add a Face to a Face List
- Create a Face List
- Delete a Face from a Face List
- Delete a Face List
- Get a Face List
- List Face Lists
- Update a Face List
- Person
- Add a Person Face
- Create a Person
- Delete a Person
- Delete a Person Face
- Get a Person
- Get a Person Face
- List Persons in a Person Group
- Update a Person
- Update a Person Face
- Person Group
- Create a Person Group
- Delete a Person Group
- Get a Person Group
- Get Person Group Training Status
- List Person Groups
- Train Person Group
- Update a Person Group