From a6c0558b51ff7c2d6b51730b3b8af9fef940e866 Mon Sep 17 00:00:00 2001 From: Siqi Liu Date: Tue, 24 Jul 2018 20:09:52 +0800 Subject: [PATCH 01/16] Add large person group management. --- .../data-plane/Face/stable/v1.0/Face.json | 631 +++++++++++++++++- .../examples/CreateNewLargePersonGroup.json | 17 + .../CreateNewLargePersonGroupPerson.json | 19 + ...n.json => CreateNewPersonGroupPerson.json} | 0 .../v1.0/examples/DeleteLargePersonGroup.json | 13 + .../DeleteLargePersonGroupPerson.json | 14 + .../DeleteLargePersonGroupPersonFace.json | 15 + ...rson.json => DeletePersonGroupPerson.json} | 0 ....json => DeletePersonGroupPersonFace.json} | 0 .../v1.0/examples/GetLargePersonGroup.json | 17 + .../GetLargePersonGroupPersistedFace.json | 18 + .../examples/GetLargePersonGroupPerson.json | 23 + .../GetLargePersonGroupTrainingStatus.json | 19 + .../v1.0/examples/GetLargePersonGroups.json | 24 + ....json => GetPersonGroupPersistedFace.json} | 2 +- ...tPerson.json => GetPersonGroupPerson.json} | 0 ...json => GetPersonGroupTrainingStatus.json} | 4 +- .../examples/ListLargePersonGroupPersons.json | 35 + .../QueueLargePersonGroupTraining.json | 13 + ...ing.json => QueuePersonGroupTraining.json} | 0 .../v1.0/examples/UpdateLargePersonGroup.json | 17 + .../UpdateLargePersonGroupPerson.json | 18 + .../UpdateLargePersonGroupPersonFace.json | 18 + ...rson.json => UpdatePersonGroupPerson.json} | 0 ....json => UpdatePersonGroupPersonFace.json} | 0 25 files changed, 900 insertions(+), 17 deletions(-) create mode 100644 specification/cognitiveservices/data-plane/Face/stable/v1.0/examples/CreateNewLargePersonGroup.json create mode 100644 specification/cognitiveservices/data-plane/Face/stable/v1.0/examples/CreateNewLargePersonGroupPerson.json rename specification/cognitiveservices/data-plane/Face/stable/v1.0/examples/{CreateNewPerson.json => CreateNewPersonGroupPerson.json} (100%) create mode 100644 specification/cognitiveservices/data-plane/Face/stable/v1.0/examples/DeleteLargePersonGroup.json create mode 100644 specification/cognitiveservices/data-plane/Face/stable/v1.0/examples/DeleteLargePersonGroupPerson.json create mode 100644 specification/cognitiveservices/data-plane/Face/stable/v1.0/examples/DeleteLargePersonGroupPersonFace.json rename specification/cognitiveservices/data-plane/Face/stable/v1.0/examples/{DeletePerson.json => DeletePersonGroupPerson.json} (100%) rename specification/cognitiveservices/data-plane/Face/stable/v1.0/examples/{DeletePersonFace.json => DeletePersonGroupPersonFace.json} (100%) create mode 100644 specification/cognitiveservices/data-plane/Face/stable/v1.0/examples/GetLargePersonGroup.json create mode 100644 specification/cognitiveservices/data-plane/Face/stable/v1.0/examples/GetLargePersonGroupPersistedFace.json create mode 100644 specification/cognitiveservices/data-plane/Face/stable/v1.0/examples/GetLargePersonGroupPerson.json create mode 100644 specification/cognitiveservices/data-plane/Face/stable/v1.0/examples/GetLargePersonGroupTrainingStatus.json create mode 100644 specification/cognitiveservices/data-plane/Face/stable/v1.0/examples/GetLargePersonGroups.json rename specification/cognitiveservices/data-plane/Face/stable/v1.0/examples/{GetPersistedFace.json => GetPersonGroupPersistedFace.json} (83%) rename specification/cognitiveservices/data-plane/Face/stable/v1.0/examples/{GetPerson.json => GetPersonGroupPerson.json} (100%) rename specification/cognitiveservices/data-plane/Face/stable/v1.0/examples/{GetTrainingStatus.json => GetPersonGroupTrainingStatus.json} (66%) create mode 100644 specification/cognitiveservices/data-plane/Face/stable/v1.0/examples/ListLargePersonGroupPersons.json create mode 100644 specification/cognitiveservices/data-plane/Face/stable/v1.0/examples/QueueLargePersonGroupTraining.json rename specification/cognitiveservices/data-plane/Face/stable/v1.0/examples/{QueueTraining.json => QueuePersonGroupTraining.json} (100%) create mode 100644 specification/cognitiveservices/data-plane/Face/stable/v1.0/examples/UpdateLargePersonGroup.json create mode 100644 specification/cognitiveservices/data-plane/Face/stable/v1.0/examples/UpdateLargePersonGroupPerson.json create mode 100644 specification/cognitiveservices/data-plane/Face/stable/v1.0/examples/UpdateLargePersonGroupPersonFace.json rename specification/cognitiveservices/data-plane/Face/stable/v1.0/examples/{UpdatePerson.json => UpdatePersonGroupPerson.json} (100%) rename specification/cognitiveservices/data-plane/Face/stable/v1.0/examples/{UpdatePersonFace.json => UpdatePersonGroupPersonFace.json} (100%) diff --git a/specification/cognitiveservices/data-plane/Face/stable/v1.0/Face.json b/specification/cognitiveservices/data-plane/Face/stable/v1.0/Face.json index 699b2cf4aa7c..46791c387eac 100644 --- a/specification/cognitiveservices/data-plane/Face/stable/v1.0/Face.json +++ b/specification/cognitiveservices/data-plane/Face/stable/v1.0/Face.json @@ -239,8 +239,8 @@ } }, "x-ms-examples": { - "Create new person example": { - "$ref": "./examples/CreateNewPerson.json" + "Create new person for person group example": { + "$ref": "./examples/CreateNewPersonGroupPerson.json" } } }, @@ -294,7 +294,7 @@ }, "/persongroups/{personGroupId}/persons/{personId}": { "delete": { - "description": "Delete an existing person from a person group. Persisted face images of the person will also be deleted.", + "description": "Delete an existing person from a person group. All stored person data, and face features in the person entry will be deleted.", "operationId": "PersonGroupPerson_Delete", "parameters": [ { @@ -317,7 +317,7 @@ }, "x-ms-examples": { "Delete an existing person example": { - "$ref": "./examples/DeletePerson.json" + "$ref": "./examples/DeletePersonGroupPerson.json" } } }, @@ -351,7 +351,7 @@ }, "x-ms-examples": { "Get person example": { - "$ref": "./examples/GetPerson.json" + "$ref": "./examples/GetPersonGroupPerson.json" } } }, @@ -392,14 +392,14 @@ }, "x-ms-examples": { "Update person example": { - "$ref": "./examples/UpdatePerson.json" + "$ref": "./examples/UpdatePersonGroupPerson.json" } } } }, "/persongroups/{personGroupId}/persons/{personId}/persistedFaces/{persistedFaceId}": { "delete": { - "description": "Delete a face from a person. Relative image for the persisted face will also be deleted.", + "description": "Delete a face from a person. Relative feature for the persisted face will also be deleted.", "operationId": "PersonGroupPerson_DeleteFace", "parameters": [ { @@ -425,7 +425,7 @@ }, "x-ms-examples": { "Delete face from person example": { - "$ref": "./examples/DeletePersonFace.json" + "$ref": "./examples/DeletePersonGroupPersonFace.json" } } }, @@ -462,7 +462,7 @@ }, "x-ms-examples": { "Get persisted face example": { - "$ref": "./examples/GetPersistedFace.json" + "$ref": "./examples/GetPersonGroupPersistedFace.json" } } }, @@ -506,7 +506,7 @@ }, "x-ms-examples": { "Update person face example": { - "$ref": "./examples/UpdatePersonFace.json" + "$ref": "./examples/UpdatePersonGroupPersonFace.json" } } } @@ -551,7 +551,7 @@ } }, "delete": { - "description": "Delete an existing person group. Persisted face images of all people in the person group will also be deleted.", + "description": "Delete an existing person group. Persisted face features of all people in the person group will also be deleted.", "operationId": "PersonGroup_Delete", "parameters": [ { @@ -672,8 +672,8 @@ "application/json" ], "x-ms-examples": { - "Get training status example": { - "$ref": "./examples/GetTrainingStatus.json" + "Get person group's training status example": { + "$ref": "./examples/GetPersonGroupTrainingStatus.json" } } } @@ -751,7 +751,7 @@ }, "x-ms-examples": { "Queue person group training": { - "$ref": "./examples/QueueTraining.json" + "$ref": "./examples/QueuePersonGroupTraining.json" } } } @@ -1097,6 +1097,563 @@ } } } + }, + "/largepersongroups/{largePersonGroupId}/persons": { + "post": { + "description": "Create a new person in a specified large person group.", + "operationId": "LargePersonGroupPerson_Create", + "parameters": [ + { + "$ref": "#/parameters/largePersonGroupId" + }, + { + "name": "body", + "description": "Request body for creating new person.", + "in": "body", + "required": true, + "x-ms-client-flatten": true, + "schema": { + "$ref": "#/definitions/NameAndUserDataContract" + } + } + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "responses": { + "200": { + "description": "A successful call returns a new personId created.", + "schema": { + "$ref": "#/definitions/Person" + } + }, + "default": { + "description": "Error response.", + "schema": { + "$ref": "#/definitions/APIError" + } + } + }, + "x-ms-examples": { + "Create new person for large person group example": { + "$ref": "./examples/CreateNewLargePersonGroupPerson.json" + } + } + }, + "get": { + "description": "List all persons in a large person group, and retrieve person information (including personId, name, userData and persistedFaceIds of registered faces of the person).", + "operationId": "LargePersonGroupPerson_List", + "parameters": [ + { + "$ref": "#/parameters/largePersonGroupId" + }, + { + "name": "start", + "description": "Starting person id to return (used to list a range of persons).", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "top", + "description": "Number of persons to return starting with the person id indicated by the 'start' parameter.", + "in": "query", + "required": false, + "type": "integer", + "minimum": 1, + "maximum": 1000 + } + ], + "produces": [ + "application/json" + ], + "responses": { + "200": { + "description": "A successful call returns an array of person information that belong to the large person group.", + "schema": { + "$ref": "#/definitions/Persons" + } + }, + "default": { + "description": "Error response.", + "schema": { + "$ref": "#/definitions/APIError" + } + } + }, + "x-ms-examples": { + "List persons in person group": { + "$ref": "./examples/ListLargePersonGroupPersons.json" + } + } + } + }, + "/largepersongroups/{largePersonGroupId}/persons/{personId}": { + "delete": { + "description": "Delete an existing person from a large person group. All stored person data, and face features in the person entry will be deleted.", + "operationId": "LargePersonGroupPerson_Delete", + "parameters": [ + { + "$ref": "#/parameters/largePersonGroupId" + }, + { + "$ref": "#/parameters/personId" + } + ], + "responses": { + "200": { + "description": "A successful call returns an empty response body." + }, + "default": { + "description": "Error response.", + "schema": { + "$ref": "#/definitions/APIError" + } + } + }, + "x-ms-examples": { + "Delete an existing person example": { + "$ref": "./examples/DeleteLargePersonGroupPerson.json" + } + } + }, + "get": { + "description": "Retrieve a person's information, including registered persisted faces, name and userData.", + "operationId": "LargePersonGroupPerson_Get", + "parameters": [ + { + "$ref": "#/parameters/largePersonGroupId" + }, + { + "$ref": "#/parameters/personId" + } + ], + "produces": [ + "application/json" + ], + "responses": { + "200": { + "description": "A successful call returns the person's information.", + "schema": { + "$ref": "#/definitions/Person" + } + }, + "default": { + "description": "Error response.", + "schema": { + "$ref": "#/definitions/APIError" + } + } + }, + "x-ms-examples": { + "Get person example": { + "$ref": "./examples/GetLargePersonGroupPerson.json" + } + } + }, + "patch": { + "description": "Update name or userData of a person.", + "operationId": "LargePersonGroupPerson_Update", + "parameters": [ + { + "$ref": "#/parameters/largePersonGroupId" + }, + { + "$ref": "#/parameters/personId" + }, + { + "name": "body", + "description": "Request body for person update operation.", + "in": "body", + "required": true, + "x-ms-client-flatten": true, + "schema": { + "$ref": "#/definitions/NameAndUserDataContract" + } + } + ], + "consumes": [ + "application/json" + ], + "responses": { + "200": { + "description": "A successful call returns an empty response body." + }, + "default": { + "description": "Error response.", + "schema": { + "$ref": "#/definitions/APIError" + } + } + }, + "x-ms-examples": { + "Update person example": { + "$ref": "./examples/UpdateLargePersonGroupPerson.json" + } + } + } + }, + "/largepersongroups/{largePersonGroupId}/persons/{personId}/persistedFaces/{persistedFaceId}": { + "delete": { + "description": "Delete a face from a person. Relative feature for the persisted face will also be deleted.", + "operationId": "LargePersonGroupPerson_DeleteFace", + "parameters": [ + { + "$ref": "#/parameters/largePersonGroupId" + }, + { + "$ref": "#/parameters/personId" + }, + { + "$ref": "#/parameters/persistedFaceId" + } + ], + "responses": { + "200": { + "description": "A successful call returns an empty response body." + }, + "default": { + "description": "Error response.", + "schema": { + "$ref": "#/definitions/APIError" + } + } + }, + "x-ms-examples": { + "Delete face from person example": { + "$ref": "./examples/DeleteLargePersonGroupPersonFace.json" + } + } + }, + "get": { + "description": "Retrieve information about a persisted face (specified by persistedFaceId, personId and its belonging largePersonGroupId).", + "operationId": "LargePersonGroupPerson_GetFace", + "parameters": [ + { + "$ref": "#/parameters/largePersonGroupId" + }, + { + "$ref": "#/parameters/personId" + }, + { + "$ref": "#/parameters/persistedFaceId" + } + ], + "produces": [ + "application/json" + ], + "responses": { + "200": { + "description": "A successful call returns target persisted face's information (persistedFaceId and userData).", + "schema": { + "$ref": "#/definitions/PersistedFace" + } + }, + "default": { + "description": "Error response.", + "schema": { + "$ref": "#/definitions/APIError" + } + } + }, + "x-ms-examples": { + "Get persisted face example": { + "$ref": "./examples/GetLargePersonGroupPersistedFace.json" + } + } + }, + "patch": { + "description": "Update a person persisted face's userData field.", + "operationId": "LargePersonGroupPerson_UpdateFace", + "parameters": [ + { + "$ref": "#/parameters/largePersonGroupId" + }, + { + "$ref": "#/parameters/personId" + }, + { + "$ref": "#/parameters/persistedFaceId" + }, + { + "name": "body", + "description": "Request body for updating persisted face.", + "in": "body", + "required": true, + "x-ms-client-flatten": true, + "schema": { + "$ref": "#/definitions/UpdatePersonFaceRequest" + } + } + ], + "consumes": [ + "application/json" + ], + "responses": { + "200": { + "description": "A successful call returns an empty response body." + }, + "default": { + "description": "Error response.", + "schema": { + "$ref": "#/definitions/APIError" + } + } + }, + "x-ms-examples": { + "Update person face example": { + "$ref": "./examples/UpdateLargePersonGroupPersonFace.json" + } + } + } + }, + "/largepersongroups/{largePersonGroupId}": { + "put": { + "description": "Create a new large person group with specified largePersonGroupId, name and user-provided userData.", + "operationId": "LargePersonGroup_Create", + "parameters": [ + { + "$ref": "#/parameters/largePersonGroupId" + }, + { + "name": "body", + "description": "Request body for creating new large person group.", + "in": "body", + "required": true, + "x-ms-client-flatten": true, + "schema": { + "$ref": "#/definitions/NameAndUserDataContract" + } + } + ], + "consumes": [ + "application/json" + ], + "responses": { + "200": { + "description": "A successful call returns an empty response body." + }, + "default": { + "description": "Error response.", + "schema": { + "$ref": "#/definitions/APIError" + } + } + }, + "x-ms-examples": { + "Create new large person group example": { + "$ref": "./examples/CreateNewLargePersonGroup.json" + } + } + }, + "delete": { + "description": "Delete an existing large person group. Persisted face features of all people in the large person group will also be deleted.", + "operationId": "LargePersonGroup_Delete", + "parameters": [ + { + "$ref": "#/parameters/largePersonGroupId" + } + ], + "responses": { + "200": { + "description": "A successful call returns an empty response body." + }, + "default": { + "description": "Error response.", + "schema": { + "$ref": "#/definitions/APIError" + } + } + }, + "x-ms-examples": { + "Delete a large person group example": { + "$ref": "./examples/DeleteLargePersonGroup.json" + } + } + }, + "get": { + "description": "Retrieve the information of a large person group, including its name and userData.", + "operationId": "LargePersonGroup_Get", + "parameters": [ + { + "$ref": "#/parameters/largePersonGroupId" + } + ], + "responses": { + "200": { + "description": "A successful call returns the large person group's information.", + "schema": { + "$ref": "#/definitions/LargePersonGroup" + } + }, + "default": { + "description": "Error response.", + "schema": { + "$ref": "#/definitions/APIError" + } + } + }, + "produces": [ + "application/json" + ], + "x-ms-examples": { + "Get large person group example": { + "$ref": "./examples/GetLargePersonGroup.json" + } + } + }, + "patch": { + "description": "Update an existing large person group's display name and userData. The properties which does not appear in request body will not be updated.", + "operationId": "LargePersonGroup_Update", + "parameters": [ + { + "$ref": "#/parameters/largePersonGroupId" + }, + { + "name": "body", + "description": "Request body for updating large person group.", + "in": "body", + "required": true, + "x-ms-client-flatten": true, + "schema": { + "$ref": "#/definitions/NameAndUserDataContract" + } + } + ], + "consumes": [ + "application/json" + ], + "responses": { + "200": { + "description": "A successful call returns an empty response body." + }, + "default": { + "description": "Error response.", + "schema": { + "$ref": "#/definitions/APIError" + } + } + }, + "x-ms-examples": { + "Update large person group example": { + "$ref": "./examples/UpdateLargePersonGroup.json" + } + } + } + }, + "/largepersongroups/{largePersonGroupId}/training": { + "get": { + "description": "Retrieve the training status of a large person group (completed or ongoing).", + "operationId": "LargePersonGroup_GetTrainingStatus", + "parameters": [ + { + "$ref": "#/parameters/largePersonGroupId" + } + ], + "responses": { + "200": { + "description": "A successful call returns the large person group's training status.", + "schema": { + "$ref": "#/definitions/TrainingStatus" + } + }, + "default": { + "description": "Error response.", + "schema": { + "$ref": "#/definitions/APIError" + } + } + }, + "produces": [ + "application/json" + ], + "x-ms-examples": { + "Get large person group's training status example": { + "$ref": "./examples/GetLargePersonGroupTrainingStatus.json" + } + } + } + }, + "/largepersongroups": { + "get": { + "description": "List large person groups and their information.", + "operationId": "LargePersonGroup_List", + "parameters": [ + { + "name": "start", + "in": "query", + "required": false, + "description": "List large person groups from the least largePersonGroupId greater than the \"start\".", + "type": "string", + "maxLength": 64 + }, + { + "name": "top", + "in": "query", + "required": false, + "description": "The number of large person groups to list.", + "type": "integer", + "minimum": 1, + "maximum": 1000, + "default": 1000 + } + ], + "produces": [ + "application/json" + ], + "responses": { + "200": { + "description": "A successful call returns an array of large person groups and their information.", + "schema": { + "$ref": "#/definitions/LargePersonGroups" + } + }, + "default": { + "description": "Error response.", + "schema": { + "$ref": "#/definitions/APIError" + } + } + }, + "x-ms-examples": { + "Get large person groups example": { + "$ref": "./examples/GetLargePersonGroups.json" + } + } + } + }, + "/largepersongroups/{largePersonGroupId}/train": { + "post": { + "description": "Queue a large person group training task, the training task may not be started immediately.", + "operationId": "LargePersonGroup_Train", + "parameters": [ + { + "$ref": "#/parameters/largePersonGroupId" + } + ], + "produces": [ + "application/json" + ], + "responses": { + "202": { + "description": "The training task was queued successfully." + }, + "default": { + "description": "Error response.", + "schema": { + "$ref": "#/definitions/APIError" + } + } + }, + "x-ms-examples": { + "Queue large person group training": { + "$ref": "./examples/QueueLargePersonGroupTraining.json" + } + } + } } }, "x-ms-paths": { @@ -2151,7 +2708,7 @@ "description": "Person group object.", "properties": { "personGroupId": { - "description": "PersonGroupId of the existing person groups.", + "description": "PersonGroupId of the target person group.", "type": "string", "maxLength": 64, "pattern": "^[a-z0-9-_]+$" @@ -2224,6 +2781,33 @@ } } }, + "LargePersonGroup": { + "type": "object", + "required": [ + "largePersonGroupId" + ], + "description": "Large person group object.", + "properties": { + "largePersonGroupId": { + "description": "LargePersonGroupId of the target large person groups", + "type": "string", + "maxLength": 64, + "pattern": "^[a-z0-9-_]+$" + } + }, + "allOf": [ + { + "$ref": "#/definitions/NameAndUserDataContract" + } + ] + }, + "LargePersonGroups": { + "type": "array", + "description": "An array of large person groups.", + "items": { + "$ref": "#/definitions/LargePersonGroup" + } + }, "UpdatePersonFaceRequest": { "type": "object", "description": "Request to update person face data.", @@ -2269,6 +2853,12 @@ "description": "Person group last modify time in the UTC, could be null value when the person group is not successfully trained.", "x-ms-client-name": "lastAction" }, + "lastSuccessfulTrainingDateTime": { + "type": "string", + "format": "date-time", + "description": "Person group last modify time in the UTC, could be null value when the person group is not successfully trained.", + "x-ms-client-name": "lastAction" + }, "message": { "type": "string", "description": "Show failure message when training failed (omitted when training succeed)." @@ -2386,6 +2976,17 @@ "maxLength": 64, "pattern": "^[a-z0-9-_]+$" }, + "largePersonGroupId": { + "name": "largePersonGroupId", + "in": "path", + "description": "Id referencing a particular large person group.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method", + "collectionFormat": "csv", + "maxLength": 64, + "pattern": "^[a-z0-9-_]+$" + }, "personId": { "name": "personId", "in": "path", diff --git a/specification/cognitiveservices/data-plane/Face/stable/v1.0/examples/CreateNewLargePersonGroup.json b/specification/cognitiveservices/data-plane/Face/stable/v1.0/examples/CreateNewLargePersonGroup.json new file mode 100644 index 000000000000..78115e6ba2a8 --- /dev/null +++ b/specification/cognitiveservices/data-plane/Face/stable/v1.0/examples/CreateNewLargePersonGroup.json @@ -0,0 +1,17 @@ +{ + "parameters": { + "AzureRegion": "westus", + "Content-Type": "application/json", + "Ocp-Apim-Subscription-Key": "{API key}", + "largePersonGroupId": "abc", + "body": { + "name": "large-person-group-name", + "userData": "User-provided data attached to the large person group." + } + }, + "responses": { + "200": { + "body": "" + } + } +} \ No newline at end of file diff --git a/specification/cognitiveservices/data-plane/Face/stable/v1.0/examples/CreateNewLargePersonGroupPerson.json b/specification/cognitiveservices/data-plane/Face/stable/v1.0/examples/CreateNewLargePersonGroupPerson.json new file mode 100644 index 000000000000..8aec88b05f4e --- /dev/null +++ b/specification/cognitiveservices/data-plane/Face/stable/v1.0/examples/CreateNewLargePersonGroupPerson.json @@ -0,0 +1,19 @@ +{ + "parameters": { + "AzureRegion": "westus", + "Content-Type": "application/json", + "Ocp-Apim-Subscription-Key": "{API key}", + "largePersonGroupId": "abc", + "body":{ + "name": "mike", + "userData": "{additional data associated with mike}" + } + }, + "responses": { + "200": { + "body": { + "personId": "4caa25ee-3bc6-4e88-adf8-12455ce7aab0" + } + } + } +} \ No newline at end of file diff --git a/specification/cognitiveservices/data-plane/Face/stable/v1.0/examples/CreateNewPerson.json b/specification/cognitiveservices/data-plane/Face/stable/v1.0/examples/CreateNewPersonGroupPerson.json similarity index 100% rename from specification/cognitiveservices/data-plane/Face/stable/v1.0/examples/CreateNewPerson.json rename to specification/cognitiveservices/data-plane/Face/stable/v1.0/examples/CreateNewPersonGroupPerson.json diff --git a/specification/cognitiveservices/data-plane/Face/stable/v1.0/examples/DeleteLargePersonGroup.json b/specification/cognitiveservices/data-plane/Face/stable/v1.0/examples/DeleteLargePersonGroup.json new file mode 100644 index 000000000000..17943813a058 --- /dev/null +++ b/specification/cognitiveservices/data-plane/Face/stable/v1.0/examples/DeleteLargePersonGroup.json @@ -0,0 +1,13 @@ +{ + "parameters": { + "AzureRegion": "westus", + "Content-Type": "application/json", + "Ocp-Apim-Subscription-Key": "{API key}", + "largePersonGroupId": "abc" + }, + "responses": { + "200": { + "body": "" + } + } +} \ No newline at end of file diff --git a/specification/cognitiveservices/data-plane/Face/stable/v1.0/examples/DeleteLargePersonGroupPerson.json b/specification/cognitiveservices/data-plane/Face/stable/v1.0/examples/DeleteLargePersonGroupPerson.json new file mode 100644 index 000000000000..92b9b71a0738 --- /dev/null +++ b/specification/cognitiveservices/data-plane/Face/stable/v1.0/examples/DeleteLargePersonGroupPerson.json @@ -0,0 +1,14 @@ +{ + "parameters": { + "AzureRegion": "westus", + "Content-Type": "application/json", + "Ocp-Apim-Subscription-Key": "{API key}", + "largePersonGroupId": "abc", + "personId": "25985303-c537-4467-b41d-bdb45cd95ca1" + }, + "responses": { + "200": { + "body": "" + } + } +} \ No newline at end of file diff --git a/specification/cognitiveservices/data-plane/Face/stable/v1.0/examples/DeleteLargePersonGroupPersonFace.json b/specification/cognitiveservices/data-plane/Face/stable/v1.0/examples/DeleteLargePersonGroupPersonFace.json new file mode 100644 index 000000000000..d644ee94e2b4 --- /dev/null +++ b/specification/cognitiveservices/data-plane/Face/stable/v1.0/examples/DeleteLargePersonGroupPersonFace.json @@ -0,0 +1,15 @@ +{ + "parameters": { + "AzureRegion": "westus", + "Content-Type": "application/json", + "Ocp-Apim-Subscription-Key": "{API key}", + "largePersonGroupId": "abc", + "personId": "25985303-c537-4467-b41d-bdb45cd95ca1", + "persistedFaceId":"62004fa7-1ac0-478e-9d5a-b38f9e7fbc68" + }, + "responses": { + "200": { + "body": "" + } + } +} \ No newline at end of file diff --git a/specification/cognitiveservices/data-plane/Face/stable/v1.0/examples/DeletePerson.json b/specification/cognitiveservices/data-plane/Face/stable/v1.0/examples/DeletePersonGroupPerson.json similarity index 100% rename from specification/cognitiveservices/data-plane/Face/stable/v1.0/examples/DeletePerson.json rename to specification/cognitiveservices/data-plane/Face/stable/v1.0/examples/DeletePersonGroupPerson.json diff --git a/specification/cognitiveservices/data-plane/Face/stable/v1.0/examples/DeletePersonFace.json b/specification/cognitiveservices/data-plane/Face/stable/v1.0/examples/DeletePersonGroupPersonFace.json similarity index 100% rename from specification/cognitiveservices/data-plane/Face/stable/v1.0/examples/DeletePersonFace.json rename to specification/cognitiveservices/data-plane/Face/stable/v1.0/examples/DeletePersonGroupPersonFace.json diff --git a/specification/cognitiveservices/data-plane/Face/stable/v1.0/examples/GetLargePersonGroup.json b/specification/cognitiveservices/data-plane/Face/stable/v1.0/examples/GetLargePersonGroup.json new file mode 100644 index 000000000000..9428a809ec93 --- /dev/null +++ b/specification/cognitiveservices/data-plane/Face/stable/v1.0/examples/GetLargePersonGroup.json @@ -0,0 +1,17 @@ +{ + "parameters": { + "AzureRegion": "westus", + "Content-Type": "application/json", + "Ocp-Apim-Subscription-Key": "{API key}", + "largePersonGroupId": "abc" + }, + "responses": { + "200": { + "body": { + "largePersonGroupId": "d408cb4e-2f5f-4b4d-b99e-f0b72870e5b5", + "name": "large-person-group-name", + "userData": "User-provided data attached to the large person group." + } + } + } +} \ No newline at end of file diff --git a/specification/cognitiveservices/data-plane/Face/stable/v1.0/examples/GetLargePersonGroupPersistedFace.json b/specification/cognitiveservices/data-plane/Face/stable/v1.0/examples/GetLargePersonGroupPersistedFace.json new file mode 100644 index 000000000000..a77f0aaa0fea --- /dev/null +++ b/specification/cognitiveservices/data-plane/Face/stable/v1.0/examples/GetLargePersonGroupPersistedFace.json @@ -0,0 +1,18 @@ +{ + "parameters": { + "AzureRegion": "westus", + "Content-Type": "application/json", + "Ocp-Apim-Subscription-Key": "{API key}", + "largePersonGroupId": "abc", + "personId": "foobar", + "persistedFaceId": "asd" + }, + "responses": { + "200": { + "body": { + "persistedFaceId": "015839fb-fbd9-4f79-ace9-7675fc2f1dd9", + "userData": "User-provided data attached to the person face." + } + } + } +} \ No newline at end of file diff --git a/specification/cognitiveservices/data-plane/Face/stable/v1.0/examples/GetLargePersonGroupPerson.json b/specification/cognitiveservices/data-plane/Face/stable/v1.0/examples/GetLargePersonGroupPerson.json new file mode 100644 index 000000000000..e50117aaf74e --- /dev/null +++ b/specification/cognitiveservices/data-plane/Face/stable/v1.0/examples/GetLargePersonGroupPerson.json @@ -0,0 +1,23 @@ +{ + "parameters": { + "AzureRegion": "westus", + "Content-Type": "application/json", + "Ocp-Apim-Subscription-Key": "{API key}", + "largePersonGroupId": "abc", + "personId": "25985303-c537-4467-b41d-bdb45cd95ca1" + }, + "responses": { + "200": { + "body": { + "personId": "25985303-c537-4467-b41d-bdb45cd95ca1", + "persistedFaceIds": [ + "015839fb-fbd9-4f79-ace9-7675fc2f1dd9", + "fce92aed-d578-4d2e-8114-068f8af4492e", + "b64d5e15-8257-4af2-b20a-5a750f8940e7" + ], + "name": "person-name", + "userData": "User-provided data attached to the person" + } + } + } +} \ No newline at end of file diff --git a/specification/cognitiveservices/data-plane/Face/stable/v1.0/examples/GetLargePersonGroupTrainingStatus.json b/specification/cognitiveservices/data-plane/Face/stable/v1.0/examples/GetLargePersonGroupTrainingStatus.json new file mode 100644 index 000000000000..6f7fc595313b --- /dev/null +++ b/specification/cognitiveservices/data-plane/Face/stable/v1.0/examples/GetLargePersonGroupTrainingStatus.json @@ -0,0 +1,19 @@ +{ + "parameters": { + "AzureRegion": "westus", + "Content-Type": "application/json", + "Ocp-Apim-Subscription-Key": "{API key}", + "largePersonGroupId": "abc" + }, + "responses": { + "200": { + "body": { + "status": "succeeded", + "createdDateTime": "2017-12-21T12:57:27.00Z", + "lastActionDateTime": "2017-12-21T12:57:30.00Z", + "lastSuccessfulTrainingDateTime": "2017-12-21T12:57:30.00Z", + "message": null + } + } + } +} \ No newline at end of file diff --git a/specification/cognitiveservices/data-plane/Face/stable/v1.0/examples/GetLargePersonGroups.json b/specification/cognitiveservices/data-plane/Face/stable/v1.0/examples/GetLargePersonGroups.json new file mode 100644 index 000000000000..105b86f11f5e --- /dev/null +++ b/specification/cognitiveservices/data-plane/Face/stable/v1.0/examples/GetLargePersonGroups.json @@ -0,0 +1,24 @@ +{ + "parameters": { + "AzureRegion": "westus", + "Ocp-Apim-Subscription-Key": "{API key}", + "start": "sample_group", + "top": 2 + }, + "responses": { + "200": { + "body": [ + { + "largePersonGroupId": "f92f6f1b-3258-4444-8fa2-c2df505cc7ac", + "name": "large-person-group-name1", + "userData": "User-provided data attached to the large person group" + }, + { + "largePersonGroupId": "c76f7f13-0ed3-4d00-8a3e-2ad3d78f6c37", + "name": "large-person-group-name2", + "userData": "User-provided data attached to the large person group" + } + ] + } + } +} \ No newline at end of file diff --git a/specification/cognitiveservices/data-plane/Face/stable/v1.0/examples/GetPersistedFace.json b/specification/cognitiveservices/data-plane/Face/stable/v1.0/examples/GetPersonGroupPersistedFace.json similarity index 83% rename from specification/cognitiveservices/data-plane/Face/stable/v1.0/examples/GetPersistedFace.json rename to specification/cognitiveservices/data-plane/Face/stable/v1.0/examples/GetPersonGroupPersistedFace.json index c49f72e8b020..94b206439c79 100644 --- a/specification/cognitiveservices/data-plane/Face/stable/v1.0/examples/GetPersistedFace.json +++ b/specification/cognitiveservices/data-plane/Face/stable/v1.0/examples/GetPersonGroupPersistedFace.json @@ -11,7 +11,7 @@ "200": { "body": { "persistedFaceId": "015839fb-fbd9-4f79-ace9-7675fc2f1dd9", - "userData": "User-provided data attached to the person" + "userData": "User-provided data attached to the person face." } } } diff --git a/specification/cognitiveservices/data-plane/Face/stable/v1.0/examples/GetPerson.json b/specification/cognitiveservices/data-plane/Face/stable/v1.0/examples/GetPersonGroupPerson.json similarity index 100% rename from specification/cognitiveservices/data-plane/Face/stable/v1.0/examples/GetPerson.json rename to specification/cognitiveservices/data-plane/Face/stable/v1.0/examples/GetPersonGroupPerson.json diff --git a/specification/cognitiveservices/data-plane/Face/stable/v1.0/examples/GetTrainingStatus.json b/specification/cognitiveservices/data-plane/Face/stable/v1.0/examples/GetPersonGroupTrainingStatus.json similarity index 66% rename from specification/cognitiveservices/data-plane/Face/stable/v1.0/examples/GetTrainingStatus.json rename to specification/cognitiveservices/data-plane/Face/stable/v1.0/examples/GetPersonGroupTrainingStatus.json index 6bcf8f242c89..2a674b0ea04f 100644 --- a/specification/cognitiveservices/data-plane/Face/stable/v1.0/examples/GetTrainingStatus.json +++ b/specification/cognitiveservices/data-plane/Face/stable/v1.0/examples/GetPersonGroupTrainingStatus.json @@ -9,7 +9,9 @@ "200": { "body": { "status": "succeeded", - "createdDateTime": "2017-08-01T00:00:00.00Z" + "createdDateTime": "2017-12-21T12:57:27.00Z", + "lastActionDateTime": "2017-12-21T12:57:30.00Z", + "message": null } } } diff --git a/specification/cognitiveservices/data-plane/Face/stable/v1.0/examples/ListLargePersonGroupPersons.json b/specification/cognitiveservices/data-plane/Face/stable/v1.0/examples/ListLargePersonGroupPersons.json new file mode 100644 index 000000000000..b0429b184dff --- /dev/null +++ b/specification/cognitiveservices/data-plane/Face/stable/v1.0/examples/ListLargePersonGroupPersons.json @@ -0,0 +1,35 @@ +{ + "parameters": { + "AzureRegion": "westus", + "Content-Type": "application/json", + "Ocp-Apim-Subscription-Key": "{API key}", + "largePersonGroupId": "abc", + "start": "25985303-c537-4467-b41d-bdb45cd95ca1", + "top": 2 + }, + "responses": { + "200": { + "body": [ + { + "personId": "25985303-c537-4467-b41d-bdb45cd95ca1", + "name": "person-name1", + "userData": "User-provided data attached to the person", + "persistedFaceIds": [ + "015839fb-fbd9-4f79-ace9-7675fc2f1dd9", + "fce92aed-d578-4d2e-8114-068f8af4492e", + "b64d5e15-8257-4af2-b20a-5a750f8940e7" + ] + }, + { + "personId": "2ae4935b-9659-44c3-977f-61fac20d0538", + "name": "person-name2", + "userData": "User-provided data attached to the person", + "persistedFaceIds": [ + "30ea1073-cc9e-4652-b1e3-d08fb7b95315", + "fbd2a038-dbff-452c-8e79-2ee81b1aa84e" + ] + } + ] + } + } +} \ No newline at end of file diff --git a/specification/cognitiveservices/data-plane/Face/stable/v1.0/examples/QueueLargePersonGroupTraining.json b/specification/cognitiveservices/data-plane/Face/stable/v1.0/examples/QueueLargePersonGroupTraining.json new file mode 100644 index 000000000000..cc4509753a74 --- /dev/null +++ b/specification/cognitiveservices/data-plane/Face/stable/v1.0/examples/QueueLargePersonGroupTraining.json @@ -0,0 +1,13 @@ +{ + "parameters": { + "AzureRegion": "westus", + "Content-Type": "application/json", + "Ocp-Apim-Subscription-Key": "{API key}", + "largePersonGroupId": "abc" + }, + "responses": { + "202": { + "body": "" + } + } +} \ No newline at end of file diff --git a/specification/cognitiveservices/data-plane/Face/stable/v1.0/examples/QueueTraining.json b/specification/cognitiveservices/data-plane/Face/stable/v1.0/examples/QueuePersonGroupTraining.json similarity index 100% rename from specification/cognitiveservices/data-plane/Face/stable/v1.0/examples/QueueTraining.json rename to specification/cognitiveservices/data-plane/Face/stable/v1.0/examples/QueuePersonGroupTraining.json diff --git a/specification/cognitiveservices/data-plane/Face/stable/v1.0/examples/UpdateLargePersonGroup.json b/specification/cognitiveservices/data-plane/Face/stable/v1.0/examples/UpdateLargePersonGroup.json new file mode 100644 index 000000000000..e03f55e9fd6f --- /dev/null +++ b/specification/cognitiveservices/data-plane/Face/stable/v1.0/examples/UpdateLargePersonGroup.json @@ -0,0 +1,17 @@ +{ + "parameters": { + "AzureRegion": "westus", + "Content-Type": "application/json", + "Ocp-Apim-Subscription-Key": "{API key}", + "largePersonGroupId": "abc", + "body": { + "name": "group1", + "userData": "user-provided data attached to the large person group" + } + }, + "responses": { + "200": { + "body": "" + } + } +} \ No newline at end of file diff --git a/specification/cognitiveservices/data-plane/Face/stable/v1.0/examples/UpdateLargePersonGroupPerson.json b/specification/cognitiveservices/data-plane/Face/stable/v1.0/examples/UpdateLargePersonGroupPerson.json new file mode 100644 index 000000000000..3ea949937edf --- /dev/null +++ b/specification/cognitiveservices/data-plane/Face/stable/v1.0/examples/UpdateLargePersonGroupPerson.json @@ -0,0 +1,18 @@ +{ + "parameters": { + "AzureRegion": "westus", + "Content-Type": "application/json", + "Ocp-Apim-Subscription-Key": "{API key}", + "largePersonGroupId": "abc", + "personId": "25985303-c537-4467-b41d-bdb45cd95ca1", + "body": { + "name": "mike", + "userData": "{additional data associated with mike}" + } + }, + "responses": { + "200": { + "body": "" + } + } +} \ No newline at end of file diff --git a/specification/cognitiveservices/data-plane/Face/stable/v1.0/examples/UpdateLargePersonGroupPersonFace.json b/specification/cognitiveservices/data-plane/Face/stable/v1.0/examples/UpdateLargePersonGroupPersonFace.json new file mode 100644 index 000000000000..b882fda804e3 --- /dev/null +++ b/specification/cognitiveservices/data-plane/Face/stable/v1.0/examples/UpdateLargePersonGroupPersonFace.json @@ -0,0 +1,18 @@ +{ + "parameters": { + "AzureRegion": "westus", + "Content-Type": "application/json", + "Ocp-Apim-Subscription-Key": "{API key}", + "largePersonGroupId": "abc", + "personId": "25985303-c537-4467-b41d-bdb45cd95ca1", + "persistedFaceId": "62004fa7-1ac0-478e-9d5a-b38f9e7fbc68", + "body": { + "userData": "User-provided data attached to the face." + } + }, + "responses": { + "200": { + "body": "" + } + } +} \ No newline at end of file diff --git a/specification/cognitiveservices/data-plane/Face/stable/v1.0/examples/UpdatePerson.json b/specification/cognitiveservices/data-plane/Face/stable/v1.0/examples/UpdatePersonGroupPerson.json similarity index 100% rename from specification/cognitiveservices/data-plane/Face/stable/v1.0/examples/UpdatePerson.json rename to specification/cognitiveservices/data-plane/Face/stable/v1.0/examples/UpdatePersonGroupPerson.json diff --git a/specification/cognitiveservices/data-plane/Face/stable/v1.0/examples/UpdatePersonFace.json b/specification/cognitiveservices/data-plane/Face/stable/v1.0/examples/UpdatePersonGroupPersonFace.json similarity index 100% rename from specification/cognitiveservices/data-plane/Face/stable/v1.0/examples/UpdatePersonFace.json rename to specification/cognitiveservices/data-plane/Face/stable/v1.0/examples/UpdatePersonGroupPersonFace.json From ef9df823653a0772892aab20eec35d199ba5cec1 Mon Sep 17 00:00:00 2001 From: Siqi Liu Date: Tue, 24 Jul 2018 21:08:44 +0800 Subject: [PATCH 02/16] Add large face list management. --- .../data-plane/Face/stable/v1.0/Face.json | 234 ++++++++++++++++++ .../v1.0/examples/CreateNewLargeFaceList.json | 17 ++ .../v1.0/examples/DeleteLargeFaceList.json | 13 + .../examples/DeleteLargeFaceListFace.json | 14 ++ .../v1.0/examples/GetLargeFaceList.json | 17 ++ .../v1.0/examples/GetLargeFaceLists.json | 22 ++ .../v1.0/examples/UpdateLargeFaceList.json | 17 ++ 7 files changed, 334 insertions(+) create mode 100644 specification/cognitiveservices/data-plane/Face/stable/v1.0/examples/CreateNewLargeFaceList.json create mode 100644 specification/cognitiveservices/data-plane/Face/stable/v1.0/examples/DeleteLargeFaceList.json create mode 100644 specification/cognitiveservices/data-plane/Face/stable/v1.0/examples/DeleteLargeFaceListFace.json create mode 100644 specification/cognitiveservices/data-plane/Face/stable/v1.0/examples/GetLargeFaceList.json create mode 100644 specification/cognitiveservices/data-plane/Face/stable/v1.0/examples/GetLargeFaceLists.json create mode 100644 specification/cognitiveservices/data-plane/Face/stable/v1.0/examples/UpdateLargeFaceList.json diff --git a/specification/cognitiveservices/data-plane/Face/stable/v1.0/Face.json b/specification/cognitiveservices/data-plane/Face/stable/v1.0/Face.json index 46791c387eac..6fb6064c8565 100644 --- a/specification/cognitiveservices/data-plane/Face/stable/v1.0/Face.json +++ b/specification/cognitiveservices/data-plane/Face/stable/v1.0/Face.json @@ -1654,6 +1654,202 @@ } } } + }, + "/largefacelists/{largeFaceListId}": { + "put": { + "description": "Create an empty large face list. Up to 64 large face lists are allowed to exist in one subscription.", + "operationId": "LargeFaceList_Create", + "parameters": [ + { + "$ref": "#/parameters/largeFaceListId" + }, + { + "name": "body", + "description": "Request body for creating a large face list.", + "in": "body", + "required": true, + "x-ms-client-flatten": true, + "schema": { + "$ref": "#/definitions/NameAndUserDataContract" + } + } + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "responses": { + "200": { + "description": "A successful call returns an empty response body." + }, + "default": { + "description": "Error response.", + "schema": { + "$ref": "#/definitions/APIError" + } + } + }, + "x-ms-examples": { + "Create new large face list example": { + "$ref": "./examples/CreateNewLargeFaceList.json" + } + } + }, + "get": { + "description": "Retrieve a large face list's information.", + "operationId": "LargeFaceList_Get", + "parameters": [ + { + "$ref": "#/parameters/largeFaceListId" + } + ], + "produces": [ + "application/json" + ], + "responses": { + "200": { + "description": "A successful call returns the large face list's information.", + "schema": { + "$ref": "#/definitions/LargeFaceList" + } + }, + "default": { + "description": "Error response.", + "schema": { + "$ref": "#/definitions/APIError" + } + } + }, + "x-ms-examples": { + "Get large face list example": { + "$ref": "./examples/GetLargeFaceList.json" + } + } + }, + "patch": { + "description": "Update information of a large face list.", + "operationId": "LargeFaceList_Update", + "parameters": [ + { + "$ref": "#/parameters/largeFaceListId" + }, + { + "name": "body", + "description": "Request body for updating a large face list.", + "in": "body", + "required": true, + "x-ms-client-flatten": true, + "schema": { + "$ref": "#/definitions/NameAndUserDataContract" + } + } + ], + "consumes": [ + "application/json" + ], + "responses": { + "200": { + "description": "A successful call returns an empty response body." + }, + "default": { + "description": "Error response.", + "schema": { + "$ref": "#/definitions/APIError" + } + } + }, + "x-ms-examples": { + "Update large face list example": { + "$ref": "./examples/UpdateLargeFaceList.json" + } + } + }, + "delete": { + "description": "Delete an existing large face list according to faceListId. Persisted face images in the large face list will also be deleted.", + "operationId": "LargeFaceList_Delete", + "parameters": [ + { + "$ref": "#/parameters/largeFaceListId" + } + ], + "responses": { + "200": { + "description": "A successful call returns an empty response body." + }, + "default": { + "description": "Error response.", + "schema": { + "$ref": "#/definitions/APIError" + } + } + }, + "x-ms-examples": { + "Delete large face list example": { + "$ref": "./examples/DeleteLargeFaceList.json" + } + } + } + }, + "/largefacelists": { + "get": { + "description": "Retrieve information about all existing large face lists. Only largeFaceListId, name and userData will be returned.", + "operationId": "LargeFaceList_List", + "parameters": [], + "responses": { + "200": { + "description": "A successful call returns an array of largeFaceList.", + "schema": { + "$ref": "#/definitions/LargeFaceLists" + } + }, + "default": { + "description": "Error response.", + "schema": { + "$ref": "#/definitions/APIError" + } + } + }, + "produces": [ + "application/json" + ], + "x-ms-examples": { + "Get large face lists example": { + "$ref": "./examples/GetLargeFaceLists.json" + } + } + } + }, + "/largefacelists/{largeFaceListId}/persistedFaces/{persistedFaceId}": { + "delete": { + "description": "Delete an existing face from a large face list (given by a persisitedFaceId and a largeFaceListId). Persisted image related to the face will also be deleted.", + "operationId": "LargeFaceList_DeleteFace", + "parameters": [ + { + "$ref": "#/parameters/largeFaceListId" + }, + { + "$ref": "#/parameters/persistedFaceId" + } + ], + "responses": { + "200": { + "description": "A successful call returns an empty response body." + }, + "default": { + "description": "Error response.", + "schema": { + "$ref": "#/definitions/APIError" + } + } + }, + "x-ms-examples": { + "Delete face in large face list example": { + "$ref": "./examples/DeleteLargeFaceListFace.json" + } + } + } } }, "x-ms-paths": { @@ -2781,6 +2977,33 @@ } } }, + "LargeFaceList": { + "description": "Large face list object.", + "type": "object", + "required": [ + "largeFaceListId" + ], + "properties": { + "largeFaceListId": { + "type": "string", + "description": "LargeFaceListId of the target large face list.", + "maxLength": 64, + "pattern": "^[a-z0-9-_]+$" + } + }, + "allOf": [ + { + "$ref": "#/definitions/NameAndUserDataContract" + } + ] + }, + "LargeFaceLists": { + "type": "array", + "description": "An array of large face list results, with fields of largeFaceListId, name and userData", + "items": { + "$ref": "#/definitions/LargeFaceList" + } + }, "LargePersonGroup": { "type": "object", "required": [ @@ -2976,6 +3199,17 @@ "maxLength": 64, "pattern": "^[a-z0-9-_]+$" }, + "largeFaceListId": { + "name": "largeFaceListId", + "in": "path", + "description": "Id referencing a particular large face list.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method", + "collectionFormat": "csv", + "maxLength": 64, + "pattern": "^[a-z0-9-_]+$" + }, "largePersonGroupId": { "name": "largePersonGroupId", "in": "path", diff --git a/specification/cognitiveservices/data-plane/Face/stable/v1.0/examples/CreateNewLargeFaceList.json b/specification/cognitiveservices/data-plane/Face/stable/v1.0/examples/CreateNewLargeFaceList.json new file mode 100644 index 000000000000..08a5ac8b981e --- /dev/null +++ b/specification/cognitiveservices/data-plane/Face/stable/v1.0/examples/CreateNewLargeFaceList.json @@ -0,0 +1,17 @@ +{ + "parameters": { + "AzureRegion": "westus", + "Content-Type": "application/json", + "Ocp-Apim-Subscription-Key": "{API key}", + "largeFaceListId": "sample_face_list", + "body": { + "name": "large-face-list-name", + "userData": "User-provided data attached to the large face list." + } + }, + "responses": { + "200": { + "body": "" + } + } +} \ No newline at end of file diff --git a/specification/cognitiveservices/data-plane/Face/stable/v1.0/examples/DeleteLargeFaceList.json b/specification/cognitiveservices/data-plane/Face/stable/v1.0/examples/DeleteLargeFaceList.json new file mode 100644 index 000000000000..934daebdc386 --- /dev/null +++ b/specification/cognitiveservices/data-plane/Face/stable/v1.0/examples/DeleteLargeFaceList.json @@ -0,0 +1,13 @@ +{ + "parameters": { + "AzureRegion": "westus", + "Content-Type": "application/json", + "Ocp-Apim-Subscription-Key": "{API key}", + "largeFaceListId": "sample_face_list" + }, + "responses": { + "200": { + "body": "" + } + } +} \ No newline at end of file diff --git a/specification/cognitiveservices/data-plane/Face/stable/v1.0/examples/DeleteLargeFaceListFace.json b/specification/cognitiveservices/data-plane/Face/stable/v1.0/examples/DeleteLargeFaceListFace.json new file mode 100644 index 000000000000..48012d55757d --- /dev/null +++ b/specification/cognitiveservices/data-plane/Face/stable/v1.0/examples/DeleteLargeFaceListFace.json @@ -0,0 +1,14 @@ +{ + "parameters": { + "AzureRegion": "westus", + "Content-Type": "application/json", + "Ocp-Apim-Subscription-Key": "{API key}", + "largeFaceListId": "sample_face_list", + "persistedFaceId":"62004fa7-1ac0-478e-9d5a-b38f9e7fbc68" + }, + "responses": { + "200": { + "body": "" + } + } +} \ No newline at end of file diff --git a/specification/cognitiveservices/data-plane/Face/stable/v1.0/examples/GetLargeFaceList.json b/specification/cognitiveservices/data-plane/Face/stable/v1.0/examples/GetLargeFaceList.json new file mode 100644 index 000000000000..14de86901093 --- /dev/null +++ b/specification/cognitiveservices/data-plane/Face/stable/v1.0/examples/GetLargeFaceList.json @@ -0,0 +1,17 @@ +{ + "parameters": { + "AzureRegion": "westus", + "Content-Type": "application/json", + "Ocp-Apim-Subscription-Key": "{API key}", + "largeFaceListId": "f92f6f1b-3258-4444-8fa2-c2df505cc7ac" + }, + "responses": { + "200": { + "body": { + "largeFaceListId": "f92f6f1b-3258-4444-8fa2-c2df505cc7ac", + "name": "large-face-list-name", + "userData": "User-provided data attached to the large face list." + } + } + } +} \ No newline at end of file diff --git a/specification/cognitiveservices/data-plane/Face/stable/v1.0/examples/GetLargeFaceLists.json b/specification/cognitiveservices/data-plane/Face/stable/v1.0/examples/GetLargeFaceLists.json new file mode 100644 index 000000000000..432172a393a3 --- /dev/null +++ b/specification/cognitiveservices/data-plane/Face/stable/v1.0/examples/GetLargeFaceLists.json @@ -0,0 +1,22 @@ +{ + "parameters": { + "AzureRegion": "westus", + "Ocp-Apim-Subscription-Key": "{API key}" + }, + "responses": { + "200": { + "body": [ + { + "largeFaceListId": "f92f6f1b-3258-4444-8fa2-c2df505cc7ac", + "name": "large-face-list-name1", + "userData": "User-provided data attached to the large face list." + }, + { + "largeFaceListId": "c76f7f13-0ed3-4d00-8a3e-2ad3d78f6c37", + "name": "large-face-list-name2", + "userData": "User-provided data attached to the large face list." + } + ] + } + } +} \ No newline at end of file diff --git a/specification/cognitiveservices/data-plane/Face/stable/v1.0/examples/UpdateLargeFaceList.json b/specification/cognitiveservices/data-plane/Face/stable/v1.0/examples/UpdateLargeFaceList.json new file mode 100644 index 000000000000..08a5ac8b981e --- /dev/null +++ b/specification/cognitiveservices/data-plane/Face/stable/v1.0/examples/UpdateLargeFaceList.json @@ -0,0 +1,17 @@ +{ + "parameters": { + "AzureRegion": "westus", + "Content-Type": "application/json", + "Ocp-Apim-Subscription-Key": "{API key}", + "largeFaceListId": "sample_face_list", + "body": { + "name": "large-face-list-name", + "userData": "User-provided data attached to the large face list." + } + }, + "responses": { + "200": { + "body": "" + } + } +} \ No newline at end of file From 1ec410369ce7e7506e16e011f5c56bebab817c89 Mon Sep 17 00:00:00 2001 From: Siqi Liu Date: Tue, 24 Jul 2018 21:11:34 +0800 Subject: [PATCH 03/16] Nit --- .../cognitiveservices/data-plane/Face/stable/v1.0/Face.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/specification/cognitiveservices/data-plane/Face/stable/v1.0/Face.json b/specification/cognitiveservices/data-plane/Face/stable/v1.0/Face.json index 6fb6064c8565..627f8b981ca2 100644 --- a/specification/cognitiveservices/data-plane/Face/stable/v1.0/Face.json +++ b/specification/cognitiveservices/data-plane/Face/stable/v1.0/Face.json @@ -1034,7 +1034,7 @@ ], "responses": { "200": { - "description": "A successful call returns an array of face entries ranked by face rectangle size in descendingorder. An empty response indicates no faces detected.", + "description": "A successful call returns an array of face entries ranked by face rectangle size in descending order. An empty response indicates no faces detected.", "schema": { "$ref": "#/definitions/DetectedFaces" } @@ -1930,7 +1930,7 @@ ], "responses": { "200": { - "description": "A successful call returns an array of face entries ranked by face rectangle size in descendingorder. An empty response indicates no faces detected.", + "description": "A successful call returns an array of face entries ranked by face rectangle size in descending order. An empty response indicates no faces detected.", "schema": { "$ref": "#/definitions/DetectedFaces" } From cb6e38c41484eee4cf77f51ac2dd4122eb577e8c Mon Sep 17 00:00:00 2001 From: Siqi Liu Date: Tue, 24 Jul 2018 21:18:45 +0800 Subject: [PATCH 04/16] Add find similar with large face list. --- .../data-plane/Face/stable/v1.0/Face.json | 12 +++++++++--- .../Face/stable/v1.0/examples/FindSimilar.json | 2 +- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/specification/cognitiveservices/data-plane/Face/stable/v1.0/Face.json b/specification/cognitiveservices/data-plane/Face/stable/v1.0/Face.json index 627f8b981ca2..6a3e0f15c0db 100644 --- a/specification/cognitiveservices/data-plane/Face/stable/v1.0/Face.json +++ b/specification/cognitiveservices/data-plane/Face/stable/v1.0/Face.json @@ -29,7 +29,7 @@ "paths": { "/findsimilars": { "post": { - "description": "Given query face's faceId, find the similar-looking faces from a faceId array or a faceListId.", + "description": "Given query face's faceId, find the similar-looking faces from a faceId array, a face list or a large face list.", "operationId": "Face_FindSimilar", "parameters": [ { @@ -2599,13 +2599,19 @@ }, "faceListId": { "type": "string", - "description": "An existing user-specified unique candidate face list, created in Face List - Create a Face List. Face list contains a set of persistedFaceIds which are persisted and will never expire. Parameter faceListId and faceIds should not be provided at the same time", + "description": "An existing user-specified unique candidate face list, created in Face List - Create a Face List. Face list contains a set of persistedFaceIds which are persisted and will never expire. Parameter faceListId, largeFaceListId and faceIds should not be provided at the same time。", + "maxLength": 64, + "pattern": "^[a-z0-9-_]+$" + }, + "largeFaceListId": { + "type": "string", + "description": "An existing user-specified unique candidate large face list, created in LargeFaceList - Create. Large face list contains a set of persistedFaceIds which are persisted and will never expire. Parameter faceListId, largeFaceListId and faceIds should not be provided at the same time.", "maxLength": 64, "pattern": "^[a-z0-9-_]+$" }, "faceIds": { "type": "array", - "description": "An array of candidate faceIds. All of them are created by Face - Detect and the faceIds will expire 24 hours after the detection call.", + "description": "An array of candidate faceIds. All of them are created by Face - Detect and the faceIds will expire 24 hours after the detection call. The number of faceIds is limited to 1000. Parameter faceListId, largeFaceListId and faceIds should not be provided at the same time.", "maxItems": 1000, "items": { "type": "string", diff --git a/specification/cognitiveservices/data-plane/Face/stable/v1.0/examples/FindSimilar.json b/specification/cognitiveservices/data-plane/Face/stable/v1.0/examples/FindSimilar.json index 05a6e0b2437a..f8acd5058618 100644 --- a/specification/cognitiveservices/data-plane/Face/stable/v1.0/examples/FindSimilar.json +++ b/specification/cognitiveservices/data-plane/Face/stable/v1.0/examples/FindSimilar.json @@ -5,7 +5,7 @@ "Ocp-Apim-Subscription-Key": "{API key}", "body": { "faceId": "c5c24a82-6845-4031-9d5d-978df9175426", - "faceListId": "sample_list", + "largeFaceListId": "sample_list", "maxNumOfCandidatesReturned": 1, "mode": "matchPerson" } From 2206ad28d455e721a9f06c7d6702fae8bee8b67f Mon Sep 17 00:00:00 2001 From: Siqi Liu Date: Tue, 24 Jul 2018 21:26:50 +0800 Subject: [PATCH 05/16] Add identify with large person group. --- .../data-plane/Face/stable/v1.0/Face.json | 11 ++++++++--- .../Face/stable/v1.0/examples/Identify.json | 2 +- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/specification/cognitiveservices/data-plane/Face/stable/v1.0/Face.json b/specification/cognitiveservices/data-plane/Face/stable/v1.0/Face.json index 6a3e0f15c0db..5441a1fd754e 100644 --- a/specification/cognitiveservices/data-plane/Face/stable/v1.0/Face.json +++ b/specification/cognitiveservices/data-plane/Face/stable/v1.0/Face.json @@ -115,7 +115,7 @@ }, "/identify": { "post": { - "description": "Identify unknown faces from a person group.", + "description": "1-to-many identification to find the closest matches of the specific query person face from a person group or large person group.", "operationId": "Face_Identify", "parameters": [ { @@ -2722,13 +2722,18 @@ "IdentifyRequest": { "type": "object", "required": [ - "personGroupId", "faceIds" ], "description": "Request body for identify face operation.", "properties": { "personGroupId": { - "description": "PersonGroupId of the target person group, created by PersonGroups.Create", + "description": "PersonGroupId of the target person group, created by PersonGroup.Create. Parameter personGroupId and largePersonGroupId should not be provided at the same time.", + "type": "string", + "maxLength": 64, + "pattern": "^[a-z0-9-_]+$" + }, + "largePersonGroupId": { + "description": "LargePersonGroupId of the target large person group, created by LargePersonGroup.Create. Parameter personGroupId and largePersonGroupId should not be provided at the same time.", "type": "string", "maxLength": 64, "pattern": "^[a-z0-9-_]+$" diff --git a/specification/cognitiveservices/data-plane/Face/stable/v1.0/examples/Identify.json b/specification/cognitiveservices/data-plane/Face/stable/v1.0/examples/Identify.json index e43dc4273738..549d4660c789 100644 --- a/specification/cognitiveservices/data-plane/Face/stable/v1.0/examples/Identify.json +++ b/specification/cognitiveservices/data-plane/Face/stable/v1.0/examples/Identify.json @@ -4,7 +4,7 @@ "Content-Type": "application/json", "Ocp-Apim-Subscription-Key": "{API key}", "body": { - "personGroupId": "sample_group", + "largePersonGroupId": "sample_group", "faceIds": [ "c5c24a82-6845-4031-9d5d-978df9175426", "65d083d4-9447-47d1-af30-b626144bf0fb" From 6abd79f55befd6840fb6c6ea2b2e2742c65c0b83 Mon Sep 17 00:00:00 2001 From: Siqi Liu Date: Tue, 24 Jul 2018 21:37:17 +0800 Subject: [PATCH 06/16] Add verify with large person group. --- .../data-plane/Face/stable/v1.0/Face.json | 26 ++++++++++++------- .../v1.0/examples/VerifyFaceToPerson.json | 2 +- 2 files changed, 17 insertions(+), 11 deletions(-) diff --git a/specification/cognitiveservices/data-plane/Face/stable/v1.0/Face.json b/specification/cognitiveservices/data-plane/Face/stable/v1.0/Face.json index 5441a1fd754e..0f704beafe87 100644 --- a/specification/cognitiveservices/data-plane/Face/stable/v1.0/Face.json +++ b/specification/cognitiveservices/data-plane/Face/stable/v1.0/Face.json @@ -163,7 +163,7 @@ "parameters": [ { "name": "body", - "description": "Request body for verify operation.", + "description": "Request body for face to face verification.", "in": "body", "required": true, "x-ms-client-flatten": true, @@ -1853,14 +1853,14 @@ } }, "x-ms-paths": { - "/verify?overload=persongroup": { + "/verify?overload=person": { "post": { "description": "Verify whether two faces belong to a same person. Compares a face Id with a Person Id", "operationId": "Face_VerifyFaceToPerson", "parameters": [ { "name": "body", - "description": "Request body for verifying two faces in a person group", + "description": "Request body for face to person verification.", "in": "body", "required": true, "x-ms-client-flatten": true, @@ -2727,13 +2727,13 @@ "description": "Request body for identify face operation.", "properties": { "personGroupId": { - "description": "PersonGroupId of the target person group, created by PersonGroup.Create. Parameter personGroupId and largePersonGroupId should not be provided at the same time.", + "description": "PersonGroupId of the target person group, created by PersonGroup - Create. Parameter personGroupId and largePersonGroupId should not be provided at the same time.", "type": "string", "maxLength": 64, "pattern": "^[a-z0-9-_]+$" }, "largePersonGroupId": { - "description": "LargePersonGroupId of the target large person group, created by LargePersonGroup.Create. Parameter personGroupId and largePersonGroupId should not be provided at the same time.", + "description": "LargePersonGroupId of the target large person group, created by LargePersonGroup - Create. Parameter personGroupId and largePersonGroupId should not be provided at the same time.", "type": "string", "maxLength": 64, "pattern": "^[a-z0-9-_]+$" @@ -2815,15 +2815,21 @@ "personId", "personGroupId" ], - "description": "Request body for verify operation.", + "description": "Request body for face to person verification.", "properties": { "faceId": { "type": "string", "format": "uuid", - "description": "FaceId the face, comes from Face - Detect" + "description": "FaceId of the face, comes from Face - Detect" }, "personGroupId": { - "description": "Using existing personGroupId and personId for fast loading a specified person. personGroupId is created in Person Groups.Create.", + "description": "Using existing personGroupId and personId for fast loading a specified person. personGroupId is created in PersonGroup - Create. Parameter personGroupId and largePersonGroupId should not be provided at the same time.", + "type": "string", + "maxLength": 64, + "pattern": "^[a-z0-9-_]+$" + }, + "largePersonGroupId": { + "description": "Using existing largePersonGroupId and personId for fast loading a specified person. largePersonGroupId is created in LargePersonGroup - Create. Parameter personGroupId and largePersonGroupId should not be provided at the same time.", "type": "string", "maxLength": 64, "pattern": "^[a-z0-9-_]+$" @@ -2831,7 +2837,7 @@ "personId": { "type": "string", "format": "uuid", - "description": "Specify a certain person in a person group. personId is created in Persons.Create." + "description": "Specify a certain person in a person group or a large person group. personId is created in PersonGroup Person - Create or LargePersonGroup Person - Create." } } }, @@ -2841,7 +2847,7 @@ "faceId1", "faceId2" ], - "description": "Request body for verify operation.", + "description": "Request body for face to face verification.", "properties": { "faceId1": { "type": "string", diff --git a/specification/cognitiveservices/data-plane/Face/stable/v1.0/examples/VerifyFaceToPerson.json b/specification/cognitiveservices/data-plane/Face/stable/v1.0/examples/VerifyFaceToPerson.json index 040103bd7f39..647f725ec535 100644 --- a/specification/cognitiveservices/data-plane/Face/stable/v1.0/examples/VerifyFaceToPerson.json +++ b/specification/cognitiveservices/data-plane/Face/stable/v1.0/examples/VerifyFaceToPerson.json @@ -6,7 +6,7 @@ "body": { "faceId": "c5c24a82-6845-4031-9d5d-978df9175426", "personId": "815df99c-598f-4926-930a-a734b3fd651c", - "personGroupId": "sample_group" + "largePersonGroupId": "sample_group" } }, "responses": { From 0cf51f49085fb6e1584f824652dc7134ab80b57b Mon Sep 17 00:00:00 2001 From: Siqi Liu Date: Tue, 24 Jul 2018 22:13:07 +0800 Subject: [PATCH 07/16] Fix typo of training status. --- .../data-plane/Face/stable/v1.0/Face.json | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/specification/cognitiveservices/data-plane/Face/stable/v1.0/Face.json b/specification/cognitiveservices/data-plane/Face/stable/v1.0/Face.json index 0f704beafe87..4915e2d81388 100644 --- a/specification/cognitiveservices/data-plane/Face/stable/v1.0/Face.json +++ b/specification/cognitiveservices/data-plane/Face/stable/v1.0/Face.json @@ -3084,20 +3084,20 @@ "createdDateTime": { "type": "string", "format": "date-time", - "description": "A combined UTC date and time string that describes person group created time.", + "description": "A combined UTC date and time string that describes the created time of the person group or large person group.", "x-ms-client-name": "created" }, "lastActionDateTime": { "type": "string", "format": "date-time", - "description": "Person group last modify time in the UTC, could be null value when the person group is not successfully trained.", + "description": "A combined UTC date and time string that describes the last modify time of the person group or large person group, could be null value when the group is not successfully trained.", "x-ms-client-name": "lastAction" }, "lastSuccessfulTrainingDateTime": { "type": "string", "format": "date-time", - "description": "Person group last modify time in the UTC, could be null value when the person group is not successfully trained.", - "x-ms-client-name": "lastAction" + "description": "A combined UTC date and time string that describes the last successful training time of the person group or large person group.", + "x-ms-client-name": "lastSuccessfulTraining" }, "message": { "type": "string", From 9abe7f4a27ee5639cdcc99fcc609a846f04c0c67 Mon Sep 17 00:00:00 2001 From: Siqi Liu Date: Wed, 25 Jul 2018 13:04:24 +0800 Subject: [PATCH 08/16] Add missing adding face to large face list & large person group. --- .../data-plane/Face/stable/v1.0/Face.json | 190 +++++++++++++++++- .../AddLargeFaceListFaceFromStream.json | 23 +++ .../examples/AddLargeFaceListFaceFromUrl.json | 23 +++ ...dLargePersonGroupPersonFaceFromStream.json | 24 +++ .../AddLargePersonGroupPersonFaceFromUrl.json | 24 +++ ...> AddPersonGroupPersonFaceFromStream.json} | 0 ...n => AddPersonGroupPersonFaceFromUrl.json} | 0 7 files changed, 282 insertions(+), 2 deletions(-) create mode 100644 specification/cognitiveservices/data-plane/Face/stable/v1.0/examples/AddLargeFaceListFaceFromStream.json create mode 100644 specification/cognitiveservices/data-plane/Face/stable/v1.0/examples/AddLargeFaceListFaceFromUrl.json create mode 100644 specification/cognitiveservices/data-plane/Face/stable/v1.0/examples/AddLargePersonGroupPersonFaceFromStream.json create mode 100644 specification/cognitiveservices/data-plane/Face/stable/v1.0/examples/AddLargePersonGroupPersonFaceFromUrl.json rename specification/cognitiveservices/data-plane/Face/stable/v1.0/examples/{AddPersonFaceFromStream.json => AddPersonGroupPersonFaceFromStream.json} (100%) rename specification/cognitiveservices/data-plane/Face/stable/v1.0/examples/{AddPersonFaceFromUrl.json => AddPersonGroupPersonFaceFromUrl.json} (100%) diff --git a/specification/cognitiveservices/data-plane/Face/stable/v1.0/Face.json b/specification/cognitiveservices/data-plane/Face/stable/v1.0/Face.json index 4915e2d81388..5d73a966593f 100644 --- a/specification/cognitiveservices/data-plane/Face/stable/v1.0/Face.json +++ b/specification/cognitiveservices/data-plane/Face/stable/v1.0/Face.json @@ -995,7 +995,7 @@ }, "x-ms-examples": { "Add Person face example": { - "$ref": "./examples/AddPersonFaceFromUrl.json" + "$ref": "./examples/AddPersonGroupPersonFaceFromUrl.json" } } } @@ -1655,6 +1655,54 @@ } } }, + "/largepersongroups/{largePersonGroupId}/persons/{personId}/persistedFaces": { + "post": { + "description": "Add a representative face to a person for identification. The input face is specified as an image with a targetFace rectangle.", + "operationId": "LargePersonGroupPerson_AddPersonFaceFromUrl", + "parameters": [ + { + "$ref": "#/parameters/largePersonGroupId" + }, + { + "$ref": "#/parameters/personId" + }, + { + "$ref": "#/parameters/faceUserData" + }, + { + "$ref": "#/parameters/targetFace" + }, + { + "$ref": "../../../Common/Parameters.json#/parameters/ImageUrl" + } + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "responses": { + "200": { + "description": "A successful call returns the new persistedFaceId.", + "schema": { + "$ref": "#/definitions/PersistedFace" + } + }, + "default": { + "description": "Error response.", + "schema": { + "$ref": "#/definitions/APIError" + } + } + }, + "x-ms-examples": { + "Add Person face example": { + "$ref": "./examples/AddLargePersonGroupPersonFaceFromUrl.json" + } + } + } + }, "/largefacelists/{largeFaceListId}": { "put": { "description": "Create an empty large face list. Up to 64 large face lists are allowed to exist in one subscription.", @@ -1850,6 +1898,51 @@ } } } + }, + "/largefacelists/{largeFaceListId}/persistedFaces": { + "post": { + "description": "Add a face to a large face list. The input face is specified as an image with a targetFace rectangle. It returns a persistedFaceId representing the added face, and persistedFaceId will not expire.", + "operationId": "LargeFaceList_AddFaceFromUrl", + "parameters": [ + { + "$ref": "#/parameters/largeFaceListId" + }, + { + "$ref": "#/parameters/faceUserData" + }, + { + "$ref": "#/parameters/targetFace" + }, + { + "$ref": "../../../Common/Parameters.json#/parameters/ImageUrl" + } + ], + "produces": [ + "application/json" + ], + "consumes": [ + "application/json" + ], + "responses": { + "200": { + "description": "A successful call returns a new persistedFaceId.", + "schema": { + "$ref": "#/definitions/PersistedFace" + } + }, + "default": { + "description": "Error response.", + "schema": { + "$ref": "#/definitions/APIError" + } + } + }, + "x-ms-examples": { + "Create large face list face example": { + "$ref": "./examples/AddLargeFaceListFaceFromUrl.json" + } + } + } } }, "x-ms-paths": { @@ -1992,7 +2085,7 @@ }, "x-ms-examples": { "Add face to person with stream example": { - "$ref": "./examples/AddPersonFaceFromStream.json" + "$ref": "./examples/AddPersonGroupPersonFaceFromStream.json" } } } @@ -2041,6 +2134,99 @@ } } } + }, + "/largepersongroups/{largePersonGroupId}/persons/{personId}/persistedFaces?overload=stream": { + "post": { + "description": "Add a representative face to a person for identification. The input face is specified as an image with a targetFace rectangle.", + "operationId": "LargePersonGroupPerson_AddLargePersonGroupPersonFaceFromStream", + "parameters": [ + { + "$ref": "#/parameters/largePersonGroupId" + }, + { + "$ref": "#/parameters/personId" + }, + { + "$ref": "#/parameters/faceUserData" + }, + { + "$ref": "#/parameters/targetFace" + }, + { + "$ref": "../../../Common/Parameters.json#/parameters/ImageStream" + } + ], + "produces": [ + "application/json" + ], + "consumes": [ + "application/octet-stream" + ], + "responses": { + "200": { + "description": "A successful call returns the new persistedFaceId.", + "schema": { + "$ref": "#/definitions/PersistedFace" + } + }, + "default": { + "description": "Error response.", + "schema": { + "$ref": "#/definitions/APIError" + } + } + }, + "x-ms-examples": { + "Add face to person with stream example": { + "$ref": "./examples/AddLargePersonGroupPersonFaceFromStream.json" + } + } + } + }, + "/largefacelists/{largeFaceListId}/persistedFaces?overload=stream": { + "post": { + "description": "Add a face to a large face list. The input face is specified as an image with a targetFace rectangle. It returns a persistedFaceId representing the added face, and persistedFaceId will not expire.", + "operationId": "LargeFaceList_AddFaceFromStream", + "parameters": [ + { + "$ref": "#/parameters/largeFaceListId" + }, + { + "$ref": "#/parameters/faceUserData" + }, + { + "$ref": "#/parameters/targetFace" + }, + { + "$ref": "../../../Common/Parameters.json#/parameters/ImageStream" + } + ], + "consumes": [ + "application/octet-stream" + ], + "responses": { + "200": { + "description": "A successful call returns a new persistedFaceId.", + "schema": { + "$ref": "#/definitions/PersistedFace" + } + }, + "default": { + "description": "Error response.", + "schema": { + "$ref": "#/definitions/APIError" + } + } + }, + "produces": [ + "application/json" + ], + "x-ms-examples": { + "Add face to large face list from stream example": { + "$ref": "./examples/AddLargeFaceListFaceFromStream.json" + } + } + } } }, "definitions": { diff --git a/specification/cognitiveservices/data-plane/Face/stable/v1.0/examples/AddLargeFaceListFaceFromStream.json b/specification/cognitiveservices/data-plane/Face/stable/v1.0/examples/AddLargeFaceListFaceFromStream.json new file mode 100644 index 000000000000..9f164671eb43 --- /dev/null +++ b/specification/cognitiveservices/data-plane/Face/stable/v1.0/examples/AddLargeFaceListFaceFromStream.json @@ -0,0 +1,23 @@ +{ + "parameters": { + "AzureRegion": "westus", + "Content-Type": "application/octet-stream", + "Ocp-Apim-Subscription-Key": "{API key}", + "largeFaceListId": "sample_face_list", + "userData": "{Customized user data}", + "targetFace": [ + 10, + 10, + 100, + 100 + ], + "Image": "{Image stream in base 64 encoded format}" + }, + "responses": { + "200": { + "body": { + "persistedFaceId": "B8D802CF-DD8F-4E61-B15C-9E6C5844CCBA" + } + } + } +} \ No newline at end of file diff --git a/specification/cognitiveservices/data-plane/Face/stable/v1.0/examples/AddLargeFaceListFaceFromUrl.json b/specification/cognitiveservices/data-plane/Face/stable/v1.0/examples/AddLargeFaceListFaceFromUrl.json new file mode 100644 index 000000000000..735ec46180ec --- /dev/null +++ b/specification/cognitiveservices/data-plane/Face/stable/v1.0/examples/AddLargeFaceListFaceFromUrl.json @@ -0,0 +1,23 @@ +{ + "parameters": { + "AzureRegion": "westus", + "Content-Type": "application/json", + "Ocp-Apim-Subscription-Key": "{API key}", + "largeFaceListId": "sample_face_list", + "userData": "{Customized user data}", + "targetFace": [ + 10, + 10, + 100, + 100 + ], + "ImageUrl": "{Image url}" + }, + "responses": { + "200": { + "body": { + "persistedFaceId": "B8D802CF-DD8F-4E61-B15C-9E6C5844CCBA" + } + } + } +} \ No newline at end of file diff --git a/specification/cognitiveservices/data-plane/Face/stable/v1.0/examples/AddLargePersonGroupPersonFaceFromStream.json b/specification/cognitiveservices/data-plane/Face/stable/v1.0/examples/AddLargePersonGroupPersonFaceFromStream.json new file mode 100644 index 000000000000..bcf3d4b49b72 --- /dev/null +++ b/specification/cognitiveservices/data-plane/Face/stable/v1.0/examples/AddLargePersonGroupPersonFaceFromStream.json @@ -0,0 +1,24 @@ +{ + "parameters": { + "AzureRegion": "westus", + "Content-Type": "application/octet-stream", + "Ocp-Apim-Subscription-Key": "{API key}", + "largePersonGroupId": "abc", + "personId": "4caa25ee-3bc6-4e88-adf8-12455ce7aab0", + "userData": "{customized User data}", + "targetFace": [ + 10, + 10, + 100, + 100 + ], + "Image": "{Image stream in base 64 encoded format}" + }, + "responses": { + "200": { + "body": { + "persistedFaceId": "6e04c175-219e-42a2-9d26-0e7b790e1ef4" + } + } + } +} \ No newline at end of file diff --git a/specification/cognitiveservices/data-plane/Face/stable/v1.0/examples/AddLargePersonGroupPersonFaceFromUrl.json b/specification/cognitiveservices/data-plane/Face/stable/v1.0/examples/AddLargePersonGroupPersonFaceFromUrl.json new file mode 100644 index 000000000000..2ec1c6899627 --- /dev/null +++ b/specification/cognitiveservices/data-plane/Face/stable/v1.0/examples/AddLargePersonGroupPersonFaceFromUrl.json @@ -0,0 +1,24 @@ +{ + "parameters": { + "AzureRegion": "westus", + "Content-Type": "application/json", + "Ocp-Apim-Subscription-Key": "{API key}", + "largePersonGroupId": "abc", + "personId": "4caa25ee-3bc6-4e88-adf8-12455ce7aab0", + "userData": "{customized User data}", + "targetFace": [ + 10, + 10, + 100, + 100 + ], + "ImageUrl": "{Image url}" + }, + "responses": { + "200": { + "body": { + "persistedFaceId": "6e04c175-219e-42a2-9d26-0e7b790e1ef4" + } + } + } +} \ No newline at end of file diff --git a/specification/cognitiveservices/data-plane/Face/stable/v1.0/examples/AddPersonFaceFromStream.json b/specification/cognitiveservices/data-plane/Face/stable/v1.0/examples/AddPersonGroupPersonFaceFromStream.json similarity index 100% rename from specification/cognitiveservices/data-plane/Face/stable/v1.0/examples/AddPersonFaceFromStream.json rename to specification/cognitiveservices/data-plane/Face/stable/v1.0/examples/AddPersonGroupPersonFaceFromStream.json diff --git a/specification/cognitiveservices/data-plane/Face/stable/v1.0/examples/AddPersonFaceFromUrl.json b/specification/cognitiveservices/data-plane/Face/stable/v1.0/examples/AddPersonGroupPersonFaceFromUrl.json similarity index 100% rename from specification/cognitiveservices/data-plane/Face/stable/v1.0/examples/AddPersonFaceFromUrl.json rename to specification/cognitiveservices/data-plane/Face/stable/v1.0/examples/AddPersonGroupPersonFaceFromUrl.json From 663d5adec5986657877a25e4d7fac2c5047649a8 Mon Sep 17 00:00:00 2001 From: Siqi Liu Date: Wed, 25 Jul 2018 14:17:50 +0800 Subject: [PATCH 09/16] Add missing large face list face operations. --- .../data-plane/Face/stable/v1.0/Face.json | 213 +++++++++++++++++- .../GetLargeFaceListPersistedFace.json | 17 ++ .../GetLargeFaceListTrainingStatus.json | 19 ++ .../GetLargePersonGroupPersistedFace.json | 4 +- .../v1.0/examples/ListLargeFaceListFaces.json | 24 ++ .../examples/QueueLargeFaceListTraining.json | 13 ++ .../examples/UpdateLargeFaceListFace.json | 17 ++ 7 files changed, 293 insertions(+), 14 deletions(-) create mode 100644 specification/cognitiveservices/data-plane/Face/stable/v1.0/examples/GetLargeFaceListPersistedFace.json create mode 100644 specification/cognitiveservices/data-plane/Face/stable/v1.0/examples/GetLargeFaceListTrainingStatus.json create mode 100644 specification/cognitiveservices/data-plane/Face/stable/v1.0/examples/ListLargeFaceListFaces.json create mode 100644 specification/cognitiveservices/data-plane/Face/stable/v1.0/examples/QueueLargeFaceListTraining.json create mode 100644 specification/cognitiveservices/data-plane/Face/stable/v1.0/examples/UpdateLargeFaceListFace.json diff --git a/specification/cognitiveservices/data-plane/Face/stable/v1.0/Face.json b/specification/cognitiveservices/data-plane/Face/stable/v1.0/Face.json index 5d73a966593f..c5c7de2a1143 100644 --- a/specification/cognitiveservices/data-plane/Face/stable/v1.0/Face.json +++ b/specification/cognitiveservices/data-plane/Face/stable/v1.0/Face.json @@ -486,7 +486,7 @@ "required": true, "x-ms-client-flatten": true, "schema": { - "$ref": "#/definitions/UpdatePersonFaceRequest" + "$ref": "#/definitions/UpdateFaceRequest" } } ], @@ -1385,7 +1385,7 @@ "required": true, "x-ms-client-flatten": true, "schema": { - "$ref": "#/definitions/UpdatePersonFaceRequest" + "$ref": "#/definitions/UpdateFaceRequest" } } ], @@ -1840,6 +1840,39 @@ } } }, + "/largefacelists/{largeFaceListId}/training": { + "get": { + "description": "Retrieve the training status of a large face list (completed or ongoing).", + "operationId": "LargeFaceList_GetTrainingStatus", + "parameters": [ + { + "$ref": "#/parameters/largeFaceListId" + } + ], + "responses": { + "200": { + "description": "A successful call returns the large face list's training status.", + "schema": { + "$ref": "#/definitions/TrainingStatus" + } + }, + "default": { + "description": "Error response.", + "schema": { + "$ref": "#/definitions/APIError" + } + } + }, + "produces": [ + "application/json" + ], + "x-ms-examples": { + "Get large face list's training status example": { + "$ref": "./examples/GetLargeFaceListTrainingStatus.json" + } + } + } + }, "/largefacelists": { "get": { "description": "Retrieve information about all existing large face lists. Only largeFaceListId, name and userData will be returned.", @@ -1869,6 +1902,36 @@ } } }, + "/largefacelists/{largeFaceListId}/train": { + "post": { + "description": "Queue a large face list training task, the training task may not be started immediately.", + "operationId": "LargeFaceList_Train", + "parameters": [ + { + "$ref": "#/parameters/largeFaceListId" + } + ], + "produces": [ + "application/json" + ], + "responses": { + "202": { + "description": "The training task was queued successfully." + }, + "default": { + "description": "Error response.", + "schema": { + "$ref": "#/definitions/APIError" + } + } + }, + "x-ms-examples": { + "Queue large face list training": { + "$ref": "./examples/QueueLargeFaceListTraining.json" + } + } + } + }, "/largefacelists/{largeFaceListId}/persistedFaces/{persistedFaceId}": { "delete": { "description": "Delete an existing face from a large face list (given by a persisitedFaceId and a largeFaceListId). Persisted image related to the face will also be deleted.", @@ -1897,6 +1960,81 @@ "$ref": "./examples/DeleteLargeFaceListFace.json" } } + }, + "get": { + "description": "Retrieve information about a persisted face (specified by persistedFaceId and its belonging largeFaceListId).", + "operationId": "LargeFaceList_GetFace", + "parameters": [ + { + "$ref": "#/parameters/largeFaceListId" + }, + { + "$ref": "#/parameters/persistedFaceId" + } + ], + "produces": [ + "application/json" + ], + "responses": { + "200": { + "description": "A successful call returns target persisted face's information (persistedFaceId and userData).", + "schema": { + "$ref": "#/definitions/PersistedFace" + } + }, + "default": { + "description": "Error response.", + "schema": { + "$ref": "#/definitions/APIError" + } + } + }, + "x-ms-examples": { + "Get persisted face example": { + "$ref": "./examples/GetLargeFaceListPersistedFace.json" + } + } + }, + "patch": { + "description": "Update a persisted face's userData field.", + "operationId": "LargeFaceList_UpdateFace", + "parameters": [ + { + "$ref": "#/parameters/largeFaceListId" + }, + { + "$ref": "#/parameters/persistedFaceId" + }, + { + "name": "body", + "description": "Request body for updating persisted face.", + "in": "body", + "required": true, + "x-ms-client-flatten": true, + "schema": { + "$ref": "#/definitions/UpdateFaceRequest" + } + } + ], + "consumes": [ + "application/json" + ], + "responses": { + "200": { + "description": "A successful call returns an empty response body." + }, + "default": { + "description": "Error response.", + "schema": { + "$ref": "#/definitions/APIError" + } + } + }, + "x-ms-examples": { + "Update face example": { + "$ref": "./examples/UpdateLargeFaceListFace.json" + } + } } }, "/largefacelists/{largeFaceListId}/persistedFaces": { @@ -1942,6 +2080,53 @@ "$ref": "./examples/AddLargeFaceListFaceFromUrl.json" } } + }, + "get": { + "description": "List all faces in a large face list, and retrieve face information (including userData and persistedFaceIds of registered faces of the face).", + "operationId": "LargeFaceListFace_List", + "parameters": [ + { + "$ref": "#/parameters/largeFaceListId" + }, + { + "name": "start", + "description": "Starting face id to return (used to list a range of faces).", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "top", + "description": "Number of faces to return starting with the face id indicated by the 'start' parameter.", + "in": "query", + "required": false, + "type": "integer", + "minimum": 1, + "maximum": 1000 + } + ], + "produces": [ + "application/json" + ], + "responses": { + "200": { + "description": "A successful call returns an array of face information that belong to the large face list.", + "schema": { + "$ref": "#/definitions/PersistedFaces" + } + }, + "default": { + "description": "Error response.", + "schema": { + "$ref": "#/definitions/APIError" + } + } + }, + "x-ms-examples": { + "List faces in large face list": { + "$ref": "./examples/ListLargeFaceListFaces.json" + } + } } } }, @@ -3079,11 +3264,8 @@ "pattern": "^[a-z0-9-_]+$" }, "persistedFaces": { - "type": "array", "description": "Persisted faces within the face list.", - "items": { - "$ref": "#/definitions/PersistedFace" - } + "$ref": "#/definitions/PersistedFaces" } }, "allOf": [ @@ -3180,6 +3362,13 @@ } } }, + "PersistedFaces": { + "type": "array", + "description": "An array of persisted faces within the face list or large face list.", + "items": { + "$ref": "#/definitions/PersistedFace" + } + }, "LargeFaceList": { "description": "Large face list object.", "type": "object", @@ -3234,9 +3423,9 @@ "$ref": "#/definitions/LargePersonGroup" } }, - "UpdatePersonFaceRequest": { + "UpdateFaceRequest": { "type": "object", - "description": "Request to update person face data.", + "description": "Request to update face data.", "properties": { "userData": { "type": "string", @@ -3255,7 +3444,7 @@ "properties": { "status": { "type": "string", - "description": "Training status: notstarted, running, succeeded, failed. If the training process is waiting to perform, the status is notstarted. If the training is ongoing, the status is running. Status succeed means this person group is ready for Face - Identify. Status failed is often caused by no person or no persisted face exist in the person group", + "description": "Training status: notstarted, running, succeeded, failed. If the training process is waiting to perform, the status is notstarted. If the training is ongoing, the status is running. Status succeed means this person group or large person group is ready for Face - Identify, or this large face list is ready for Face - Find Similar. Status failed is often caused by no person or no persisted face exist in the person group or large person group, or no persisted face exist in the large face list.", "x-ms-enum": { "name": "TrainingStatusType", "modelAsString": false @@ -3270,19 +3459,19 @@ "createdDateTime": { "type": "string", "format": "date-time", - "description": "A combined UTC date and time string that describes the created time of the person group or large person group.", + "description": "A combined UTC date and time string that describes the created time of the person group, large person group or large face list.", "x-ms-client-name": "created" }, "lastActionDateTime": { "type": "string", "format": "date-time", - "description": "A combined UTC date and time string that describes the last modify time of the person group or large person group, could be null value when the group is not successfully trained.", + "description": "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.", "x-ms-client-name": "lastAction" }, "lastSuccessfulTrainingDateTime": { "type": "string", "format": "date-time", - "description": "A combined UTC date and time string that describes the last successful training time of the person group or large person group.", + "description": "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.", "x-ms-client-name": "lastSuccessfulTraining" }, "message": { diff --git a/specification/cognitiveservices/data-plane/Face/stable/v1.0/examples/GetLargeFaceListPersistedFace.json b/specification/cognitiveservices/data-plane/Face/stable/v1.0/examples/GetLargeFaceListPersistedFace.json new file mode 100644 index 000000000000..ba6a368cec58 --- /dev/null +++ b/specification/cognitiveservices/data-plane/Face/stable/v1.0/examples/GetLargeFaceListPersistedFace.json @@ -0,0 +1,17 @@ +{ + "parameters": { + "AzureRegion": "westus", + "Content-Type": "application/json", + "Ocp-Apim-Subscription-Key": "{API key}", + "largeFaceListId": "abc", + "persistedFaceId": "015839fb-fbd9-4f79-ace9-7675fc2f1dd9" + }, + "responses": { + "200": { + "body": { + "persistedFaceId": "015839fb-fbd9-4f79-ace9-7675fc2f1dd9", + "userData": "User-provided data attached to the face." + } + } + } +} \ No newline at end of file diff --git a/specification/cognitiveservices/data-plane/Face/stable/v1.0/examples/GetLargeFaceListTrainingStatus.json b/specification/cognitiveservices/data-plane/Face/stable/v1.0/examples/GetLargeFaceListTrainingStatus.json new file mode 100644 index 000000000000..0650eda57f9c --- /dev/null +++ b/specification/cognitiveservices/data-plane/Face/stable/v1.0/examples/GetLargeFaceListTrainingStatus.json @@ -0,0 +1,19 @@ +{ + "parameters": { + "AzureRegion": "westus", + "Content-Type": "application/json", + "Ocp-Apim-Subscription-Key": "{API key}", + "largeFaceListId": "abc" + }, + "responses": { + "200": { + "body": { + "status": "succeeded", + "createdDateTime": "2017-12-21T12:57:27.00Z", + "lastActionDateTime": "2017-12-21T12:57:30.00Z", + "lastSuccessfulTrainingDateTime": "2017-12-21T12:57:30.00Z", + "message": null + } + } + } +} \ No newline at end of file diff --git a/specification/cognitiveservices/data-plane/Face/stable/v1.0/examples/GetLargePersonGroupPersistedFace.json b/specification/cognitiveservices/data-plane/Face/stable/v1.0/examples/GetLargePersonGroupPersistedFace.json index a77f0aaa0fea..37ac1bbdf57b 100644 --- a/specification/cognitiveservices/data-plane/Face/stable/v1.0/examples/GetLargePersonGroupPersistedFace.json +++ b/specification/cognitiveservices/data-plane/Face/stable/v1.0/examples/GetLargePersonGroupPersistedFace.json @@ -4,8 +4,8 @@ "Content-Type": "application/json", "Ocp-Apim-Subscription-Key": "{API key}", "largePersonGroupId": "abc", - "personId": "foobar", - "persistedFaceId": "asd" + "personId": "B8D802CF-DD8F-4E61-B15C-9E6C5844CCBA", + "persistedFaceId": "015839fb-fbd9-4f79-ace9-7675fc2f1dd9" }, "responses": { "200": { diff --git a/specification/cognitiveservices/data-plane/Face/stable/v1.0/examples/ListLargeFaceListFaces.json b/specification/cognitiveservices/data-plane/Face/stable/v1.0/examples/ListLargeFaceListFaces.json new file mode 100644 index 000000000000..c4f938cfe57f --- /dev/null +++ b/specification/cognitiveservices/data-plane/Face/stable/v1.0/examples/ListLargeFaceListFaces.json @@ -0,0 +1,24 @@ +{ + "parameters": { + "AzureRegion": "westus", + "Content-Type": "application/json", + "Ocp-Apim-Subscription-Key": "{API key}", + "largeFaceListId": "abc", + "start": "25985303-c537-4467-b41d-bdb45cd95ca1", + "top": 2 + }, + "responses": { + "200": { + "body": [ + { + "persistedFaceId": "8a887ac2-53fd-4f55-9024-1ec77eecd08e", + "userData": "User-provided data attached to the large face list face." + }, + { + "persistedFaceId": "f92f6f1b-3258-4444-8fa2-c2df505cc7ac", + "userData": "User-provided data attached to the large face list face." + } + ] + } + } +} \ No newline at end of file diff --git a/specification/cognitiveservices/data-plane/Face/stable/v1.0/examples/QueueLargeFaceListTraining.json b/specification/cognitiveservices/data-plane/Face/stable/v1.0/examples/QueueLargeFaceListTraining.json new file mode 100644 index 000000000000..c179fa7779f7 --- /dev/null +++ b/specification/cognitiveservices/data-plane/Face/stable/v1.0/examples/QueueLargeFaceListTraining.json @@ -0,0 +1,13 @@ +{ + "parameters": { + "AzureRegion": "westus", + "Content-Type": "application/json", + "Ocp-Apim-Subscription-Key": "{API key}", + "largeFaceListId": "abc" + }, + "responses": { + "202": { + "body": "" + } + } +} \ No newline at end of file diff --git a/specification/cognitiveservices/data-plane/Face/stable/v1.0/examples/UpdateLargeFaceListFace.json b/specification/cognitiveservices/data-plane/Face/stable/v1.0/examples/UpdateLargeFaceListFace.json new file mode 100644 index 000000000000..de697c27181e --- /dev/null +++ b/specification/cognitiveservices/data-plane/Face/stable/v1.0/examples/UpdateLargeFaceListFace.json @@ -0,0 +1,17 @@ +{ + "parameters": { + "AzureRegion": "westus", + "Content-Type": "application/json", + "Ocp-Apim-Subscription-Key": "{API key}", + "largeFaceListId": "abc", + "persistedFaceId": "62004fa7-1ac0-478e-9d5a-b38f9e7fbc68", + "body": { + "userData": "User-provided data attached to the face." + } + }, + "responses": { + "200": { + "body": "" + } + } +} \ No newline at end of file From f3448147635555e209ef5598be026e852a9790b1 Mon Sep 17 00:00:00 2001 From: Siqi Liu Date: Thu, 26 Jul 2018 16:19:21 +0800 Subject: [PATCH 10/16] Nit fix. --- .../data-plane/Face/stable/v1.0/Face.json | 25 +++++++++---------- 1 file changed, 12 insertions(+), 13 deletions(-) diff --git a/specification/cognitiveservices/data-plane/Face/stable/v1.0/Face.json b/specification/cognitiveservices/data-plane/Face/stable/v1.0/Face.json index c5c7de2a1143..6b3d0cecb6f2 100644 --- a/specification/cognitiveservices/data-plane/Face/stable/v1.0/Face.json +++ b/specification/cognitiveservices/data-plane/Face/stable/v1.0/Face.json @@ -2323,7 +2323,7 @@ "/largepersongroups/{largePersonGroupId}/persons/{personId}/persistedFaces?overload=stream": { "post": { "description": "Add a representative face to a person for identification. The input face is specified as an image with a targetFace rectangle.", - "operationId": "LargePersonGroupPerson_AddLargePersonGroupPersonFaceFromStream", + "operationId": "LargePersonGroupPerson_AddPersonFaceFromStream", "parameters": [ { "$ref": "#/parameters/largePersonGroupId" @@ -3097,6 +3097,16 @@ ], "description": "Request body for identify face operation.", "properties": { + "faceIds": { + "type": "array", + "description": "Array of query faces faceIds, created by the Face - Detect. Each of the faces are identified independently. The valid number of faceIds is between [1, 10].", + "maxItems": 10, + "items": { + "type": "string", + "format": "uuid", + "x-nullable": false + } + }, "personGroupId": { "description": "PersonGroupId of the target person group, created by PersonGroup - Create. Parameter personGroupId and largePersonGroupId should not be provided at the same time.", "type": "string", @@ -3109,16 +3119,6 @@ "maxLength": 64, "pattern": "^[a-z0-9-_]+$" }, - "faceIds": { - "type": "array", - "description": "Array of query faces faceIds, created by the Face - Detect. Each of the faces are identified independently. The valid number of faceIds is between [1, 10].", - "maxItems": 10, - "items": { - "type": "string", - "format": "uuid", - "x-nullable": false - } - }, "maxNumOfCandidatesReturned": { "type": "integer", "description": "The range of maxNumOfCandidatesReturned is between 1 and 5 (default is 1).", @@ -3183,8 +3183,7 @@ "type": "object", "required": [ "faceId", - "personId", - "personGroupId" + "personId" ], "description": "Request body for face to person verification.", "properties": { From 5ed1c0cd26a2223c43d3bcb47badea7e24cddb1b Mon Sep 17 00:00:00 2001 From: Siqi Liu Date: Mon, 30 Jul 2018 10:53:21 +0800 Subject: [PATCH 11/16] Rebase and update master's endpoint changes to examples. --- .../stable/v1.0/examples/AddLargeFaceListFaceFromStream.json | 2 +- .../Face/stable/v1.0/examples/AddLargeFaceListFaceFromUrl.json | 2 +- .../v1.0/examples/AddLargePersonGroupPersonFaceFromStream.json | 2 +- .../v1.0/examples/AddLargePersonGroupPersonFaceFromUrl.json | 2 +- .../Face/stable/v1.0/examples/CreateNewLargeFaceList.json | 2 +- .../Face/stable/v1.0/examples/CreateNewLargePersonGroup.json | 2 +- .../stable/v1.0/examples/CreateNewLargePersonGroupPerson.json | 2 +- .../Face/stable/v1.0/examples/DeleteLargeFaceList.json | 2 +- .../Face/stable/v1.0/examples/DeleteLargeFaceListFace.json | 2 +- .../Face/stable/v1.0/examples/DeleteLargePersonGroup.json | 2 +- .../Face/stable/v1.0/examples/DeleteLargePersonGroupPerson.json | 2 +- .../stable/v1.0/examples/DeleteLargePersonGroupPersonFace.json | 2 +- .../data-plane/Face/stable/v1.0/examples/GetLargeFaceList.json | 2 +- .../stable/v1.0/examples/GetLargeFaceListPersistedFace.json | 2 +- .../stable/v1.0/examples/GetLargeFaceListTrainingStatus.json | 2 +- .../data-plane/Face/stable/v1.0/examples/GetLargeFaceLists.json | 2 +- .../Face/stable/v1.0/examples/GetLargePersonGroup.json | 2 +- .../stable/v1.0/examples/GetLargePersonGroupPersistedFace.json | 2 +- .../Face/stable/v1.0/examples/GetLargePersonGroupPerson.json | 2 +- .../stable/v1.0/examples/GetLargePersonGroupTrainingStatus.json | 2 +- .../Face/stable/v1.0/examples/GetLargePersonGroups.json | 2 +- .../Face/stable/v1.0/examples/ListLargeFaceListFaces.json | 2 +- .../Face/stable/v1.0/examples/ListLargePersonGroupPersons.json | 2 +- .../Face/stable/v1.0/examples/QueueLargeFaceListTraining.json | 2 +- .../stable/v1.0/examples/QueueLargePersonGroupTraining.json | 2 +- .../Face/stable/v1.0/examples/UpdateLargeFaceList.json | 2 +- .../Face/stable/v1.0/examples/UpdateLargeFaceListFace.json | 2 +- .../Face/stable/v1.0/examples/UpdateLargePersonGroup.json | 2 +- .../Face/stable/v1.0/examples/UpdateLargePersonGroupPerson.json | 2 +- .../stable/v1.0/examples/UpdateLargePersonGroupPersonFace.json | 2 +- 30 files changed, 30 insertions(+), 30 deletions(-) diff --git a/specification/cognitiveservices/data-plane/Face/stable/v1.0/examples/AddLargeFaceListFaceFromStream.json b/specification/cognitiveservices/data-plane/Face/stable/v1.0/examples/AddLargeFaceListFaceFromStream.json index 9f164671eb43..f27d3cb5f6db 100644 --- a/specification/cognitiveservices/data-plane/Face/stable/v1.0/examples/AddLargeFaceListFaceFromStream.json +++ b/specification/cognitiveservices/data-plane/Face/stable/v1.0/examples/AddLargeFaceListFaceFromStream.json @@ -1,6 +1,6 @@ { "parameters": { - "AzureRegion": "westus", + "Endpoint": "{Endpoint}", "Content-Type": "application/octet-stream", "Ocp-Apim-Subscription-Key": "{API key}", "largeFaceListId": "sample_face_list", diff --git a/specification/cognitiveservices/data-plane/Face/stable/v1.0/examples/AddLargeFaceListFaceFromUrl.json b/specification/cognitiveservices/data-plane/Face/stable/v1.0/examples/AddLargeFaceListFaceFromUrl.json index 735ec46180ec..468548d88965 100644 --- a/specification/cognitiveservices/data-plane/Face/stable/v1.0/examples/AddLargeFaceListFaceFromUrl.json +++ b/specification/cognitiveservices/data-plane/Face/stable/v1.0/examples/AddLargeFaceListFaceFromUrl.json @@ -1,6 +1,6 @@ { "parameters": { - "AzureRegion": "westus", + "Endpoint": "{Endpoint}", "Content-Type": "application/json", "Ocp-Apim-Subscription-Key": "{API key}", "largeFaceListId": "sample_face_list", diff --git a/specification/cognitiveservices/data-plane/Face/stable/v1.0/examples/AddLargePersonGroupPersonFaceFromStream.json b/specification/cognitiveservices/data-plane/Face/stable/v1.0/examples/AddLargePersonGroupPersonFaceFromStream.json index bcf3d4b49b72..fcb30e336b4c 100644 --- a/specification/cognitiveservices/data-plane/Face/stable/v1.0/examples/AddLargePersonGroupPersonFaceFromStream.json +++ b/specification/cognitiveservices/data-plane/Face/stable/v1.0/examples/AddLargePersonGroupPersonFaceFromStream.json @@ -1,6 +1,6 @@ { "parameters": { - "AzureRegion": "westus", + "Endpoint": "{Endpoint}", "Content-Type": "application/octet-stream", "Ocp-Apim-Subscription-Key": "{API key}", "largePersonGroupId": "abc", diff --git a/specification/cognitiveservices/data-plane/Face/stable/v1.0/examples/AddLargePersonGroupPersonFaceFromUrl.json b/specification/cognitiveservices/data-plane/Face/stable/v1.0/examples/AddLargePersonGroupPersonFaceFromUrl.json index 2ec1c6899627..4acd4d5f014d 100644 --- a/specification/cognitiveservices/data-plane/Face/stable/v1.0/examples/AddLargePersonGroupPersonFaceFromUrl.json +++ b/specification/cognitiveservices/data-plane/Face/stable/v1.0/examples/AddLargePersonGroupPersonFaceFromUrl.json @@ -1,6 +1,6 @@ { "parameters": { - "AzureRegion": "westus", + "Endpoint": "{Endpoint}", "Content-Type": "application/json", "Ocp-Apim-Subscription-Key": "{API key}", "largePersonGroupId": "abc", diff --git a/specification/cognitiveservices/data-plane/Face/stable/v1.0/examples/CreateNewLargeFaceList.json b/specification/cognitiveservices/data-plane/Face/stable/v1.0/examples/CreateNewLargeFaceList.json index 08a5ac8b981e..8ed459fea53e 100644 --- a/specification/cognitiveservices/data-plane/Face/stable/v1.0/examples/CreateNewLargeFaceList.json +++ b/specification/cognitiveservices/data-plane/Face/stable/v1.0/examples/CreateNewLargeFaceList.json @@ -1,6 +1,6 @@ { "parameters": { - "AzureRegion": "westus", + "Endpoint": "{Endpoint}", "Content-Type": "application/json", "Ocp-Apim-Subscription-Key": "{API key}", "largeFaceListId": "sample_face_list", diff --git a/specification/cognitiveservices/data-plane/Face/stable/v1.0/examples/CreateNewLargePersonGroup.json b/specification/cognitiveservices/data-plane/Face/stable/v1.0/examples/CreateNewLargePersonGroup.json index 78115e6ba2a8..13914b7b7cdc 100644 --- a/specification/cognitiveservices/data-plane/Face/stable/v1.0/examples/CreateNewLargePersonGroup.json +++ b/specification/cognitiveservices/data-plane/Face/stable/v1.0/examples/CreateNewLargePersonGroup.json @@ -1,6 +1,6 @@ { "parameters": { - "AzureRegion": "westus", + "Endpoint": "{Endpoint}", "Content-Type": "application/json", "Ocp-Apim-Subscription-Key": "{API key}", "largePersonGroupId": "abc", diff --git a/specification/cognitiveservices/data-plane/Face/stable/v1.0/examples/CreateNewLargePersonGroupPerson.json b/specification/cognitiveservices/data-plane/Face/stable/v1.0/examples/CreateNewLargePersonGroupPerson.json index 8aec88b05f4e..53900dd9696f 100644 --- a/specification/cognitiveservices/data-plane/Face/stable/v1.0/examples/CreateNewLargePersonGroupPerson.json +++ b/specification/cognitiveservices/data-plane/Face/stable/v1.0/examples/CreateNewLargePersonGroupPerson.json @@ -1,6 +1,6 @@ { "parameters": { - "AzureRegion": "westus", + "Endpoint": "{Endpoint}", "Content-Type": "application/json", "Ocp-Apim-Subscription-Key": "{API key}", "largePersonGroupId": "abc", diff --git a/specification/cognitiveservices/data-plane/Face/stable/v1.0/examples/DeleteLargeFaceList.json b/specification/cognitiveservices/data-plane/Face/stable/v1.0/examples/DeleteLargeFaceList.json index 934daebdc386..7e47b7c16237 100644 --- a/specification/cognitiveservices/data-plane/Face/stable/v1.0/examples/DeleteLargeFaceList.json +++ b/specification/cognitiveservices/data-plane/Face/stable/v1.0/examples/DeleteLargeFaceList.json @@ -1,6 +1,6 @@ { "parameters": { - "AzureRegion": "westus", + "Endpoint": "{Endpoint}", "Content-Type": "application/json", "Ocp-Apim-Subscription-Key": "{API key}", "largeFaceListId": "sample_face_list" diff --git a/specification/cognitiveservices/data-plane/Face/stable/v1.0/examples/DeleteLargeFaceListFace.json b/specification/cognitiveservices/data-plane/Face/stable/v1.0/examples/DeleteLargeFaceListFace.json index 48012d55757d..a47c7e61ab37 100644 --- a/specification/cognitiveservices/data-plane/Face/stable/v1.0/examples/DeleteLargeFaceListFace.json +++ b/specification/cognitiveservices/data-plane/Face/stable/v1.0/examples/DeleteLargeFaceListFace.json @@ -1,6 +1,6 @@ { "parameters": { - "AzureRegion": "westus", + "Endpoint": "{Endpoint}", "Content-Type": "application/json", "Ocp-Apim-Subscription-Key": "{API key}", "largeFaceListId": "sample_face_list", diff --git a/specification/cognitiveservices/data-plane/Face/stable/v1.0/examples/DeleteLargePersonGroup.json b/specification/cognitiveservices/data-plane/Face/stable/v1.0/examples/DeleteLargePersonGroup.json index 17943813a058..b5867a499241 100644 --- a/specification/cognitiveservices/data-plane/Face/stable/v1.0/examples/DeleteLargePersonGroup.json +++ b/specification/cognitiveservices/data-plane/Face/stable/v1.0/examples/DeleteLargePersonGroup.json @@ -1,6 +1,6 @@ { "parameters": { - "AzureRegion": "westus", + "Endpoint": "{Endpoint}", "Content-Type": "application/json", "Ocp-Apim-Subscription-Key": "{API key}", "largePersonGroupId": "abc" diff --git a/specification/cognitiveservices/data-plane/Face/stable/v1.0/examples/DeleteLargePersonGroupPerson.json b/specification/cognitiveservices/data-plane/Face/stable/v1.0/examples/DeleteLargePersonGroupPerson.json index 92b9b71a0738..d4c3a956686f 100644 --- a/specification/cognitiveservices/data-plane/Face/stable/v1.0/examples/DeleteLargePersonGroupPerson.json +++ b/specification/cognitiveservices/data-plane/Face/stable/v1.0/examples/DeleteLargePersonGroupPerson.json @@ -1,6 +1,6 @@ { "parameters": { - "AzureRegion": "westus", + "Endpoint": "{Endpoint}", "Content-Type": "application/json", "Ocp-Apim-Subscription-Key": "{API key}", "largePersonGroupId": "abc", diff --git a/specification/cognitiveservices/data-plane/Face/stable/v1.0/examples/DeleteLargePersonGroupPersonFace.json b/specification/cognitiveservices/data-plane/Face/stable/v1.0/examples/DeleteLargePersonGroupPersonFace.json index d644ee94e2b4..baf66894cfed 100644 --- a/specification/cognitiveservices/data-plane/Face/stable/v1.0/examples/DeleteLargePersonGroupPersonFace.json +++ b/specification/cognitiveservices/data-plane/Face/stable/v1.0/examples/DeleteLargePersonGroupPersonFace.json @@ -1,6 +1,6 @@ { "parameters": { - "AzureRegion": "westus", + "Endpoint": "{Endpoint}", "Content-Type": "application/json", "Ocp-Apim-Subscription-Key": "{API key}", "largePersonGroupId": "abc", diff --git a/specification/cognitiveservices/data-plane/Face/stable/v1.0/examples/GetLargeFaceList.json b/specification/cognitiveservices/data-plane/Face/stable/v1.0/examples/GetLargeFaceList.json index 14de86901093..663852f67896 100644 --- a/specification/cognitiveservices/data-plane/Face/stable/v1.0/examples/GetLargeFaceList.json +++ b/specification/cognitiveservices/data-plane/Face/stable/v1.0/examples/GetLargeFaceList.json @@ -1,6 +1,6 @@ { "parameters": { - "AzureRegion": "westus", + "Endpoint": "{Endpoint}", "Content-Type": "application/json", "Ocp-Apim-Subscription-Key": "{API key}", "largeFaceListId": "f92f6f1b-3258-4444-8fa2-c2df505cc7ac" diff --git a/specification/cognitiveservices/data-plane/Face/stable/v1.0/examples/GetLargeFaceListPersistedFace.json b/specification/cognitiveservices/data-plane/Face/stable/v1.0/examples/GetLargeFaceListPersistedFace.json index ba6a368cec58..da21d972276d 100644 --- a/specification/cognitiveservices/data-plane/Face/stable/v1.0/examples/GetLargeFaceListPersistedFace.json +++ b/specification/cognitiveservices/data-plane/Face/stable/v1.0/examples/GetLargeFaceListPersistedFace.json @@ -1,6 +1,6 @@ { "parameters": { - "AzureRegion": "westus", + "Endpoint": "{Endpoint}", "Content-Type": "application/json", "Ocp-Apim-Subscription-Key": "{API key}", "largeFaceListId": "abc", diff --git a/specification/cognitiveservices/data-plane/Face/stable/v1.0/examples/GetLargeFaceListTrainingStatus.json b/specification/cognitiveservices/data-plane/Face/stable/v1.0/examples/GetLargeFaceListTrainingStatus.json index 0650eda57f9c..9ce0e910be4b 100644 --- a/specification/cognitiveservices/data-plane/Face/stable/v1.0/examples/GetLargeFaceListTrainingStatus.json +++ b/specification/cognitiveservices/data-plane/Face/stable/v1.0/examples/GetLargeFaceListTrainingStatus.json @@ -1,6 +1,6 @@ { "parameters": { - "AzureRegion": "westus", + "Endpoint": "{Endpoint}", "Content-Type": "application/json", "Ocp-Apim-Subscription-Key": "{API key}", "largeFaceListId": "abc" diff --git a/specification/cognitiveservices/data-plane/Face/stable/v1.0/examples/GetLargeFaceLists.json b/specification/cognitiveservices/data-plane/Face/stable/v1.0/examples/GetLargeFaceLists.json index 432172a393a3..f111b1ed56e5 100644 --- a/specification/cognitiveservices/data-plane/Face/stable/v1.0/examples/GetLargeFaceLists.json +++ b/specification/cognitiveservices/data-plane/Face/stable/v1.0/examples/GetLargeFaceLists.json @@ -1,6 +1,6 @@ { "parameters": { - "AzureRegion": "westus", + "Endpoint": "{Endpoint}", "Ocp-Apim-Subscription-Key": "{API key}" }, "responses": { diff --git a/specification/cognitiveservices/data-plane/Face/stable/v1.0/examples/GetLargePersonGroup.json b/specification/cognitiveservices/data-plane/Face/stable/v1.0/examples/GetLargePersonGroup.json index 9428a809ec93..14d35590c751 100644 --- a/specification/cognitiveservices/data-plane/Face/stable/v1.0/examples/GetLargePersonGroup.json +++ b/specification/cognitiveservices/data-plane/Face/stable/v1.0/examples/GetLargePersonGroup.json @@ -1,6 +1,6 @@ { "parameters": { - "AzureRegion": "westus", + "Endpoint": "{Endpoint}", "Content-Type": "application/json", "Ocp-Apim-Subscription-Key": "{API key}", "largePersonGroupId": "abc" diff --git a/specification/cognitiveservices/data-plane/Face/stable/v1.0/examples/GetLargePersonGroupPersistedFace.json b/specification/cognitiveservices/data-plane/Face/stable/v1.0/examples/GetLargePersonGroupPersistedFace.json index 37ac1bbdf57b..6446affae028 100644 --- a/specification/cognitiveservices/data-plane/Face/stable/v1.0/examples/GetLargePersonGroupPersistedFace.json +++ b/specification/cognitiveservices/data-plane/Face/stable/v1.0/examples/GetLargePersonGroupPersistedFace.json @@ -1,6 +1,6 @@ { "parameters": { - "AzureRegion": "westus", + "Endpoint": "{Endpoint}", "Content-Type": "application/json", "Ocp-Apim-Subscription-Key": "{API key}", "largePersonGroupId": "abc", diff --git a/specification/cognitiveservices/data-plane/Face/stable/v1.0/examples/GetLargePersonGroupPerson.json b/specification/cognitiveservices/data-plane/Face/stable/v1.0/examples/GetLargePersonGroupPerson.json index e50117aaf74e..39489d651984 100644 --- a/specification/cognitiveservices/data-plane/Face/stable/v1.0/examples/GetLargePersonGroupPerson.json +++ b/specification/cognitiveservices/data-plane/Face/stable/v1.0/examples/GetLargePersonGroupPerson.json @@ -1,6 +1,6 @@ { "parameters": { - "AzureRegion": "westus", + "Endpoint": "{Endpoint}", "Content-Type": "application/json", "Ocp-Apim-Subscription-Key": "{API key}", "largePersonGroupId": "abc", diff --git a/specification/cognitiveservices/data-plane/Face/stable/v1.0/examples/GetLargePersonGroupTrainingStatus.json b/specification/cognitiveservices/data-plane/Face/stable/v1.0/examples/GetLargePersonGroupTrainingStatus.json index 6f7fc595313b..e1c292af8489 100644 --- a/specification/cognitiveservices/data-plane/Face/stable/v1.0/examples/GetLargePersonGroupTrainingStatus.json +++ b/specification/cognitiveservices/data-plane/Face/stable/v1.0/examples/GetLargePersonGroupTrainingStatus.json @@ -1,6 +1,6 @@ { "parameters": { - "AzureRegion": "westus", + "Endpoint": "{Endpoint}", "Content-Type": "application/json", "Ocp-Apim-Subscription-Key": "{API key}", "largePersonGroupId": "abc" diff --git a/specification/cognitiveservices/data-plane/Face/stable/v1.0/examples/GetLargePersonGroups.json b/specification/cognitiveservices/data-plane/Face/stable/v1.0/examples/GetLargePersonGroups.json index 105b86f11f5e..2434899e336c 100644 --- a/specification/cognitiveservices/data-plane/Face/stable/v1.0/examples/GetLargePersonGroups.json +++ b/specification/cognitiveservices/data-plane/Face/stable/v1.0/examples/GetLargePersonGroups.json @@ -1,6 +1,6 @@ { "parameters": { - "AzureRegion": "westus", + "Endpoint": "{Endpoint}", "Ocp-Apim-Subscription-Key": "{API key}", "start": "sample_group", "top": 2 diff --git a/specification/cognitiveservices/data-plane/Face/stable/v1.0/examples/ListLargeFaceListFaces.json b/specification/cognitiveservices/data-plane/Face/stable/v1.0/examples/ListLargeFaceListFaces.json index c4f938cfe57f..9aa1c51c05bc 100644 --- a/specification/cognitiveservices/data-plane/Face/stable/v1.0/examples/ListLargeFaceListFaces.json +++ b/specification/cognitiveservices/data-plane/Face/stable/v1.0/examples/ListLargeFaceListFaces.json @@ -1,6 +1,6 @@ { "parameters": { - "AzureRegion": "westus", + "Endpoint": "{Endpoint}", "Content-Type": "application/json", "Ocp-Apim-Subscription-Key": "{API key}", "largeFaceListId": "abc", diff --git a/specification/cognitiveservices/data-plane/Face/stable/v1.0/examples/ListLargePersonGroupPersons.json b/specification/cognitiveservices/data-plane/Face/stable/v1.0/examples/ListLargePersonGroupPersons.json index b0429b184dff..b9b31e91c916 100644 --- a/specification/cognitiveservices/data-plane/Face/stable/v1.0/examples/ListLargePersonGroupPersons.json +++ b/specification/cognitiveservices/data-plane/Face/stable/v1.0/examples/ListLargePersonGroupPersons.json @@ -1,6 +1,6 @@ { "parameters": { - "AzureRegion": "westus", + "Endpoint": "{Endpoint}", "Content-Type": "application/json", "Ocp-Apim-Subscription-Key": "{API key}", "largePersonGroupId": "abc", diff --git a/specification/cognitiveservices/data-plane/Face/stable/v1.0/examples/QueueLargeFaceListTraining.json b/specification/cognitiveservices/data-plane/Face/stable/v1.0/examples/QueueLargeFaceListTraining.json index c179fa7779f7..3b4651709695 100644 --- a/specification/cognitiveservices/data-plane/Face/stable/v1.0/examples/QueueLargeFaceListTraining.json +++ b/specification/cognitiveservices/data-plane/Face/stable/v1.0/examples/QueueLargeFaceListTraining.json @@ -1,6 +1,6 @@ { "parameters": { - "AzureRegion": "westus", + "Endpoint": "{Endpoint}", "Content-Type": "application/json", "Ocp-Apim-Subscription-Key": "{API key}", "largeFaceListId": "abc" diff --git a/specification/cognitiveservices/data-plane/Face/stable/v1.0/examples/QueueLargePersonGroupTraining.json b/specification/cognitiveservices/data-plane/Face/stable/v1.0/examples/QueueLargePersonGroupTraining.json index cc4509753a74..6dc125d39db2 100644 --- a/specification/cognitiveservices/data-plane/Face/stable/v1.0/examples/QueueLargePersonGroupTraining.json +++ b/specification/cognitiveservices/data-plane/Face/stable/v1.0/examples/QueueLargePersonGroupTraining.json @@ -1,6 +1,6 @@ { "parameters": { - "AzureRegion": "westus", + "Endpoint": "{Endpoint}", "Content-Type": "application/json", "Ocp-Apim-Subscription-Key": "{API key}", "largePersonGroupId": "abc" diff --git a/specification/cognitiveservices/data-plane/Face/stable/v1.0/examples/UpdateLargeFaceList.json b/specification/cognitiveservices/data-plane/Face/stable/v1.0/examples/UpdateLargeFaceList.json index 08a5ac8b981e..8ed459fea53e 100644 --- a/specification/cognitiveservices/data-plane/Face/stable/v1.0/examples/UpdateLargeFaceList.json +++ b/specification/cognitiveservices/data-plane/Face/stable/v1.0/examples/UpdateLargeFaceList.json @@ -1,6 +1,6 @@ { "parameters": { - "AzureRegion": "westus", + "Endpoint": "{Endpoint}", "Content-Type": "application/json", "Ocp-Apim-Subscription-Key": "{API key}", "largeFaceListId": "sample_face_list", diff --git a/specification/cognitiveservices/data-plane/Face/stable/v1.0/examples/UpdateLargeFaceListFace.json b/specification/cognitiveservices/data-plane/Face/stable/v1.0/examples/UpdateLargeFaceListFace.json index de697c27181e..9249c6b0bf1c 100644 --- a/specification/cognitiveservices/data-plane/Face/stable/v1.0/examples/UpdateLargeFaceListFace.json +++ b/specification/cognitiveservices/data-plane/Face/stable/v1.0/examples/UpdateLargeFaceListFace.json @@ -1,6 +1,6 @@ { "parameters": { - "AzureRegion": "westus", + "Endpoint": "{Endpoint}", "Content-Type": "application/json", "Ocp-Apim-Subscription-Key": "{API key}", "largeFaceListId": "abc", diff --git a/specification/cognitiveservices/data-plane/Face/stable/v1.0/examples/UpdateLargePersonGroup.json b/specification/cognitiveservices/data-plane/Face/stable/v1.0/examples/UpdateLargePersonGroup.json index e03f55e9fd6f..b72c7f720b71 100644 --- a/specification/cognitiveservices/data-plane/Face/stable/v1.0/examples/UpdateLargePersonGroup.json +++ b/specification/cognitiveservices/data-plane/Face/stable/v1.0/examples/UpdateLargePersonGroup.json @@ -1,6 +1,6 @@ { "parameters": { - "AzureRegion": "westus", + "Endpoint": "{Endpoint}", "Content-Type": "application/json", "Ocp-Apim-Subscription-Key": "{API key}", "largePersonGroupId": "abc", diff --git a/specification/cognitiveservices/data-plane/Face/stable/v1.0/examples/UpdateLargePersonGroupPerson.json b/specification/cognitiveservices/data-plane/Face/stable/v1.0/examples/UpdateLargePersonGroupPerson.json index 3ea949937edf..988a50023204 100644 --- a/specification/cognitiveservices/data-plane/Face/stable/v1.0/examples/UpdateLargePersonGroupPerson.json +++ b/specification/cognitiveservices/data-plane/Face/stable/v1.0/examples/UpdateLargePersonGroupPerson.json @@ -1,6 +1,6 @@ { "parameters": { - "AzureRegion": "westus", + "Endpoint": "{Endpoint}", "Content-Type": "application/json", "Ocp-Apim-Subscription-Key": "{API key}", "largePersonGroupId": "abc", diff --git a/specification/cognitiveservices/data-plane/Face/stable/v1.0/examples/UpdateLargePersonGroupPersonFace.json b/specification/cognitiveservices/data-plane/Face/stable/v1.0/examples/UpdateLargePersonGroupPersonFace.json index b882fda804e3..fbf0ef631614 100644 --- a/specification/cognitiveservices/data-plane/Face/stable/v1.0/examples/UpdateLargePersonGroupPersonFace.json +++ b/specification/cognitiveservices/data-plane/Face/stable/v1.0/examples/UpdateLargePersonGroupPersonFace.json @@ -1,6 +1,6 @@ { "parameters": { - "AzureRegion": "westus", + "Endpoint": "{Endpoint}", "Content-Type": "application/json", "Ocp-Apim-Subscription-Key": "{API key}", "largePersonGroupId": "abc", From 9b4c21a58071bdaf26a5ced0fa4a283077617af1 Mon Sep 17 00:00:00 2001 From: Siqi Liu Date: Mon, 30 Jul 2018 17:04:54 +0800 Subject: [PATCH 12/16] Nit fix documentation. --- .../cognitiveservices/data-plane/Face/stable/v1.0/Face.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/specification/cognitiveservices/data-plane/Face/stable/v1.0/Face.json b/specification/cognitiveservices/data-plane/Face/stable/v1.0/Face.json index 6b3d0cecb6f2..0764fb461ff9 100644 --- a/specification/cognitiveservices/data-plane/Face/stable/v1.0/Face.json +++ b/specification/cognitiveservices/data-plane/Face/stable/v1.0/Face.json @@ -3493,7 +3493,7 @@ }, "NameAndUserDataContract": { "type": "object", - "description": "A combination of user defined name and user specified data for the person, personGroup, and faceList", + "description": "A combination of user defined name and user specified data for the person, largePersonGroup/personGroup, and largeFaceList/faceList.", "properties": { "name": { "type": "string", From a2c9e881121ab738c6142713fd66d08629b7a475 Mon Sep 17 00:00:00 2001 From: Siqi Liu Date: Tue, 31 Jul 2018 14:57:45 +0800 Subject: [PATCH 13/16] Nit path case refinement. --- .../data-plane/Face/stable/v1.0/Face.json | 24 +++++++++---------- 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/specification/cognitiveservices/data-plane/Face/stable/v1.0/Face.json b/specification/cognitiveservices/data-plane/Face/stable/v1.0/Face.json index 0764fb461ff9..12c5347609cf 100644 --- a/specification/cognitiveservices/data-plane/Face/stable/v1.0/Face.json +++ b/specification/cognitiveservices/data-plane/Face/stable/v1.0/Face.json @@ -397,7 +397,7 @@ } } }, - "/persongroups/{personGroupId}/persons/{personId}/persistedFaces/{persistedFaceId}": { + "/persongroups/{personGroupId}/persons/{personId}/persistedfaces/{persistedFaceId}": { "delete": { "description": "Delete a face from a person. Relative feature for the persisted face will also be deleted.", "operationId": "PersonGroupPerson_DeleteFace", @@ -922,7 +922,7 @@ } } }, - "/facelists/{faceListId}/persistedFaces/{persistedFaceId}": { + "/facelists/{faceListId}/persistedfaces/{persistedFaceId}": { "delete": { "description": "Delete an existing face from a face list (given by a persisitedFaceId and a faceListId). Persisted image related to the face will also be deleted.", "operationId": "FaceList_DeleteFace", @@ -952,7 +952,7 @@ } } }, - "/persongroups/{personGroupId}/persons/{personId}/persistedFaces": { + "/persongroups/{personGroupId}/persons/{personId}/persistedfaces": { "post": { "description": "Add a representative face to a person for identification. The input face is specified as an image with a targetFace rectangle.", "operationId": "PersonGroupPerson_AddPersonFaceFromUrl", @@ -1053,7 +1053,7 @@ } } }, - "/facelists/{faceListId}/persistedFaces": { + "/facelists/{faceListId}/persistedfaces": { "post": { "description": "Add a face to a face list. The input face is specified as an image with a targetFace rectangle. It returns a persistedFaceId representing the added face, and persistedFaceId will not expire.", "operationId": "FaceList_AddFaceFromUrl", @@ -1296,7 +1296,7 @@ } } }, - "/largepersongroups/{largePersonGroupId}/persons/{personId}/persistedFaces/{persistedFaceId}": { + "/largepersongroups/{largePersonGroupId}/persons/{personId}/persistedfaces/{persistedFaceId}": { "delete": { "description": "Delete a face from a person. Relative feature for the persisted face will also be deleted.", "operationId": "LargePersonGroupPerson_DeleteFace", @@ -1655,7 +1655,7 @@ } } }, - "/largepersongroups/{largePersonGroupId}/persons/{personId}/persistedFaces": { + "/largepersongroups/{largePersonGroupId}/persons/{personId}/persistedfaces": { "post": { "description": "Add a representative face to a person for identification. The input face is specified as an image with a targetFace rectangle.", "operationId": "LargePersonGroupPerson_AddPersonFaceFromUrl", @@ -1932,7 +1932,7 @@ } } }, - "/largefacelists/{largeFaceListId}/persistedFaces/{persistedFaceId}": { + "/largefacelists/{largeFaceListId}/persistedfaces/{persistedFaceId}": { "delete": { "description": "Delete an existing face from a large face list (given by a persisitedFaceId and a largeFaceListId). Persisted image related to the face will also be deleted.", "operationId": "LargeFaceList_DeleteFace", @@ -2037,7 +2037,7 @@ } } }, - "/largefacelists/{largeFaceListId}/persistedFaces": { + "/largefacelists/{largeFaceListId}/persistedfaces": { "post": { "description": "Add a face to a large face list. The input face is specified as an image with a targetFace rectangle. It returns a persistedFaceId representing the added face, and persistedFaceId will not expire.", "operationId": "LargeFaceList_AddFaceFromUrl", @@ -2227,7 +2227,7 @@ } } }, - "/persongroups/{personGroupId}/persons/{personId}/persistedFaces?overload=stream": { + "/persongroups/{personGroupId}/persons/{personId}/persistedfaces?overload=stream": { "post": { "description": "Add a representative face to a person for identification. The input face is specified as an image with a targetFace rectangle.", "operationId": "PersonGroupPerson_AddPersonFaceFromStream", @@ -2275,7 +2275,7 @@ } } }, - "/facelists/{faceListId}/persistedFaces?overload=stream": { + "/facelists/{faceListId}/persistedfaces?overload=stream": { "post": { "description": "Add a face to a face list. The input face is specified as an image with a targetFace rectangle. It returns a persistedFaceId representing the added face, and persistedFaceId will not expire.", "operationId": "FaceList_AddFaceFromStream", @@ -2320,7 +2320,7 @@ } } }, - "/largepersongroups/{largePersonGroupId}/persons/{personId}/persistedFaces?overload=stream": { + "/largepersongroups/{largePersonGroupId}/persons/{personId}/persistedfaces?overload=stream": { "post": { "description": "Add a representative face to a person for identification. The input face is specified as an image with a targetFace rectangle.", "operationId": "LargePersonGroupPerson_AddPersonFaceFromStream", @@ -2368,7 +2368,7 @@ } } }, - "/largefacelists/{largeFaceListId}/persistedFaces?overload=stream": { + "/largefacelists/{largeFaceListId}/persistedfaces?overload=stream": { "post": { "description": "Add a face to a large face list. The input face is specified as an image with a targetFace rectangle. It returns a persistedFaceId representing the added face, and persistedFaceId will not expire.", "operationId": "LargeFaceList_AddFaceFromStream", From 40abfc7205d1bf373e19dca40394598fa9da4843 Mon Sep 17 00:00:00 2001 From: Siqi Liu Date: Wed, 1 Aug 2018 08:16:41 +0800 Subject: [PATCH 14/16] Fix LargeFaceListFace_List to LargeFaceList_ListFaces and refine example naming. --- .../data-plane/Face/stable/v1.0/Face.json | 18 +++++++++--------- .../{GetFaceLists.json => ListFaceLists.json} | 0 ...eFaceLists.json => ListLargeFaceLists.json} | 0 ...nGroups.json => ListLargePersonGroups.json} | 0 ...PersonGroups.json => ListPersonGroups.json} | 0 5 files changed, 9 insertions(+), 9 deletions(-) rename specification/cognitiveservices/data-plane/Face/stable/v1.0/examples/{GetFaceLists.json => ListFaceLists.json} (100%) rename specification/cognitiveservices/data-plane/Face/stable/v1.0/examples/{GetLargeFaceLists.json => ListLargeFaceLists.json} (100%) rename specification/cognitiveservices/data-plane/Face/stable/v1.0/examples/{GetLargePersonGroups.json => ListLargePersonGroups.json} (100%) rename specification/cognitiveservices/data-plane/Face/stable/v1.0/examples/{GetPersonGroups.json => ListPersonGroups.json} (100%) diff --git a/specification/cognitiveservices/data-plane/Face/stable/v1.0/Face.json b/specification/cognitiveservices/data-plane/Face/stable/v1.0/Face.json index 12c5347609cf..19adbeeae00d 100644 --- a/specification/cognitiveservices/data-plane/Face/stable/v1.0/Face.json +++ b/specification/cognitiveservices/data-plane/Face/stable/v1.0/Face.json @@ -720,8 +720,8 @@ } }, "x-ms-examples": { - "Get person groups example": { - "$ref": "./examples/GetPersonGroups.json" + "List person groups example": { + "$ref": "./examples/ListPersonGroups.json" } } } @@ -916,8 +916,8 @@ "application/json" ], "x-ms-examples": { - "Get Face lists example": { - "$ref": "./examples/GetFaceLists.json" + "List Face lists example": { + "$ref": "./examples/ListFaceLists.json" } } } @@ -1619,8 +1619,8 @@ } }, "x-ms-examples": { - "Get large person groups example": { - "$ref": "./examples/GetLargePersonGroups.json" + "List large person groups example": { + "$ref": "./examples/ListLargePersonGroups.json" } } } @@ -1896,8 +1896,8 @@ "application/json" ], "x-ms-examples": { - "Get large face lists example": { - "$ref": "./examples/GetLargeFaceLists.json" + "List large face lists example": { + "$ref": "./examples/ListLargeFaceLists.json" } } } @@ -2083,7 +2083,7 @@ }, "get": { "description": "List all faces in a large face list, and retrieve face information (including userData and persistedFaceIds of registered faces of the face).", - "operationId": "LargeFaceListFace_List", + "operationId": "LargeFaceList_ListFaces", "parameters": [ { "$ref": "#/parameters/largeFaceListId" diff --git a/specification/cognitiveservices/data-plane/Face/stable/v1.0/examples/GetFaceLists.json b/specification/cognitiveservices/data-plane/Face/stable/v1.0/examples/ListFaceLists.json similarity index 100% rename from specification/cognitiveservices/data-plane/Face/stable/v1.0/examples/GetFaceLists.json rename to specification/cognitiveservices/data-plane/Face/stable/v1.0/examples/ListFaceLists.json diff --git a/specification/cognitiveservices/data-plane/Face/stable/v1.0/examples/GetLargeFaceLists.json b/specification/cognitiveservices/data-plane/Face/stable/v1.0/examples/ListLargeFaceLists.json similarity index 100% rename from specification/cognitiveservices/data-plane/Face/stable/v1.0/examples/GetLargeFaceLists.json rename to specification/cognitiveservices/data-plane/Face/stable/v1.0/examples/ListLargeFaceLists.json diff --git a/specification/cognitiveservices/data-plane/Face/stable/v1.0/examples/GetLargePersonGroups.json b/specification/cognitiveservices/data-plane/Face/stable/v1.0/examples/ListLargePersonGroups.json similarity index 100% rename from specification/cognitiveservices/data-plane/Face/stable/v1.0/examples/GetLargePersonGroups.json rename to specification/cognitiveservices/data-plane/Face/stable/v1.0/examples/ListLargePersonGroups.json diff --git a/specification/cognitiveservices/data-plane/Face/stable/v1.0/examples/GetPersonGroups.json b/specification/cognitiveservices/data-plane/Face/stable/v1.0/examples/ListPersonGroups.json similarity index 100% rename from specification/cognitiveservices/data-plane/Face/stable/v1.0/examples/GetPersonGroups.json rename to specification/cognitiveservices/data-plane/Face/stable/v1.0/examples/ListPersonGroups.json From 6019c551df19f24b8a70a2c9d8f691b43cf7f195 Mon Sep 17 00:00:00 2001 From: Siqi Liu Date: Wed, 1 Aug 2018 16:14:28 +0800 Subject: [PATCH 15/16] [Minor] Person_AddPersonFace to Person_AddFace. --- .../cognitiveservices/data-plane/Face/stable/v1.0/Face.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/specification/cognitiveservices/data-plane/Face/stable/v1.0/Face.json b/specification/cognitiveservices/data-plane/Face/stable/v1.0/Face.json index 19adbeeae00d..2eeeb26e89a4 100644 --- a/specification/cognitiveservices/data-plane/Face/stable/v1.0/Face.json +++ b/specification/cognitiveservices/data-plane/Face/stable/v1.0/Face.json @@ -955,7 +955,7 @@ "/persongroups/{personGroupId}/persons/{personId}/persistedfaces": { "post": { "description": "Add a representative face to a person for identification. The input face is specified as an image with a targetFace rectangle.", - "operationId": "PersonGroupPerson_AddPersonFaceFromUrl", + "operationId": "PersonGroupPerson_AddFaceFromUrl", "parameters": [ { "$ref": "#/parameters/personGroupId" @@ -1658,7 +1658,7 @@ "/largepersongroups/{largePersonGroupId}/persons/{personId}/persistedfaces": { "post": { "description": "Add a representative face to a person for identification. The input face is specified as an image with a targetFace rectangle.", - "operationId": "LargePersonGroupPerson_AddPersonFaceFromUrl", + "operationId": "LargePersonGroupPerson_AddFaceFromUrl", "parameters": [ { "$ref": "#/parameters/largePersonGroupId" From a43b96d1f8ebea7d96449c4fa459519b0c48335e Mon Sep 17 00:00:00 2001 From: Siqi Liu Date: Wed, 1 Aug 2018 16:19:37 +0800 Subject: [PATCH 16/16] [Minor] Amend last commit of Person_AddPersonFace to Person_AddFace. --- .../cognitiveservices/data-plane/Face/stable/v1.0/Face.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/specification/cognitiveservices/data-plane/Face/stable/v1.0/Face.json b/specification/cognitiveservices/data-plane/Face/stable/v1.0/Face.json index 2eeeb26e89a4..47b3ed9f0245 100644 --- a/specification/cognitiveservices/data-plane/Face/stable/v1.0/Face.json +++ b/specification/cognitiveservices/data-plane/Face/stable/v1.0/Face.json @@ -2230,7 +2230,7 @@ "/persongroups/{personGroupId}/persons/{personId}/persistedfaces?overload=stream": { "post": { "description": "Add a representative face to a person for identification. The input face is specified as an image with a targetFace rectangle.", - "operationId": "PersonGroupPerson_AddPersonFaceFromStream", + "operationId": "PersonGroupPerson_AddFaceFromStream", "parameters": [ { "$ref": "#/parameters/personGroupId" @@ -2323,7 +2323,7 @@ "/largepersongroups/{largePersonGroupId}/persons/{personId}/persistedfaces?overload=stream": { "post": { "description": "Add a representative face to a person for identification. The input face is specified as an image with a targetFace rectangle.", - "operationId": "LargePersonGroupPerson_AddPersonFaceFromStream", + "operationId": "LargePersonGroupPerson_AddFaceFromStream", "parameters": [ { "$ref": "#/parameters/largePersonGroupId"