Face List - Create a Face List
創建一個空的且用戶指定的faceListId, name and an optional userData的face list.一個訂閱的用戶可以之多創建64個face lists。
face list 是一組faces,并且faces 永不過期。。face list 可在Face - Find Similar作為face的資源參數。用于查找固定設置的face的類似面部數據。例如:在明星臉中,朋友或者家人中查找類似的臉。
face list中最多存放1000個face
Http Method
`POST`
Request URL
`https://api.cognitive.azure.cn/face/v1.0/facelists/{faceListId}`
Request parameters
| 參數名|參數類型 |描述 |
| --- | --- | --- |
| faceListId |string | 長度不超過64位由小寫字母,數字,‘—’,‘_’組成的字符串 |
Request headers
| 請求頭 |類型 |描述 |
| --- | --- | --- |
| Content-Type(可選) | 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 | 被創建的face list 的名字 |
| userData (可選) | String | 用戶為該face list定義數據,最大長度16k |
~~~
{
"name":"sample_list",
"userData":"User-provided data attached to the face list"
}
~~~
Response 200
請求成功返回空
Response 400
Error code and message returned in JSON
| Error Code | Error Message Description |
| --- | --- |
|BadArgument | Name 過長 |
| BadArgument | useData過長 |
| BadArgument | 錯誤的或者未識別的JSON body |
| BadArgument | 無效的Face list ID is invalid,有效格式為:小寫字母,數字,‘—’,‘_’,字符串最大長度是64 |
~~~
{
"error":{
"code":"BadArgument",
"message":"'name' 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
face list數據超出范圍,最大為64
~~~
{
"error":{
"code":"QuotaExceeded",
"message":"Face list number reached limit"
}
}
~~~
Response 409
| Error Code | Error Message Description |
| --- | --- |
| FaceListExists |Face list已經存在 |
| ConcurrentOperationConflict | 當前資源運算有沖突 |
~~~
{
"error":{
"code":"FaceListExists",
"message":"Face list 'sample_list' already exists."
}
}
~~~
Response 415
不支持的媒體格式,該API支持application/json
~~~
{
"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