diff --git a/specification/cognitiveservices/data-plane/CustomVision/Prediction/readme.md b/specification/cognitiveservices/data-plane/CustomVision/Prediction/readme.md index bb0b21a3d9df..42d9403022a1 100644 --- a/specification/cognitiveservices/data-plane/CustomVision/Prediction/readme.md +++ b/specification/cognitiveservices/data-plane/CustomVision/Prediction/readme.md @@ -17,18 +17,22 @@ openapi-type: data-plane These settings apply only when `--tag=release_1_0` is specified on the command line. ``` yaml $(tag) == 'release_1_0' -input-file: stable/v1.1/Prediction.json +input-file: stable/v2.0/Prediction.json ``` -# Code Generation +# Validation ## Suppression + ``` yaml directive: - - suppress: DefinitionsPropertiesNamesCamelCase - reason: Live service and portal doesn't use came case properties + - suppress: R3017 # GuidUsage + reason: + - Existing service and previous versions use Guid as ids. ``` +# Code Generation + ## Swagger to SDK This section describes what SDK should be generated by the automatic system. @@ -44,7 +48,7 @@ swagger-to-sdk: These settings apply only when `--csharp` is specified on the command line. ``` yaml $(csharp) csharp: - sync-methods: None + sync-methods: all license-header: MICROSOFT_MIT_NO_VERSION azure-arm: false namespace: Microsoft.Azure.CognitiveServices.Vision.CustomVision.Prediction diff --git a/specification/cognitiveservices/data-plane/CustomVision/Prediction/stable/v2.0/Prediction.json b/specification/cognitiveservices/data-plane/CustomVision/Prediction/stable/v2.0/Prediction.json new file mode 100644 index 000000000000..51c067a6c051 --- /dev/null +++ b/specification/cognitiveservices/data-plane/CustomVision/Prediction/stable/v2.0/Prediction.json @@ -0,0 +1,415 @@ +{ + "swagger": "2.0", + "info": { + "version": "2.0", + "title": "PredictionEndpoint" + }, + "host": "southcentralus.api.cognitive.microsoft.com", + "basePath": "/customvision/v2.0/Prediction", + "schemes": [ + "https" + ], + "paths": { + "/{projectId}/url": { + "post": { + "tags": [ + "ImagePredictionApi" + ], + "summary": "Predict an image url and saves the result", + "operationId": "PredictImageUrl", + "consumes": [ + "application/json", + "text/json", + "application/xml", + "text/xml", + "application/x-www-form-urlencoded" + ], + "produces": [ + "application/json", + "text/json", + "application/xml", + "text/xml" + ], + "parameters": [ + { + "name": "projectId", + "in": "path", + "description": "The project id", + "required": true, + "type": "string", + "format": "uuid", + "x-nullable": false + }, + { + "name": "imageUrl", + "in": "body", + "description": "An {Iris.Web.Api.Models.ImageUrl} that contains the url of the image to be evaluated", + "required": true, + "schema": { + "$ref": "#/definitions/ImageUrl" + } + }, + { + "name": "iterationId", + "in": "query", + "description": "Optional. Specifies the id of a particular iteration to evaluate against.\r\n The default iteration for the project will be used when not specified", + "required": false, + "type": "string", + "format": "uuid", + "x-nullable": true + }, + { + "name": "application", + "in": "query", + "description": "Optional. Specifies the name of application using the endpoint", + "required": false, + "type": "string", + "x-nullable": true + }, + { + "$ref": "#/parameters/ApiKey" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/ImagePrediction" + } + } + }, + "x-ms-examples": { + "Successful PredictImageUrl request": { + "$ref": "./examples/PredictImageUrl.json" + } + } + } + }, + "/{projectId}/image": { + "post": { + "tags": [ + "ImagePredictionApi" + ], + "summary": "Predict an image and saves the result", + "operationId": "PredictImage", + "consumes": [ + "multipart/form-data", + "application/octet-stream" + ], + "produces": [ + "application/json", + "text/json", + "application/xml", + "text/xml" + ], + "parameters": [ + { + "name": "projectId", + "in": "path", + "description": "The project id", + "required": true, + "type": "string", + "format": "uuid", + "x-nullable": false + }, + { + "name": "iterationId", + "in": "query", + "description": "Optional. Specifies the id of a particular iteration to evaluate against.\r\n The default iteration for the project will be used when not specified", + "required": false, + "type": "string", + "format": "uuid", + "x-nullable": true + }, + { + "name": "application", + "in": "query", + "description": "Optional. Specifies the name of application using the endpoint", + "required": false, + "type": "string", + "x-nullable": true + }, + { + "name": "imageData", + "in": "formData", + "required": true, + "type": "file" + }, + { + "$ref": "#/parameters/ApiKey" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/ImagePrediction" + } + } + }, + "x-ms-examples": { + "Successful PredictImage request": { + "$ref": "./examples/PredictImage.json" + } + } + } + }, + "/{projectId}/url/nostore": { + "post": { + "tags": [ + "ImagePredictionApi" + ], + "summary": "Predict an image url without saving the result", + "operationId": "PredictImageUrlWithNoStore", + "consumes": [ + "application/json", + "text/json", + "application/xml", + "text/xml", + "application/x-www-form-urlencoded" + ], + "produces": [ + "application/json", + "text/json", + "application/xml", + "text/xml" + ], + "parameters": [ + { + "name": "projectId", + "in": "path", + "description": "The project id", + "required": true, + "type": "string", + "format": "uuid", + "x-nullable": false + }, + { + "name": "imageUrl", + "in": "body", + "description": "An {Iris.Web.Api.Models.ImageUrl} that contains the url of the image to be evaluated", + "required": true, + "schema": { + "$ref": "#/definitions/ImageUrl" + } + }, + { + "name": "iterationId", + "in": "query", + "description": "Optional. Specifies the id of a particular iteration to evaluate against.\r\n The default iteration for the project will be used when not specified", + "required": false, + "type": "string", + "format": "uuid", + "x-nullable": true + }, + { + "name": "application", + "in": "query", + "description": "Optional. Specifies the name of application using the endpoint", + "required": false, + "type": "string", + "x-nullable": true + }, + { + "$ref": "#/parameters/ApiKey" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/ImagePrediction" + } + } + }, + "x-ms-examples": { + "Successful PredictImageUrlWithNoStore request": { + "$ref": "./examples/PredictImageUrlWithNoStore.json" + } + } + } + }, + "/{projectId}/image/nostore": { + "post": { + "tags": [ + "ImagePredictionApi" + ], + "summary": "Predict an image without saving the result", + "operationId": "PredictImageWithNoStore", + "consumes": [ + "multipart/form-data", + "application/octet-stream" + ], + "produces": [ + "application/json", + "text/json", + "application/xml", + "text/xml" + ], + "parameters": [ + { + "name": "projectId", + "in": "path", + "description": "The project id", + "required": true, + "type": "string", + "format": "uuid", + "x-nullable": false + }, + { + "name": "iterationId", + "in": "query", + "description": "Optional. Specifies the id of a particular iteration to evaluate against.\r\n The default iteration for the project will be used when not specified", + "required": false, + "type": "string", + "format": "uuid", + "x-nullable": true + }, + { + "name": "application", + "in": "query", + "description": "Optional. Specifies the name of application using the endpoint", + "required": false, + "type": "string", + "x-nullable": true + }, + { + "name": "imageData", + "in": "formData", + "required": true, + "type": "file" + }, + { + "$ref": "#/parameters/ApiKey" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/ImagePrediction" + } + } + }, + "x-ms-examples": { + "Successful PredictImageWithNoStore request": { + "$ref": "./examples/PredictImageWithNoStore.json" + } + } + } + } + }, + "definitions": { + "ImageUrl": { + "type": "object", + "properties": { + "url": { + "type": "string", + "x-nullable": true + } + }, + "x-nullable": true + }, + "ImagePrediction": { + "type": "object", + "properties": { + "id": { + "format": "uuid", + "type": "string", + "readOnly": true, + "x-nullable": false + }, + "project": { + "format": "uuid", + "type": "string", + "readOnly": true, + "x-nullable": false + }, + "iteration": { + "format": "uuid", + "type": "string", + "readOnly": true, + "x-nullable": false + }, + "created": { + "format": "date-time", + "type": "string", + "readOnly": true, + "x-nullable": false + }, + "predictions": { + "type": "array", + "items": { + "$ref": "#/definitions/Prediction" + }, + "readOnly": true, + "x-nullable": true + } + }, + "x-nullable": true + }, + "Prediction": { + "type": "object", + "properties": { + "probability": { + "format": "float", + "type": "number", + "readOnly": true, + "x-nullable": false + }, + "tagId": { + "format": "uuid", + "type": "string", + "readOnly": true, + "x-nullable": false + }, + "tagName": { + "type": "string", + "readOnly": true, + "x-nullable": true + }, + "boundingBox": { + "$ref": "#/definitions/BoundingBox", + "readOnly": true + } + }, + "x-nullable": true + }, + "BoundingBox": { + "type": "object", + "properties": { + "left": { + "format": "float", + "type": "number", + "x-nullable": false + }, + "top": { + "format": "float", + "type": "number", + "x-nullable": false + }, + "width": { + "format": "float", + "type": "number", + "x-nullable": false + }, + "height": { + "format": "float", + "type": "number", + "x-nullable": false + } + }, + "x-nullable": true + } + }, + "parameters": { + "ApiKey": { + "name": "Prediction-Key", + "in": "header", + "required": true, + "type": "string", + "x-ms-client-name": "ApiKey", + "x-ms-parameter-location": "client" + } + } +} \ No newline at end of file diff --git a/specification/cognitiveservices/data-plane/CustomVision/Prediction/stable/v2.0/examples/PredictImage.json b/specification/cognitiveservices/data-plane/CustomVision/Prediction/stable/v2.0/examples/PredictImage.json new file mode 100644 index 000000000000..645a80f03a73 --- /dev/null +++ b/specification/cognitiveservices/data-plane/CustomVision/Prediction/stable/v2.0/examples/PredictImage.json @@ -0,0 +1,32 @@ +{ + "parameters": { + "Content-Type": "application/json", + "Prediction-Key": "{API Key}", + "projectId": "64b822c5-8082-4b36-a426-27225f4aa18c", + "iterationId": "fe1e83c4-6f50-4899-9544-6bb08cf0e15a", + "imageData": "multipart-form-data" + }, + "responses": { + "200": { + "headers": {}, + "body": { + "id": "951098b2-9b69-427b-bddb-d5cb618874e3", + "project": "64b822c5-8082-4b36-a426-27225f4aa18c", + "iteration": "fe1e83c4-6f50-4899-9544-6bb08cf0e15a", + "created": "2017-12-19T14:21:41.6789561Z", + "predictions": [ + { + "tagId": "e31ff107-5505-4753-be42-b369b21b026c", + "tagName": "Hemlock", + "probability": 0.05149666 + }, + { + "tagId": "349d72ac-0948-4d51-b1e4-c14a1f9b848a", + "tagName": "Japanese Cherry", + "probability": 0.000193528482 + } + ] + } + } + } +} \ No newline at end of file diff --git a/specification/cognitiveservices/data-plane/CustomVision/Prediction/stable/v2.0/examples/PredictImageUrl.json b/specification/cognitiveservices/data-plane/CustomVision/Prediction/stable/v2.0/examples/PredictImageUrl.json new file mode 100644 index 000000000000..0727445f3d86 --- /dev/null +++ b/specification/cognitiveservices/data-plane/CustomVision/Prediction/stable/v2.0/examples/PredictImageUrl.json @@ -0,0 +1,34 @@ +{ + "parameters": { + "Content-Type": "application/json", + "Prediction-Key": "{API Key}", + "projectId": "64b822c5-8082-4b36-a426-27225f4aa18c", + "iterationId": "fe1e83c4-6f50-4899-9544-6bb08cf0e15a", + "imageUrl": { + "url": "{Image URL}" + } + }, + "responses": { + "200": { + "headers": {}, + "body": { + "id": "951098b2-9b69-427b-bddb-d5cb618874e3", + "project": "64b822c5-8082-4b36-a426-27225f4aa18c", + "iteration": "fe1e83c4-6f50-4899-9544-6bb08cf0e15a", + "created": "2017-12-19T14:21:41.6789561Z", + "predictions": [ + { + "tagId": "e31ff107-5505-4753-be42-b369b21b026c", + "tagName": "Hemlock", + "probability": 0.05149666 + }, + { + "tagId": "349d72ac-0948-4d51-b1e4-c14a1f9b848a", + "tagName": "Japanese Cherry", + "probability": 0.000193528482 + } + ] + } + } + } +} \ No newline at end of file diff --git a/specification/cognitiveservices/data-plane/CustomVision/Prediction/stable/v2.0/examples/PredictImageUrlWithNoStore.json b/specification/cognitiveservices/data-plane/CustomVision/Prediction/stable/v2.0/examples/PredictImageUrlWithNoStore.json new file mode 100644 index 000000000000..0727445f3d86 --- /dev/null +++ b/specification/cognitiveservices/data-plane/CustomVision/Prediction/stable/v2.0/examples/PredictImageUrlWithNoStore.json @@ -0,0 +1,34 @@ +{ + "parameters": { + "Content-Type": "application/json", + "Prediction-Key": "{API Key}", + "projectId": "64b822c5-8082-4b36-a426-27225f4aa18c", + "iterationId": "fe1e83c4-6f50-4899-9544-6bb08cf0e15a", + "imageUrl": { + "url": "{Image URL}" + } + }, + "responses": { + "200": { + "headers": {}, + "body": { + "id": "951098b2-9b69-427b-bddb-d5cb618874e3", + "project": "64b822c5-8082-4b36-a426-27225f4aa18c", + "iteration": "fe1e83c4-6f50-4899-9544-6bb08cf0e15a", + "created": "2017-12-19T14:21:41.6789561Z", + "predictions": [ + { + "tagId": "e31ff107-5505-4753-be42-b369b21b026c", + "tagName": "Hemlock", + "probability": 0.05149666 + }, + { + "tagId": "349d72ac-0948-4d51-b1e4-c14a1f9b848a", + "tagName": "Japanese Cherry", + "probability": 0.000193528482 + } + ] + } + } + } +} \ No newline at end of file diff --git a/specification/cognitiveservices/data-plane/CustomVision/Prediction/stable/v2.0/examples/PredictImageWithNoStore.json b/specification/cognitiveservices/data-plane/CustomVision/Prediction/stable/v2.0/examples/PredictImageWithNoStore.json new file mode 100644 index 000000000000..645a80f03a73 --- /dev/null +++ b/specification/cognitiveservices/data-plane/CustomVision/Prediction/stable/v2.0/examples/PredictImageWithNoStore.json @@ -0,0 +1,32 @@ +{ + "parameters": { + "Content-Type": "application/json", + "Prediction-Key": "{API Key}", + "projectId": "64b822c5-8082-4b36-a426-27225f4aa18c", + "iterationId": "fe1e83c4-6f50-4899-9544-6bb08cf0e15a", + "imageData": "multipart-form-data" + }, + "responses": { + "200": { + "headers": {}, + "body": { + "id": "951098b2-9b69-427b-bddb-d5cb618874e3", + "project": "64b822c5-8082-4b36-a426-27225f4aa18c", + "iteration": "fe1e83c4-6f50-4899-9544-6bb08cf0e15a", + "created": "2017-12-19T14:21:41.6789561Z", + "predictions": [ + { + "tagId": "e31ff107-5505-4753-be42-b369b21b026c", + "tagName": "Hemlock", + "probability": 0.05149666 + }, + { + "tagId": "349d72ac-0948-4d51-b1e4-c14a1f9b848a", + "tagName": "Japanese Cherry", + "probability": 0.000193528482 + } + ] + } + } + } +} \ No newline at end of file diff --git a/specification/cognitiveservices/data-plane/CustomVision/Training/readme.md b/specification/cognitiveservices/data-plane/CustomVision/Training/readme.md index 38bc744b6ba2..96f8a70f7240 100644 --- a/specification/cognitiveservices/data-plane/CustomVision/Training/readme.md +++ b/specification/cognitiveservices/data-plane/CustomVision/Training/readme.md @@ -17,18 +17,22 @@ openapi-type: data-plane These settings apply only when `--tag=release_1_0` is specified on the command line. ``` yaml $(tag) == 'release_1_0' -input-file: stable/v1.2/Training.json +input-file: stable/v2.0/Training.json ``` -# Code Generation +# Validation ## Suppression + ``` yaml directive: - - suppress: DefinitionsPropertiesNamesCamelCase - reason: Live service and portal doesn't use came case properties + - suppress: R3017 # GuidUsage + reason: + - Existing service and previous versions use Guid as ids. ``` +# Code Generation + ## Swagger to SDK This section describes what SDK should be generated by the automatic system. @@ -44,7 +48,7 @@ swagger-to-sdk: These settings apply only when `--csharp` is specified on the command line. ``` yaml $(csharp) csharp: - sync-methods: None + sync-methods: all license-header: MICROSOFT_MIT_NO_VERSION azure-arm: false namespace: Microsoft.Azure.CognitiveServices.Vision.CustomVision.Training diff --git a/specification/cognitiveservices/data-plane/CustomVision/Training/stable/v2.0/Training.json b/specification/cognitiveservices/data-plane/CustomVision/Training/stable/v2.0/Training.json new file mode 100644 index 000000000000..702f5975a7d3 --- /dev/null +++ b/specification/cognitiveservices/data-plane/CustomVision/Training/stable/v2.0/Training.json @@ -0,0 +1,3672 @@ +{ + "swagger": "2.0", + "info": { + "version": "2.0", + "title": "TrainingApi" + }, + "host": "southcentralus.api.cognitive.microsoft.com", + "basePath": "/customvision/v2.0/Training", + "schemes": [ + "https" + ], + "paths": { + "/domains": { + "get": { + "tags": [ + "DomainsApi" + ], + "summary": "Get a list of the available domains", + "operationId": "GetDomains", + "consumes": [], + "produces": [ + "application/json", + "text/json", + "application/xml", + "text/xml" + ], + "parameters": [ + { + "$ref": "#/parameters/ApiKey" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/Domain" + }, + "x-nullable": true + } + } + }, + "x-ms-examples": { + "Successful GetDomains request": { + "$ref": "./examples/GetDomains.json" + } + } + } + }, + "/domains/{domainId}": { + "get": { + "tags": [ + "DomainsApi" + ], + "summary": "Get information about a specific domain", + "operationId": "GetDomain", + "consumes": [], + "produces": [ + "application/json", + "text/json", + "application/xml", + "text/xml" + ], + "parameters": [ + { + "name": "domainId", + "in": "path", + "description": "The id of the domain to get information about", + "required": true, + "type": "string", + "format": "uuid", + "x-nullable": false + }, + { + "$ref": "#/parameters/ApiKey" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/Domain" + } + } + }, + "x-ms-examples": { + "Successful GetDomain request": { + "$ref": "./examples/GetDomain.json" + } + } + } + }, + "/projects/{projectId}/images/tagged": { + "get": { + "tags": [ + "ImageApi" + ], + "summary": "Get tagged images for a given project iteration", + "description": "This API supports batching and range selection. By default it will only return first 50 images matching images.\r\nUse the {take} and {skip} parameters to control how many images to return in a given batch.\r\nThe filtering is on an and/or relationship. For example, if the provided tag ids are for the \"Dog\" and\r\n\"Cat\" tags, then only images tagged with Dog and/or Cat will be returned", + "operationId": "GetTaggedImages", + "consumes": [], + "produces": [ + "application/json", + "text/json", + "application/xml", + "text/xml" + ], + "parameters": [ + { + "name": "projectId", + "in": "path", + "description": "The project id", + "required": true, + "type": "string", + "format": "uuid", + "x-nullable": false + }, + { + "name": "iterationId", + "in": "query", + "description": "The iteration id. Defaults to workspace", + "required": false, + "type": "string", + "format": "uuid", + "x-nullable": true + }, + { + "name": "tagIds", + "in": "query", + "description": "A list of tags ids to filter the images. Defaults to all tagged images when null. Limited to 20", + "required": false, + "type": "array", + "items": { + "type": "string", + "x-nullable": false + }, + "collectionFormat": "csv", + "x-nullable": true + }, + { + "name": "orderBy", + "in": "query", + "description": "The ordering. Defaults to newest", + "required": false, + "type": "string", + "enum": [ + "Newest", + "Oldest" + ], + "x-nullable": false + }, + { + "name": "take", + "in": "query", + "description": "Maximum number of images to return. Defaults to 50, limited to 256", + "required": false, + "type": "integer", + "format": "int32", + "default": 50 + }, + { + "name": "skip", + "in": "query", + "description": "Number of images to skip before beginning the image batch. Defaults to 0", + "required": false, + "type": "integer", + "format": "int32", + "default": 0 + }, + { + "$ref": "#/parameters/ApiKey" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/Image" + }, + "x-nullable": true + } + } + }, + "x-ms-examples": { + "Successful GetTaggedImages request": { + "$ref": "./examples/GetTaggedImages.json" + } + } + } + }, + "/projects/{projectId}/images/untagged": { + "get": { + "tags": [ + "ImageApi" + ], + "summary": "Get untagged images for a given project iteration", + "description": "This API supports batching and range selection. By default it will only return first 50 images matching images.\r\nUse the {take} and {skip} parameters to control how many images to return in a given batch.", + "operationId": "GetUntaggedImages", + "consumes": [], + "produces": [ + "application/json", + "text/json", + "application/xml", + "text/xml" + ], + "parameters": [ + { + "name": "projectId", + "in": "path", + "description": "The project id", + "required": true, + "type": "string", + "format": "uuid", + "x-nullable": false + }, + { + "name": "iterationId", + "in": "query", + "description": "The iteration id. Defaults to workspace", + "required": false, + "type": "string", + "format": "uuid", + "x-nullable": true + }, + { + "name": "orderBy", + "in": "query", + "description": "The ordering. Defaults to newest", + "required": false, + "type": "string", + "enum": [ + "Newest", + "Oldest" + ], + "x-nullable": false + }, + { + "name": "take", + "in": "query", + "description": "Maximum number of images to return. Defaults to 50, limited to 256", + "required": false, + "type": "integer", + "format": "int32", + "default": 50 + }, + { + "name": "skip", + "in": "query", + "description": "Number of images to skip before beginning the image batch. Defaults to 0", + "required": false, + "type": "integer", + "format": "int32", + "default": 0 + }, + { + "$ref": "#/parameters/ApiKey" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/Image" + }, + "x-nullable": true + } + } + }, + "x-ms-examples": { + "Successful GetUntaggedImages request": { + "$ref": "./examples/GetUntaggedImages.json" + } + } + } + }, + "/projects/{projectId}/images/tagged/count": { + "get": { + "tags": [ + "ImageApi" + ], + "summary": "Gets the number of images tagged with the provided {tagIds}", + "description": "The filtering is on an and/or relationship. For example, if the provided tag ids are for the \"Dog\" and\r\n\"Cat\" tags, then only images tagged with Dog and/or Cat will be returned", + "operationId": "GetTaggedImageCount", + "consumes": [], + "produces": [ + "application/json", + "text/json", + "application/xml", + "text/xml" + ], + "parameters": [ + { + "name": "projectId", + "in": "path", + "description": "The project id", + "required": true, + "type": "string", + "format": "uuid", + "x-nullable": false + }, + { + "name": "iterationId", + "in": "query", + "description": "The iteration id. Defaults to workspace", + "required": false, + "type": "string", + "format": "uuid", + "x-nullable": true + }, + { + "name": "tagIds", + "in": "query", + "description": "A list of tags ids to filter the images to count. Defaults to all tags when null.", + "required": false, + "type": "array", + "items": { + "type": "string", + "x-nullable": false + }, + "collectionFormat": "csv", + "x-nullable": true + }, + { + "$ref": "#/parameters/ApiKey" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "format": "int32", + "type": "integer", + "x-nullable": false + } + } + }, + "x-ms-examples": { + "Successful GetTaggedImageCount request": { + "$ref": "./examples/GetTaggedImageCount.json" + } + } + } + }, + "/projects/{projectId}/images/untagged/count": { + "get": { + "tags": [ + "ImageApi" + ], + "summary": "Gets the number of untagged images", + "description": "This API returns the images which have no tags for a given project and optionally an iteration. If no iteration is specified the\r\ncurrent workspace is used.", + "operationId": "GetUntaggedImageCount", + "consumes": [], + "produces": [ + "application/json", + "text/json", + "application/xml", + "text/xml" + ], + "parameters": [ + { + "name": "projectId", + "in": "path", + "description": "The project id", + "required": true, + "type": "string", + "format": "uuid", + "x-nullable": false + }, + { + "name": "iterationId", + "in": "query", + "description": "The iteration id. Defaults to workspace", + "required": false, + "type": "string", + "format": "uuid", + "x-nullable": true + }, + { + "$ref": "#/parameters/ApiKey" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "format": "int32", + "type": "integer", + "x-nullable": false + } + } + }, + "x-ms-examples": { + "Successful GetUntaggedImageCount request": { + "$ref": "./examples/GetUntaggedImageCount.json" + } + } + } + }, + "/projects/{projectId}/images/id": { + "get": { + "tags": [ + "ImageApi" + ], + "summary": "Get images by id for a given project iteration", + "description": "This API will return a set of Images for the specified tags and optionally iteration. If no iteration is specified the\r\ncurrent workspace is used.", + "operationId": "GetImagesByIds", + "consumes": [], + "produces": [ + "application/json", + "text/json", + "application/xml", + "text/xml" + ], + "parameters": [ + { + "name": "projectId", + "in": "path", + "description": "The project id", + "required": true, + "type": "string", + "format": "uuid", + "x-nullable": false + }, + { + "name": "imageIds", + "in": "query", + "description": "The list of image ids to retrieve. Limited to 256", + "required": false, + "type": "array", + "items": { + "type": "string", + "x-nullable": false + }, + "collectionFormat": "csv", + "x-nullable": true + }, + { + "name": "iterationId", + "in": "query", + "description": "The iteration id. Defaults to workspace", + "required": false, + "type": "string", + "format": "uuid", + "x-nullable": true + }, + { + "$ref": "#/parameters/ApiKey" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/Image" + }, + "x-nullable": true + } + } + }, + "x-ms-examples": { + "Successful GetImagesByIds request": { + "$ref": "./examples/GetImagesByIds.json" + } + } + } + }, + "/projects/{projectId}/images": { + "post": { + "tags": [ + "ImageApi" + ], + "summary": "Add the provided images to the set of training images", + "description": "This API accepts body content as multipart/form-data and application/octet-stream. When using multipart\r\nmultiple image files can be sent at once, with a maximum of 64 files", + "operationId": "CreateImagesFromData", + "consumes": [ + "multipart/form-data", + "application/octet-stream" + ], + "produces": [ + "application/json", + "text/json", + "application/xml", + "text/xml" + ], + "parameters": [ + { + "name": "projectId", + "in": "path", + "description": "The project id", + "required": true, + "type": "string", + "format": "uuid", + "x-nullable": false + }, + { + "name": "tagIds", + "in": "query", + "description": "The tags ids with which to tag each image. Limited to 20", + "required": false, + "type": "array", + "items": { + "type": "string", + "x-nullable": false + }, + "collectionFormat": "csv", + "x-nullable": true + }, + { + "name": "imageData", + "in": "formData", + "required": true, + "type": "file" + }, + { + "$ref": "#/parameters/ApiKey" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/ImageCreateSummary" + } + } + }, + "x-ms-examples": { + "Successful CreateImagesFromData request": { + "$ref": "./examples/CreateImagesFromData.json" + } + } + }, + "delete": { + "tags": [ + "ImageApi" + ], + "summary": "Delete images from the set of training images", + "operationId": "DeleteImages", + "consumes": [], + "produces": [], + "parameters": [ + { + "name": "projectId", + "in": "path", + "description": "The project id", + "required": true, + "type": "string", + "format": "uuid", + "x-nullable": false + }, + { + "name": "imageIds", + "in": "query", + "description": "Ids of the images to be deleted. Limted to 256 images per batch", + "required": true, + "type": "array", + "items": { + "type": "string", + "x-nullable": false + }, + "collectionFormat": "csv", + "x-nullable": true + }, + { + "$ref": "#/parameters/ApiKey" + } + ], + "responses": { + "204": { + "description": "No Content" + } + }, + "x-ms-examples": { + "Successful DeleteImages request": { + "$ref": "./examples/DeleteImages.json" + } + } + } + }, + "/projects/{projectId}/images/files": { + "post": { + "tags": [ + "ImageApi" + ], + "summary": "Add the provided batch of images to the set of training images", + "description": "This API accepts a batch of files, and optionally tags, to create images. There is a limit of 64 images and 20 tags.", + "operationId": "CreateImagesFromFiles", + "consumes": [ + "application/json", + "text/json", + "application/xml", + "text/xml", + "application/x-www-form-urlencoded" + ], + "produces": [ + "application/json", + "text/json", + "application/xml", + "text/xml" + ], + "parameters": [ + { + "name": "projectId", + "in": "path", + "description": "The project id", + "required": true, + "type": "string", + "format": "uuid", + "x-nullable": false + }, + { + "name": "batch", + "in": "body", + "description": "The batch of image files to add. Limited to 64 images and 20 tags per batch", + "required": true, + "schema": { + "$ref": "#/definitions/ImageFileCreateBatch" + } + }, + { + "$ref": "#/parameters/ApiKey" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/ImageCreateSummary" + } + } + }, + "x-ms-examples": { + "Successful CreateImagesFromFiles request": { + "$ref": "./examples/CreateImagesFromFiles.json" + } + } + } + }, + "/projects/{projectId}/images/urls": { + "post": { + "tags": [ + "ImageApi" + ], + "summary": "Add the provided images urls to the set of training images", + "description": "This API accepts a batch of urls, and optionally tags, to create images. There is a limit of 64 images and 20 tags.", + "operationId": "CreateImagesFromUrls", + "consumes": [ + "application/json", + "text/json", + "application/xml", + "text/xml", + "application/x-www-form-urlencoded" + ], + "produces": [ + "application/json", + "text/json", + "application/xml", + "text/xml" + ], + "parameters": [ + { + "name": "projectId", + "in": "path", + "description": "The project id", + "required": true, + "type": "string", + "format": "uuid", + "x-nullable": false + }, + { + "name": "batch", + "in": "body", + "description": "Image urls and tag ids. Limited to 64 images and 20 tags per batch", + "required": true, + "schema": { + "$ref": "#/definitions/ImageUrlCreateBatch" + } + }, + { + "$ref": "#/parameters/ApiKey" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/ImageCreateSummary" + } + } + }, + "x-ms-examples": { + "Successful CreateImagesFromUrls request": { + "$ref": "./examples/CreateImagesFromUrls.json" + } + } + } + }, + "/projects/{projectId}/images/predictions": { + "post": { + "tags": [ + "ImageApi" + ], + "summary": "Add the specified predicted images to the set of training images", + "description": "This API creates a batch of images from predicted images specified. There is a limit of 64 images and 20 tags.", + "operationId": "CreateImagesFromPredictions", + "consumes": [ + "application/json", + "text/json", + "application/xml", + "text/xml", + "application/x-www-form-urlencoded" + ], + "produces": [ + "application/json", + "text/json", + "application/xml", + "text/xml" + ], + "parameters": [ + { + "name": "projectId", + "in": "path", + "description": "The project id", + "required": true, + "type": "string", + "format": "uuid", + "x-nullable": false + }, + { + "name": "batch", + "in": "body", + "description": "Image and tag ids. Limted to 64 images and 20 tags per batch", + "required": true, + "schema": { + "$ref": "#/definitions/ImageIdCreateBatch" + } + }, + { + "$ref": "#/parameters/ApiKey" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/ImageCreateSummary" + } + } + }, + "x-ms-examples": { + "Successful CreateImagesFromPredictions request": { + "$ref": "./examples/CreateImagesFromPredictions.json" + } + } + } + }, + "/projects/{projectId}/images/tags": { + "post": { + "tags": [ + "ImageApi" + ], + "summary": "Associate a set of images with a set of tags", + "operationId": "CreateImageTags", + "consumes": [ + "application/json", + "text/json", + "application/xml", + "text/xml", + "application/x-www-form-urlencoded" + ], + "produces": [ + "application/json", + "text/json", + "application/xml", + "text/xml" + ], + "parameters": [ + { + "name": "projectId", + "in": "path", + "description": "The project id", + "required": true, + "type": "string", + "format": "uuid", + "x-nullable": false + }, + { + "name": "batch", + "in": "body", + "description": "Batch of image tags. Limited to 128 tags per batch", + "required": true, + "schema": { + "$ref": "#/definitions/ImageTagCreateBatch" + } + }, + { + "$ref": "#/parameters/ApiKey" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/ImageTagCreateSummary" + } + } + }, + "x-ms-examples": { + "Successful CreateImageTags request": { + "$ref": "./examples/CreateImageTags.json" + } + } + }, + "delete": { + "tags": [ + "ImageApi" + ], + "summary": "Remove a set of tags from a set of images", + "operationId": "DeleteImageTags", + "consumes": [], + "produces": [], + "parameters": [ + { + "name": "projectId", + "in": "path", + "description": "The project id", + "required": true, + "type": "string", + "format": "uuid", + "x-nullable": false + }, + { + "name": "imageIds", + "in": "query", + "description": "Image ids. Limited to 64 images", + "required": true, + "type": "array", + "items": { + "type": "string", + "x-nullable": false + }, + "collectionFormat": "csv", + "x-nullable": true + }, + { + "name": "tagIds", + "in": "query", + "description": "Tags to be deleted from the specified images. Limted to 20 tags", + "required": true, + "type": "array", + "items": { + "type": "string", + "x-nullable": false + }, + "collectionFormat": "csv", + "x-nullable": true + }, + { + "$ref": "#/parameters/ApiKey" + } + ], + "responses": { + "204": { + "description": "No Content" + } + }, + "x-ms-examples": { + "Successful DeleteImageTags request": { + "$ref": "./examples/DeleteImageTags.json" + } + } + } + }, + "/projects/{projectId}/images/regions": { + "post": { + "tags": [ + "ImageApi" + ], + "summary": "Create a set of image regions", + "description": "This API accepts a batch of image regions, and optionally tags, to update existing images with region information.\r\nThere is a limit of 64 entries in the batch.", + "operationId": "CreateImageRegions", + "consumes": [ + "application/json", + "text/json", + "application/xml", + "text/xml", + "application/x-www-form-urlencoded" + ], + "produces": [ + "application/json", + "text/json", + "application/xml", + "text/xml" + ], + "parameters": [ + { + "name": "projectId", + "in": "path", + "description": "The project id", + "required": true, + "type": "string", + "format": "uuid", + "x-nullable": false + }, + { + "name": "batch", + "in": "body", + "description": "Batch of image regions which include a tag and bounding box. Limited to 64", + "required": true, + "schema": { + "$ref": "#/definitions/ImageRegionCreateBatch" + } + }, + { + "$ref": "#/parameters/ApiKey" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/ImageRegionCreateSummary" + } + } + }, + "x-ms-examples": { + "Successful CreateImageRegions request": { + "$ref": "./examples/CreateImageRegions.json" + } + } + }, + "delete": { + "tags": [ + "ImageApi" + ], + "summary": "Delete a set of image regions", + "operationId": "DeleteImageRegions", + "consumes": [], + "produces": [], + "parameters": [ + { + "name": "projectId", + "in": "path", + "description": "The project id", + "required": true, + "type": "string", + "format": "uuid", + "x-nullable": false + }, + { + "name": "regionIds", + "in": "query", + "description": "Regions to delete. Limited to 64", + "required": true, + "type": "array", + "items": { + "type": "string", + "x-nullable": false + }, + "collectionFormat": "csv", + "x-nullable": true + }, + { + "$ref": "#/parameters/ApiKey" + } + ], + "responses": { + "204": { + "description": "No Content" + } + }, + "x-ms-examples": { + "Successful DeleteImageRegions request": { + "$ref": "./examples/DeleteImageRegions.json" + } + } + } + }, + "/{projectId}/images/{imageId}/regionproposals": { + "post": { + "tags": [ + "ImageRegionProposalApi" + ], + "summary": "Get region proposals for an image. Returns empty array if no proposals are found.", + "description": "This API will get region proposals for an image along with confidences for the region. It returns an empty array if no proposals are found.", + "operationId": "GetImageRegionProposals", + "consumes": [], + "produces": [ + "application/json", + "text/json" + ], + "parameters": [ + { + "name": "projectId", + "in": "path", + "description": "The project id", + "required": true, + "type": "string", + "format": "uuid", + "x-nullable": false + }, + { + "name": "imageId", + "in": "path", + "description": "The image id", + "required": true, + "type": "string", + "format": "uuid", + "x-nullable": false + }, + { + "$ref": "#/parameters/ApiKey" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/ImageRegionProposal" + } + } + }, + "x-ms-examples": { + "Successful GetImageRegionProposals request": { + "$ref": "./examples/GetImageRegionProposals.json" + } + } + } + }, + "/projects/{projectId}/predictions": { + "delete": { + "tags": [ + "PredictionsApi" + ], + "summary": "Delete a set of predicted images and their associated prediction results", + "operationId": "DeletePrediction", + "consumes": [], + "produces": [], + "parameters": [ + { + "name": "projectId", + "in": "path", + "description": "The project id", + "required": true, + "type": "string", + "format": "uuid", + "x-nullable": false + }, + { + "name": "ids", + "in": "query", + "description": "The prediction ids. Limited to 64", + "required": true, + "type": "array", + "items": { + "type": "string", + "x-nullable": false + }, + "collectionFormat": "csv", + "x-nullable": true + }, + { + "$ref": "#/parameters/ApiKey" + } + ], + "responses": { + "204": { + "description": "No Content" + } + }, + "x-ms-examples": { + "Successful DeletePrediction request": { + "$ref": "./examples/DeletePrediction.json" + } + } + } + }, + "/projects/{projectId}/predictions/query": { + "post": { + "tags": [ + "PredictionsApi" + ], + "summary": "Get images that were sent to your prediction endpoint", + "operationId": "QueryPredictions", + "consumes": [ + "application/json", + "text/json", + "application/xml", + "text/xml", + "application/x-www-form-urlencoded" + ], + "produces": [ + "application/json", + "text/json", + "application/xml", + "text/xml" + ], + "parameters": [ + { + "name": "projectId", + "in": "path", + "description": "The project id", + "required": true, + "type": "string", + "format": "uuid", + "x-nullable": false + }, + { + "name": "query", + "in": "body", + "description": "Parameters used to query the predictions. Limited to combining 2 tags", + "required": true, + "schema": { + "$ref": "#/definitions/PredictionQueryToken" + } + }, + { + "$ref": "#/parameters/ApiKey" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/PredictionQueryResult" + } + } + }, + "x-ms-examples": { + "Successful QueryPredictions request": { + "$ref": "./examples/QueryPredictions.json" + } + } + } + }, + "/projects/{projectId}/quicktest/url": { + "post": { + "tags": [ + "PredictionsApi" + ], + "summary": "Quick test an image url", + "operationId": "QuickTestImageUrl", + "consumes": [ + "application/json", + "text/json", + "application/xml", + "text/xml", + "application/x-www-form-urlencoded" + ], + "produces": [ + "application/json", + "text/json", + "application/xml", + "text/xml" + ], + "parameters": [ + { + "name": "projectId", + "in": "path", + "description": "The project to evaluate against", + "required": true, + "type": "string", + "format": "uuid", + "x-nullable": false + }, + { + "name": "imageUrl", + "in": "body", + "description": "An {Iris.Web.Api.Models.ImageUrl} that contains the url of the image to be evaluated", + "required": true, + "schema": { + "$ref": "#/definitions/ImageUrl" + } + }, + { + "name": "iterationId", + "in": "query", + "description": "Optional. Specifies the id of a particular iteration to evaluate against.\r\n The default iteration for the project will be used when not specified.", + "required": false, + "type": "string", + "format": "uuid", + "x-nullable": true + }, + { + "$ref": "#/parameters/ApiKey" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/ImagePrediction" + } + } + }, + "x-ms-examples": { + "Successful QuickTestImageUrl request": { + "$ref": "./examples/QuickTestImageUrl.json" + } + } + } + }, + "/projects/{projectId}/quicktest/image": { + "post": { + "tags": [ + "PredictionsApi" + ], + "summary": "Quick test an image", + "operationId": "QuickTestImage", + "consumes": [ + "multipart/form-data", + "application/octet-stream" + ], + "produces": [ + "application/json", + "text/json", + "application/xml", + "text/xml" + ], + "parameters": [ + { + "name": "projectId", + "in": "path", + "description": "The project id", + "required": true, + "type": "string", + "format": "uuid", + "x-nullable": false + }, + { + "name": "iterationId", + "in": "query", + "description": "Optional. Specifies the id of a particular iteration to evaluate against.\r\n The default iteration for the project will be used when not specified.", + "required": false, + "type": "string", + "format": "uuid", + "x-nullable": true + }, + { + "name": "imageData", + "in": "formData", + "required": true, + "type": "file" + }, + { + "$ref": "#/parameters/ApiKey" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/ImagePrediction" + } + } + }, + "x-ms-examples": { + "Successful QuickTestImage request": { + "$ref": "./examples/QuickTestImage.json" + } + } + } + }, + "/projects/{projectId}/train": { + "post": { + "tags": [ + "ProjectApi" + ], + "summary": "Queues project for training", + "operationId": "TrainProject", + "consumes": [], + "produces": [ + "application/json", + "text/json", + "application/xml", + "text/xml" + ], + "parameters": [ + { + "name": "projectId", + "in": "path", + "description": "The project id", + "required": true, + "type": "string", + "format": "uuid", + "x-nullable": false + }, + { + "$ref": "#/parameters/ApiKey" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/Iteration" + } + } + }, + "x-ms-examples": { + "Successful TrainProject request": { + "$ref": "./examples/TrainProject.json" + } + } + } + }, + "/projects": { + "get": { + "tags": [ + "ProjectApi" + ], + "summary": "Get your projects", + "operationId": "GetProjects", + "consumes": [], + "produces": [ + "application/json", + "text/json", + "application/xml", + "text/xml" + ], + "parameters": [ + { + "$ref": "#/parameters/ApiKey" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/Project" + }, + "x-nullable": true + } + } + }, + "x-ms-examples": { + "Successful GetProjects request": { + "$ref": "./examples/GetProjects.json" + } + } + }, + "post": { + "tags": [ + "ProjectApi" + ], + "summary": "Create a project", + "operationId": "CreateProject", + "consumes": [], + "produces": [ + "application/json", + "text/json", + "application/xml", + "text/xml" + ], + "parameters": [ + { + "name": "name", + "in": "query", + "description": "Name of the project", + "required": true, + "type": "string", + "x-nullable": true + }, + { + "name": "description", + "in": "query", + "description": "The description of the project", + "required": false, + "type": "string", + "x-nullable": true + }, + { + "name": "domainId", + "in": "query", + "description": "The id of the domain to use for this project. Defaults to General", + "required": false, + "type": "string", + "format": "uuid", + "x-nullable": true + }, + { + "$ref": "#/parameters/ApiKey" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/Project" + } + } + }, + "x-ms-examples": { + "Successful CreateProject request": { + "$ref": "./examples/CreateProject.json" + } + } + } + }, + "/projects/{projectId}": { + "get": { + "tags": [ + "ProjectApi" + ], + "summary": "Get a specific project", + "operationId": "GetProject", + "consumes": [], + "produces": [ + "application/json", + "text/json", + "application/xml", + "text/xml" + ], + "parameters": [ + { + "name": "projectId", + "in": "path", + "description": "The id of the project to get", + "required": true, + "type": "string", + "format": "uuid", + "x-nullable": false + }, + { + "$ref": "#/parameters/ApiKey" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/Project" + } + } + }, + "x-ms-examples": { + "Successful GetProject request": { + "$ref": "./examples/GetProject.json" + } + } + }, + "delete": { + "tags": [ + "ProjectApi" + ], + "summary": "Delete a specific project", + "operationId": "DeleteProject", + "consumes": [], + "produces": [], + "parameters": [ + { + "name": "projectId", + "in": "path", + "description": "The project id", + "required": true, + "type": "string", + "format": "uuid", + "x-nullable": false + }, + { + "$ref": "#/parameters/ApiKey" + } + ], + "responses": { + "204": { + "description": "No Content" + } + }, + "x-ms-examples": { + "Successful DeleteProject request": { + "$ref": "./examples/DeleteProject.json" + } + } + }, + "patch": { + "tags": [ + "ProjectApi" + ], + "summary": "Update a specific project", + "operationId": "UpdateProject", + "consumes": [ + "application/json", + "text/json", + "application/xml", + "text/xml", + "application/x-www-form-urlencoded" + ], + "produces": [ + "application/json", + "text/json", + "application/xml", + "text/xml" + ], + "parameters": [ + { + "name": "projectId", + "in": "path", + "description": "The id of the project to update", + "required": true, + "type": "string", + "format": "uuid", + "x-nullable": false + }, + { + "name": "updatedProject", + "in": "body", + "description": "The updated project model", + "required": true, + "schema": { + "$ref": "#/definitions/Project" + } + }, + { + "$ref": "#/parameters/ApiKey" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/Project" + } + } + }, + "x-ms-examples": { + "Successful UpdateProject request": { + "$ref": "./examples/UpdateProject.json" + } + } + } + }, + "/projects/{projectId}/iterations": { + "get": { + "tags": [ + "ProjectApi" + ], + "summary": "Get iterations for the project", + "operationId": "GetIterations", + "consumes": [], + "produces": [ + "application/json", + "text/json", + "application/xml", + "text/xml" + ], + "parameters": [ + { + "name": "projectId", + "in": "path", + "description": "The project id", + "required": true, + "type": "string", + "format": "uuid", + "x-nullable": false + }, + { + "$ref": "#/parameters/ApiKey" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/Iteration" + }, + "x-nullable": true + } + } + }, + "x-ms-examples": { + "Successful GetIterations request": { + "$ref": "./examples/GetIterations.json" + } + } + } + }, + "/projects/{projectId}/iterations/{iterationId}": { + "get": { + "tags": [ + "ProjectApi" + ], + "summary": "Get a specific iteration", + "operationId": "GetIteration", + "consumes": [], + "produces": [ + "application/json", + "text/json", + "application/xml", + "text/xml" + ], + "parameters": [ + { + "name": "projectId", + "in": "path", + "description": "The id of the project the iteration belongs to", + "required": true, + "type": "string", + "format": "uuid", + "x-nullable": false + }, + { + "name": "iterationId", + "in": "path", + "description": "The id of the iteration to get", + "required": true, + "type": "string", + "format": "uuid", + "x-nullable": false + }, + { + "$ref": "#/parameters/ApiKey" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/Iteration" + } + } + }, + "x-ms-examples": { + "Successful GetIteration request": { + "$ref": "./examples/GetIteration.json" + } + } + }, + "delete": { + "tags": [ + "ProjectApi" + ], + "summary": "Delete a specific iteration of a project", + "operationId": "DeleteIteration", + "consumes": [], + "produces": [], + "parameters": [ + { + "name": "projectId", + "in": "path", + "description": "The project id", + "required": true, + "type": "string", + "format": "uuid", + "x-nullable": false + }, + { + "name": "iterationId", + "in": "path", + "description": "The iteration id", + "required": true, + "type": "string", + "format": "uuid", + "x-nullable": false + }, + { + "$ref": "#/parameters/ApiKey" + } + ], + "responses": { + "204": { + "description": "No Content" + } + }, + "x-ms-examples": { + "Successful DeleteIteration request": { + "$ref": "./examples/DeleteIteration.json" + } + } + }, + "patch": { + "tags": [ + "ProjectApi" + ], + "summary": "Update a specific iteration", + "operationId": "UpdateIteration", + "consumes": [ + "application/json", + "text/json", + "application/xml", + "text/xml", + "application/x-www-form-urlencoded" + ], + "produces": [ + "application/json", + "text/json", + "application/xml", + "text/xml" + ], + "parameters": [ + { + "name": "projectId", + "in": "path", + "description": "Project id", + "required": true, + "type": "string", + "format": "uuid", + "x-nullable": false + }, + { + "name": "iterationId", + "in": "path", + "description": "Iteration id", + "required": true, + "type": "string", + "format": "uuid", + "x-nullable": false + }, + { + "name": "updatedIteration", + "in": "body", + "description": "The updated iteration model", + "required": true, + "schema": { + "$ref": "#/definitions/Iteration" + } + }, + { + "$ref": "#/parameters/ApiKey" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/Iteration" + } + } + }, + "x-ms-examples": { + "Successful UpdateIteration request": { + "$ref": "./examples/UpdateIteration.json" + } + } + } + }, + "/projects/{projectId}/iterations/{iterationId}/performance": { + "get": { + "tags": [ + "ProjectApi" + ], + "summary": "Get detailed performance information about an iteration", + "operationId": "GetIterationPerformance", + "consumes": [], + "produces": [ + "application/json", + "text/json", + "application/xml", + "text/xml" + ], + "parameters": [ + { + "name": "projectId", + "in": "path", + "description": "The id of the project the iteration belongs to", + "required": true, + "type": "string", + "format": "uuid", + "x-nullable": false + }, + { + "name": "iterationId", + "in": "path", + "description": "The id of the iteration to get", + "required": true, + "type": "string", + "format": "uuid", + "x-nullable": false + }, + { + "name": "threshold", + "in": "query", + "description": "The threshold used to determine true predictions", + "required": false, + "type": "number", + "format": "float" + }, + { + "name": "overlapThreshold", + "in": "query", + "description": "If applicable, the bounding box overlap threshold used to determine true predictions", + "required": false, + "type": "number", + "format": "float" + }, + { + "$ref": "#/parameters/ApiKey" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/IterationPerformance" + } + } + }, + "x-ms-examples": { + "Successful GetIterationPerformance request": { + "$ref": "./examples/GetIterationPerformance.json" + } + } + } + }, + "/projects/{projectId}/iterations/{iterationId}/performance/images": { + "get": { + "tags": [ + "ProjectApi" + ], + "summary": "Get image with its prediction for a given project iteration", + "description": "This API supports batching and range selection. By default it will only return first 50 images matching images.\r\nUse the {take} and {skip} parameters to control how many images to return in a given batch.\r\nThe filtering is on an and/or relationship. For example, if the provided tag ids are for the \"Dog\" and\r\n\"Cat\" tags, then only images tagged with Dog and/or Cat will be returned", + "operationId": "GetImagePerformances", + "consumes": [], + "produces": [ + "application/json", + "text/json", + "application/xml", + "text/xml" + ], + "parameters": [ + { + "name": "projectId", + "in": "path", + "description": "The project id", + "required": true, + "type": "string", + "format": "uuid", + "x-nullable": false + }, + { + "name": "iterationId", + "in": "path", + "description": "The iteration id. Defaults to workspace", + "required": true, + "type": "string", + "format": "uuid", + "x-nullable": false + }, + { + "name": "tagIds", + "in": "query", + "description": "A list of tags ids to filter the images. Defaults to all tagged images when null. Limited to 20", + "required": false, + "type": "array", + "items": { + "type": "string", + "x-nullable": false + }, + "collectionFormat": "csv", + "x-nullable": true + }, + { + "name": "orderBy", + "in": "query", + "description": "The ordering. Defaults to newest", + "required": false, + "type": "string", + "enum": [ + "Newest", + "Oldest" + ], + "x-nullable": false + }, + { + "name": "take", + "in": "query", + "description": "Maximum number of images to return. Defaults to 50, limited to 256", + "required": false, + "type": "integer", + "format": "int32", + "default": 50 + }, + { + "name": "skip", + "in": "query", + "description": "Number of images to skip before beginning the image batch. Defaults to 0", + "required": false, + "type": "integer", + "format": "int32", + "default": 0 + }, + { + "$ref": "#/parameters/ApiKey" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/ImagePerformance" + }, + "x-nullable": true + } + } + }, + "x-ms-examples": { + "Successful GetImagePerformances request": { + "$ref": "./examples/GetImagePerformances.json" + } + } + } + }, + "/projects/{projectId}/iterations/{iterationId}/performance/images/count": { + "get": { + "tags": [ + "ProjectApi" + ], + "summary": "Gets the number of images tagged with the provided {tagIds} that have prediction results from\r\ntraining for the provided iteration {iterationId}", + "description": "The filtering is on an and/or relationship. For example, if the provided tag ids are for the \"Dog\" and\r\n\"Cat\" tags, then only images tagged with Dog and/or Cat will be returned", + "operationId": "GetImagePerformanceCount", + "consumes": [], + "produces": [ + "application/json", + "text/json", + "application/xml", + "text/xml" + ], + "parameters": [ + { + "name": "projectId", + "in": "path", + "description": "The project id", + "required": true, + "type": "string", + "format": "uuid", + "x-nullable": false + }, + { + "name": "iterationId", + "in": "path", + "description": "The iteration id. Defaults to workspace", + "required": true, + "type": "string", + "format": "uuid", + "x-nullable": false + }, + { + "name": "tagIds", + "in": "query", + "description": "A list of tags ids to filter the images to count. Defaults to all tags when null.", + "required": false, + "type": "array", + "items": { + "type": "string", + "x-nullable": false + }, + "collectionFormat": "csv", + "x-nullable": true + }, + { + "$ref": "#/parameters/ApiKey" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "format": "int32", + "type": "integer", + "x-nullable": false + } + } + }, + "x-ms-examples": { + "Successful GetImagePerformanceCount request": { + "$ref": "./examples/GetImagePerformanceCount.json" + } + } + } + }, + "/projects/{projectId}/iterations/{iterationId}/export": { + "get": { + "tags": [ + "ProjectApi" + ], + "summary": "Get the list of exports for a specific iteration", + "operationId": "GetExports", + "consumes": [], + "produces": [ + "application/json", + "text/json", + "application/xml", + "text/xml" + ], + "parameters": [ + { + "name": "projectId", + "in": "path", + "description": "The project id", + "required": true, + "type": "string", + "format": "uuid", + "x-nullable": false + }, + { + "name": "iterationId", + "in": "path", + "description": "The iteration id", + "required": true, + "type": "string", + "format": "uuid", + "x-nullable": false + }, + { + "$ref": "#/parameters/ApiKey" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/Export" + }, + "x-nullable": true + } + } + }, + "x-ms-examples": { + "Successful GetExports request": { + "$ref": "./examples/GetExports.json" + } + } + }, + "post": { + "tags": [ + "ProjectApi" + ], + "summary": "Export a trained iteration", + "operationId": "ExportIteration", + "consumes": [], + "produces": [ + "application/json", + "text/json", + "application/xml", + "text/xml" + ], + "parameters": [ + { + "name": "projectId", + "in": "path", + "description": "The project id", + "required": true, + "type": "string", + "format": "uuid", + "x-nullable": false + }, + { + "name": "iterationId", + "in": "path", + "description": "The iteration id", + "required": true, + "type": "string", + "format": "uuid", + "x-nullable": false + }, + { + "name": "platform", + "in": "query", + "description": "The target platform (coreml or tensorflow)", + "required": true, + "type": "string", + "x-nullable": true + }, + { + "name": "flavor", + "in": "query", + "description": "The flavor of the target platform (Windows, Linux, ARM, or GPU)", + "required": false, + "type": "string", + "x-nullable": true + }, + { + "$ref": "#/parameters/ApiKey" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/Export" + } + } + }, + "x-ms-examples": { + "Successful ExportIteration request": { + "$ref": "./examples/ExportIteration.json" + } + } + } + }, + "/projects/{projectId}/tags/{tagId}": { + "get": { + "tags": [ + "TagsApi" + ], + "summary": "Get information about a specific tag", + "operationId": "GetTag", + "consumes": [], + "produces": [ + "application/json", + "text/json", + "application/xml", + "text/xml" + ], + "parameters": [ + { + "name": "projectId", + "in": "path", + "description": "The project this tag belongs to", + "required": true, + "type": "string", + "format": "uuid", + "x-nullable": false + }, + { + "name": "tagId", + "in": "path", + "description": "The tag id", + "required": true, + "type": "string", + "format": "uuid", + "x-nullable": false + }, + { + "name": "iterationId", + "in": "query", + "description": "The iteration to retrieve this tag from. Optional, defaults to current training set", + "required": false, + "type": "string", + "format": "uuid", + "x-nullable": true + }, + { + "$ref": "#/parameters/ApiKey" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/Tag" + } + } + }, + "x-ms-examples": { + "Successful GetTag request": { + "$ref": "./examples/GetTag.json" + } + } + }, + "delete": { + "tags": [ + "TagsApi" + ], + "summary": "Delete a tag from the project", + "operationId": "DeleteTag", + "consumes": [], + "produces": [], + "parameters": [ + { + "name": "projectId", + "in": "path", + "description": "The project id", + "required": true, + "type": "string", + "format": "uuid", + "x-nullable": false + }, + { + "name": "tagId", + "in": "path", + "description": "Id of the tag to be deleted", + "required": true, + "type": "string", + "format": "uuid", + "x-nullable": false + }, + { + "$ref": "#/parameters/ApiKey" + } + ], + "responses": { + "204": { + "description": "No Content" + } + }, + "x-ms-examples": { + "Successful DeleteTag request": { + "$ref": "./examples/DeleteTag.json" + } + } + }, + "patch": { + "tags": [ + "TagsApi" + ], + "summary": "Update a tag", + "operationId": "UpdateTag", + "consumes": [ + "application/json", + "text/json", + "application/xml", + "text/xml", + "application/x-www-form-urlencoded" + ], + "produces": [ + "application/json", + "text/json", + "application/xml", + "text/xml" + ], + "parameters": [ + { + "name": "projectId", + "in": "path", + "description": "The project id", + "required": true, + "type": "string", + "format": "uuid", + "x-nullable": false + }, + { + "name": "tagId", + "in": "path", + "description": "The id of the target tag", + "required": true, + "type": "string", + "format": "uuid", + "x-nullable": false + }, + { + "name": "updatedTag", + "in": "body", + "description": "The updated tag model", + "required": true, + "schema": { + "$ref": "#/definitions/Tag" + } + }, + { + "$ref": "#/parameters/ApiKey" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/Tag" + } + } + }, + "x-ms-examples": { + "Successful UpdateTag request": { + "$ref": "./examples/UpdateTag.json" + } + } + } + }, + "/projects/{projectId}/tags": { + "get": { + "tags": [ + "TagsApi" + ], + "summary": "Get the tags for a given project and iteration", + "operationId": "GetTags", + "consumes": [], + "produces": [ + "application/json", + "text/json", + "application/xml", + "text/xml" + ], + "parameters": [ + { + "name": "projectId", + "in": "path", + "description": "The project id", + "required": true, + "type": "string", + "format": "uuid", + "x-nullable": false + }, + { + "name": "iterationId", + "in": "query", + "description": "The iteration id. Defaults to workspace", + "required": false, + "type": "string", + "format": "uuid", + "x-nullable": true + }, + { + "$ref": "#/parameters/ApiKey" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/Tag" + }, + "x-nullable": true + } + } + }, + "x-ms-examples": { + "Successful GetTags request": { + "$ref": "./examples/GetTags.json" + } + } + }, + "post": { + "tags": [ + "TagsApi" + ], + "summary": "Create a tag for the project", + "operationId": "CreateTag", + "consumes": [], + "produces": [ + "application/json", + "text/json", + "application/xml", + "text/xml" + ], + "parameters": [ + { + "name": "projectId", + "in": "path", + "description": "The project id", + "required": true, + "type": "string", + "format": "uuid", + "x-nullable": false + }, + { + "name": "name", + "in": "query", + "description": "The tag name", + "required": true, + "type": "string", + "x-nullable": true + }, + { + "name": "description", + "in": "query", + "description": "Optional description for the tag", + "required": false, + "type": "string", + "x-nullable": true + }, + { + "$ref": "#/parameters/ApiKey" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/Tag" + } + } + }, + "x-ms-examples": { + "Successful CreateTag request": { + "$ref": "./examples/CreateTag.json" + } + } + } + } + }, + "definitions": { + "Domain": { + "type": "object", + "properties": { + "id": { + "format": "uuid", + "type": "string", + "readOnly": true, + "x-nullable": false + }, + "name": { + "type": "string", + "readOnly": true, + "x-nullable": true + }, + "type": { + "enum": [ + "Classification", + "ObjectDetection" + ], + "type": "string", + "readOnly": true, + "x-nullable": false, + "x-ms-enum": { + "name": "DomainType", + "modelAsString": true + } + }, + "exportable": { + "type": "boolean", + "readOnly": true, + "x-nullable": false + }, + "enabled": { + "type": "boolean", + "readOnly": true, + "x-nullable": false + } + }, + "x-nullable": true + }, + "Image": { + "description": "Image model to be sent as JSON", + "type": "object", + "properties": { + "id": { + "format": "uuid", + "type": "string", + "readOnly": true, + "x-nullable": false + }, + "created": { + "format": "date-time", + "type": "string", + "readOnly": true, + "x-nullable": false + }, + "width": { + "format": "int32", + "type": "integer", + "readOnly": true, + "x-nullable": false + }, + "height": { + "format": "int32", + "type": "integer", + "readOnly": true, + "x-nullable": false + }, + "imageUri": { + "type": "string", + "readOnly": true, + "x-nullable": true + }, + "thumbnailUri": { + "type": "string", + "readOnly": true, + "x-nullable": true + }, + "tags": { + "type": "array", + "items": { + "$ref": "#/definitions/ImageTag" + }, + "readOnly": true, + "x-nullable": true + }, + "regions": { + "type": "array", + "items": { + "$ref": "#/definitions/ImageRegion" + }, + "readOnly": true, + "x-nullable": true + } + }, + "x-nullable": true + }, + "ImageTag": { + "type": "object", + "properties": { + "tagId": { + "format": "uuid", + "type": "string", + "readOnly": true, + "x-nullable": false + }, + "tagName": { + "type": "string", + "readOnly": true, + "x-nullable": true + }, + "created": { + "format": "date-time", + "type": "string", + "readOnly": true, + "x-nullable": false + } + }, + "x-nullable": true + }, + "ImageRegion": { + "type": "object", + "properties": { + "regionId": { + "format": "uuid", + "type": "string", + "readOnly": true, + "x-nullable": false + }, + "tagName": { + "type": "string", + "readOnly": true, + "x-nullable": true + }, + "created": { + "format": "date-time", + "type": "string", + "readOnly": true, + "x-nullable": false + }, + "tagId": { + "format": "uuid", + "type": "string", + "x-nullable": false + }, + "left": { + "format": "float", + "type": "number", + "x-nullable": false + }, + "top": { + "format": "float", + "type": "number", + "x-nullable": false + }, + "width": { + "format": "float", + "type": "number", + "x-nullable": false + }, + "height": { + "format": "float", + "type": "number", + "x-nullable": false + } + }, + "x-nullable": true + }, + "ImageCreateSummary": { + "type": "object", + "properties": { + "isBatchSuccessful": { + "type": "boolean", + "readOnly": true, + "x-nullable": false + }, + "images": { + "type": "array", + "items": { + "$ref": "#/definitions/ImageCreateResult" + }, + "readOnly": true, + "x-nullable": true + } + }, + "x-nullable": true + }, + "ImageCreateResult": { + "type": "object", + "properties": { + "sourceUrl": { + "type": "string", + "readOnly": true, + "x-nullable": true + }, + "status": { + "enum": [ + "OK", + "OKDuplicate", + "ErrorSource", + "ErrorImageFormat", + "ErrorImageSize", + "ErrorStorage", + "ErrorLimitExceed", + "ErrorTagLimitExceed", + "ErrorRegionLimitExceed", + "ErrorUnknown" + ], + "type": "string", + "readOnly": true, + "x-nullable": false, + "x-ms-enum": { + "name": "ImageUploadStatus", + "modelAsString": true + } + }, + "image": { + "$ref": "#/definitions/Image", + "readOnly": true + } + }, + "x-nullable": true + }, + "ImageFileCreateBatch": { + "type": "object", + "properties": { + "images": { + "type": "array", + "items": { + "$ref": "#/definitions/ImageFileCreateEntry" + }, + "x-nullable": true + }, + "tagIds": { + "type": "array", + "items": { + "format": "uuid", + "type": "string", + "x-nullable": false + }, + "x-nullable": true + } + }, + "x-nullable": true + }, + "ImageFileCreateEntry": { + "type": "object", + "properties": { + "name": { + "type": "string", + "x-nullable": true + }, + "contents": { + "format": "byte", + "type": "string", + "x-nullable": true + }, + "tagIds": { + "type": "array", + "items": { + "format": "uuid", + "type": "string", + "x-nullable": false + }, + "x-nullable": true + }, + "regions": { + "type": "array", + "items": { + "$ref": "#/definitions/Region" + }, + "x-nullable": true + } + }, + "x-nullable": true + }, + "Region": { + "type": "object", + "properties": { + "tagId": { + "format": "uuid", + "type": "string", + "x-nullable": false + }, + "left": { + "format": "float", + "type": "number", + "x-nullable": false + }, + "top": { + "format": "float", + "type": "number", + "x-nullable": false + }, + "width": { + "format": "float", + "type": "number", + "x-nullable": false + }, + "height": { + "format": "float", + "type": "number", + "x-nullable": false + } + }, + "x-nullable": true + }, + "ImageUrlCreateBatch": { + "type": "object", + "properties": { + "images": { + "type": "array", + "items": { + "$ref": "#/definitions/ImageUrlCreateEntry" + }, + "x-nullable": true + }, + "tagIds": { + "type": "array", + "items": { + "format": "uuid", + "type": "string", + "x-nullable": false + }, + "x-nullable": true + } + }, + "x-nullable": true + }, + "ImageUrlCreateEntry": { + "type": "object", + "properties": { + "url": { + "type": "string", + "x-nullable": true + }, + "tagIds": { + "type": "array", + "items": { + "format": "uuid", + "type": "string", + "x-nullable": false + }, + "x-nullable": true + }, + "regions": { + "type": "array", + "items": { + "$ref": "#/definitions/Region" + }, + "x-nullable": true + } + }, + "x-nullable": true + }, + "ImageIdCreateBatch": { + "type": "object", + "properties": { + "images": { + "type": "array", + "items": { + "$ref": "#/definitions/ImageIdCreateEntry" + }, + "x-nullable": true + }, + "tagIds": { + "type": "array", + "items": { + "format": "uuid", + "type": "string", + "x-nullable": false + }, + "x-nullable": true + } + }, + "x-nullable": true + }, + "ImageIdCreateEntry": { + "type": "object", + "properties": { + "id": { + "format": "uuid", + "type": "string", + "x-nullable": false + }, + "tagIds": { + "type": "array", + "items": { + "format": "uuid", + "type": "string", + "x-nullable": false + }, + "x-nullable": true + }, + "regions": { + "type": "array", + "items": { + "$ref": "#/definitions/Region" + }, + "x-nullable": true + } + }, + "x-nullable": true + }, + "ImageTagCreateBatch": { + "type": "object", + "properties": { + "tags": { + "type": "array", + "items": { + "$ref": "#/definitions/ImageTagCreateEntry" + }, + "x-nullable": true + } + }, + "x-nullable": true + }, + "ImageTagCreateEntry": { + "type": "object", + "properties": { + "imageId": { + "format": "uuid", + "type": "string", + "x-nullable": false + }, + "tagId": { + "format": "uuid", + "type": "string", + "x-nullable": false + } + }, + "x-nullable": true + }, + "ImageTagCreateSummary": { + "type": "object", + "properties": { + "created": { + "type": "array", + "items": { + "$ref": "#/definitions/ImageTagCreateEntry" + }, + "x-nullable": true + }, + "duplicated": { + "type": "array", + "items": { + "$ref": "#/definitions/ImageTagCreateEntry" + }, + "x-nullable": true + }, + "exceeded": { + "type": "array", + "items": { + "$ref": "#/definitions/ImageTagCreateEntry" + }, + "x-nullable": true + } + }, + "x-nullable": true + }, + "ImageRegionCreateBatch": { + "description": "Batch of image region information to create.", + "type": "object", + "properties": { + "regions": { + "type": "array", + "items": { + "$ref": "#/definitions/ImageRegionCreateEntry" + }, + "x-nullable": true + } + }, + "x-nullable": true + }, + "ImageRegionCreateEntry": { + "type": "object", + "properties": { + "imageId": { + "format": "uuid", + "type": "string", + "x-nullable": false + }, + "tagId": { + "format": "uuid", + "type": "string", + "x-nullable": false + }, + "left": { + "format": "float", + "type": "number", + "x-nullable": false + }, + "top": { + "format": "float", + "type": "number", + "x-nullable": false + }, + "width": { + "format": "float", + "type": "number", + "x-nullable": false + }, + "height": { + "format": "float", + "type": "number", + "x-nullable": false + } + }, + "x-nullable": true + }, + "ImageRegionCreateSummary": { + "type": "object", + "properties": { + "created": { + "type": "array", + "items": { + "$ref": "#/definitions/ImageRegionCreateResult" + }, + "x-nullable": true + }, + "duplicated": { + "type": "array", + "items": { + "$ref": "#/definitions/ImageRegionCreateEntry" + }, + "x-nullable": true + }, + "exceeded": { + "type": "array", + "items": { + "$ref": "#/definitions/ImageRegionCreateEntry" + }, + "x-nullable": true + } + }, + "x-nullable": true + }, + "ImageRegionCreateResult": { + "type": "object", + "properties": { + "imageId": { + "format": "uuid", + "type": "string", + "readOnly": true, + "x-nullable": false + }, + "regionId": { + "format": "uuid", + "type": "string", + "readOnly": true, + "x-nullable": false + }, + "tagName": { + "type": "string", + "readOnly": true, + "x-nullable": true + }, + "created": { + "format": "date-time", + "type": "string", + "readOnly": true, + "x-nullable": false + }, + "tagId": { + "format": "uuid", + "type": "string", + "x-nullable": false + }, + "left": { + "format": "float", + "type": "number", + "x-nullable": false + }, + "top": { + "format": "float", + "type": "number", + "x-nullable": false + }, + "width": { + "format": "float", + "type": "number", + "x-nullable": false + }, + "height": { + "format": "float", + "type": "number", + "x-nullable": false + } + }, + "x-nullable": true + }, + "ImageRegionProposal": { + "type": "object", + "properties": { + "projectId": { + "format": "uuid", + "type": "string", + "readOnly": true, + "x-nullable": false + }, + "imageId": { + "format": "uuid", + "type": "string", + "readOnly": true, + "x-nullable": false + }, + "proposals": { + "type": "array", + "items": { + "$ref": "#/definitions/RegionProposal" + }, + "readOnly": true, + "x-nullable": true + } + }, + "x-nullable": true + }, + "RegionProposal": { + "type": "object", + "properties": { + "confidence": { + "format": "float", + "type": "number", + "readOnly": true, + "x-nullable": false + }, + "boundingBox": { + "$ref": "#/definitions/BoundingBox", + "readOnly": true + } + }, + "x-nullable": true + }, + "BoundingBox": { + "type": "object", + "properties": { + "left": { + "format": "float", + "type": "number", + "x-nullable": false + }, + "top": { + "format": "float", + "type": "number", + "x-nullable": false + }, + "width": { + "format": "float", + "type": "number", + "x-nullable": false + }, + "height": { + "format": "float", + "type": "number", + "x-nullable": false + } + }, + "x-nullable": true + }, + "PredictionQueryToken": { + "type": "object", + "properties": { + "session": { + "type": "string", + "x-nullable": true + }, + "continuation": { + "type": "string", + "x-nullable": true + }, + "maxCount": { + "format": "int32", + "type": "integer", + "x-nullable": false + }, + "orderBy": { + "enum": [ + "Newest", + "Oldest", + "Suggested" + ], + "type": "string", + "x-nullable": false, + "x-ms-enum": { + "name": "OrderBy", + "modelAsString": true + } + }, + "tags": { + "type": "array", + "items": { + "$ref": "#/definitions/PredictionQueryTag" + }, + "x-nullable": true + }, + "iterationId": { + "format": "uuid", + "type": "string", + "x-nullable": true + }, + "startTime": { + "format": "date-time", + "type": "string", + "x-nullable": true + }, + "endTime": { + "format": "date-time", + "type": "string", + "x-nullable": true + }, + "application": { + "type": "string", + "x-nullable": true + } + }, + "x-nullable": true + }, + "PredictionQueryTag": { + "type": "object", + "properties": { + "id": { + "format": "uuid", + "type": "string", + "readOnly": true, + "x-nullable": false + }, + "minThreshold": { + "format": "float", + "type": "number", + "readOnly": true, + "x-nullable": false + }, + "maxThreshold": { + "format": "float", + "type": "number", + "readOnly": true, + "x-nullable": false + } + }, + "x-nullable": true + }, + "PredictionQueryResult": { + "type": "object", + "properties": { + "token": { + "$ref": "#/definitions/PredictionQueryToken", + "readOnly": true + }, + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/StoredImagePrediction" + }, + "readOnly": true, + "x-nullable": true + } + }, + "x-nullable": true + }, + "StoredImagePrediction": { + "description": "result of an image classification request", + "type": "object", + "properties": { + "imageUri": { + "type": "string", + "readOnly": true, + "x-nullable": true + }, + "thumbnailUri": { + "type": "string", + "readOnly": true, + "x-nullable": true + }, + "domain": { + "format": "uuid", + "type": "string", + "readOnly": true, + "x-nullable": false + }, + "id": { + "format": "uuid", + "type": "string", + "readOnly": true, + "x-nullable": false + }, + "project": { + "format": "uuid", + "type": "string", + "readOnly": true, + "x-nullable": false + }, + "iteration": { + "format": "uuid", + "type": "string", + "readOnly": true, + "x-nullable": false + }, + "created": { + "format": "date-time", + "type": "string", + "readOnly": true, + "x-nullable": false + }, + "predictions": { + "type": "array", + "items": { + "$ref": "#/definitions/Prediction" + }, + "readOnly": true, + "x-nullable": true + } + }, + "x-nullable": true + }, + "Prediction": { + "type": "object", + "properties": { + "probability": { + "format": "float", + "type": "number", + "readOnly": true, + "x-nullable": false + }, + "tagId": { + "format": "uuid", + "type": "string", + "readOnly": true, + "x-nullable": false + }, + "tagName": { + "type": "string", + "readOnly": true, + "x-nullable": true + }, + "boundingBox": { + "$ref": "#/definitions/BoundingBox", + "readOnly": true + } + }, + "x-nullable": true + }, + "ImageUrl": { + "type": "object", + "properties": { + "url": { + "type": "string", + "x-nullable": true + } + }, + "x-nullable": true + }, + "ImagePrediction": { + "type": "object", + "properties": { + "id": { + "format": "uuid", + "type": "string", + "readOnly": true, + "x-nullable": false + }, + "project": { + "format": "uuid", + "type": "string", + "readOnly": true, + "x-nullable": false + }, + "iteration": { + "format": "uuid", + "type": "string", + "readOnly": true, + "x-nullable": false + }, + "created": { + "format": "date-time", + "type": "string", + "readOnly": true, + "x-nullable": false + }, + "predictions": { + "type": "array", + "items": { + "$ref": "#/definitions/Prediction" + }, + "readOnly": true, + "x-nullable": true + } + }, + "x-nullable": true + }, + "Iteration": { + "description": "Iteration model to be sent over JSON", + "type": "object", + "properties": { + "id": { + "format": "uuid", + "description": "Gets the id of the iteration", + "type": "string", + "readOnly": true, + "x-nullable": false + }, + "name": { + "description": "Gets or sets the name of the iteration", + "type": "string", + "x-nullable": true + }, + "isDefault": { + "description": "Gets or sets a value indicating whether the iteration is the default iteration for the project", + "type": "boolean", + "x-nullable": false + }, + "status": { + "description": "Gets the current iteration status", + "type": "string", + "readOnly": true, + "x-nullable": true + }, + "created": { + "format": "date-time", + "description": "Gets the time this iteration was completed", + "type": "string", + "readOnly": true, + "x-nullable": false + }, + "lastModified": { + "format": "date-time", + "description": "Gets the time this iteration was last modified", + "type": "string", + "readOnly": true, + "x-nullable": false + }, + "trainedAt": { + "format": "date-time", + "description": "Gets the time this iteration was last modified", + "type": "string", + "readOnly": true, + "x-nullable": true + }, + "projectId": { + "format": "uuid", + "description": "Gets the project id of the iteration", + "type": "string", + "readOnly": true, + "x-nullable": false + }, + "exportable": { + "description": "Whether the iteration can be exported to another format for download", + "type": "boolean", + "readOnly": true, + "x-nullable": false + }, + "domainId": { + "format": "uuid", + "description": "Get or sets a guid of the domain the iteration has been trained on", + "type": "string", + "readOnly": true, + "x-nullable": true + } + }, + "x-nullable": true + }, + "Project": { + "description": "Represents a project", + "type": "object", + "properties": { + "id": { + "format": "uuid", + "description": "Gets the project id", + "type": "string", + "readOnly": true, + "x-nullable": false + }, + "name": { + "description": "Gets or sets the name of the project", + "type": "string", + "x-nullable": true + }, + "description": { + "description": "Gets or sets the description of the project", + "type": "string", + "x-nullable": true + }, + "settings": { + "$ref": "#/definitions/ProjectSettings", + "description": "Gets or sets the project settings" + }, + "created": { + "format": "date-time", + "description": "Gets the date this project was created", + "type": "string", + "readOnly": true, + "x-nullable": false + }, + "lastModified": { + "format": "date-time", + "description": "Gets the date this project was last modifed", + "type": "string", + "readOnly": true, + "x-nullable": false + }, + "thumbnailUri": { + "description": "Gets the thumbnail url representing the project", + "type": "string", + "readOnly": true, + "x-nullable": true + } + }, + "x-nullable": true + }, + "ProjectSettings": { + "description": "Represents settings associated with a project", + "type": "object", + "properties": { + "domainId": { + "format": "uuid", + "description": "Gets or sets the id of the Domain to use with this project", + "type": "string", + "x-nullable": false + } + }, + "x-nullable": true + }, + "IterationPerformance": { + "description": "Represents the detailed performance data for a trained iteration", + "type": "object", + "properties": { + "perTagPerformance": { + "description": "Gets the per-tag performance details for this iteration", + "type": "array", + "items": { + "$ref": "#/definitions/TagPerformance" + }, + "readOnly": true, + "x-nullable": true + }, + "precision": { + "format": "float", + "description": "Gets the precision", + "type": "number", + "readOnly": true, + "x-nullable": false + }, + "precisionStdDeviation": { + "format": "float", + "description": "Gets the standard deviation for the precision", + "type": "number", + "readOnly": true, + "x-nullable": false + }, + "recall": { + "format": "float", + "description": "Gets the recall", + "type": "number", + "readOnly": true, + "x-nullable": false + }, + "recallStdDeviation": { + "format": "float", + "description": "Gets the standard deviation for the recall", + "type": "number", + "readOnly": true, + "x-nullable": false + }, + "averagePrecision": { + "format": "float", + "description": "Gets the average precision when applicable", + "type": "number", + "readOnly": true, + "x-nullable": true + } + }, + "x-nullable": true + }, + "TagPerformance": { + "description": "Represents performance data for a particular tag in a trained iteration", + "type": "object", + "properties": { + "id": { + "format": "uuid", + "type": "string", + "readOnly": true, + "x-nullable": false + }, + "name": { + "type": "string", + "readOnly": true, + "x-nullable": true + }, + "precision": { + "format": "float", + "description": "Gets the precision", + "type": "number", + "readOnly": true, + "x-nullable": false + }, + "precisionStdDeviation": { + "format": "float", + "description": "Gets the standard deviation for the precision", + "type": "number", + "readOnly": true, + "x-nullable": false + }, + "recall": { + "format": "float", + "description": "Gets the recall", + "type": "number", + "readOnly": true, + "x-nullable": false + }, + "recallStdDeviation": { + "format": "float", + "description": "Gets the standard deviation for the recall", + "type": "number", + "readOnly": true, + "x-nullable": false + }, + "averagePrecision": { + "format": "float", + "description": "Gets the average precision when applicable", + "type": "number", + "readOnly": true, + "x-nullable": true + } + }, + "x-nullable": true + }, + "ImagePerformance": { + "description": "Image performance model", + "type": "object", + "properties": { + "predictions": { + "type": "array", + "items": { + "$ref": "#/definitions/Prediction" + }, + "readOnly": true, + "x-nullable": true + }, + "id": { + "format": "uuid", + "type": "string", + "readOnly": true, + "x-nullable": false + }, + "created": { + "format": "date-time", + "type": "string", + "readOnly": true, + "x-nullable": false + }, + "width": { + "format": "int32", + "type": "integer", + "readOnly": true, + "x-nullable": false + }, + "height": { + "format": "int32", + "type": "integer", + "readOnly": true, + "x-nullable": false + }, + "imageUri": { + "type": "string", + "readOnly": true, + "x-nullable": true + }, + "thumbnailUri": { + "type": "string", + "readOnly": true, + "x-nullable": true + }, + "tags": { + "type": "array", + "items": { + "$ref": "#/definitions/ImageTag" + }, + "readOnly": true, + "x-nullable": true + }, + "regions": { + "type": "array", + "items": { + "$ref": "#/definitions/ImageRegion" + }, + "readOnly": true, + "x-nullable": true + } + }, + "x-nullable": true + }, + "Export": { + "type": "object", + "properties": { + "platform": { + "enum": [ + "CoreML", + "TensorFlow", + "DockerFile", + "ONNX" + ], + "type": "string", + "readOnly": true, + "x-nullable": false, + "x-ms-enum": { + "name": "ExportPlatform", + "modelAsString": true + } + }, + "status": { + "enum": [ + "Exporting", + "Failed", + "Done" + ], + "type": "string", + "readOnly": true, + "x-nullable": false, + "x-ms-enum": { + "name": "ExportStatusModel", + "modelAsString": true + } + }, + "downloadUri": { + "type": "string", + "readOnly": true, + "x-nullable": true + }, + "flavor": { + "enum": [ + "Linux", + "Windows" + ], + "type": "string", + "readOnly": true, + "x-nullable": true, + "x-ms-enum": { + "name": "ExportFlavor", + "modelAsString": true + } + } + }, + "x-nullable": true + }, + "Tag": { + "description": "Represents a Tag", + "type": "object", + "properties": { + "id": { + "format": "uuid", + "description": "Gets the Tag ID", + "type": "string", + "readOnly": true, + "x-nullable": false + }, + "name": { + "description": "Gets or sets the name of the tag", + "type": "string", + "x-nullable": true + }, + "description": { + "description": "Gets or sets the description of the tag", + "type": "string", + "x-nullable": true + }, + "imageCount": { + "format": "int32", + "description": "Gets the number of images with this tag", + "type": "integer", + "readOnly": true, + "x-nullable": false + } + }, + "x-nullable": true + } + }, + "parameters": { + "ApiKey": { + "name": "Training-Key", + "in": "header", + "required": true, + "type": "string", + "x-ms-client-name": "ApiKey", + "x-ms-parameter-location": "client" + } + } +} \ No newline at end of file diff --git a/specification/cognitiveservices/data-plane/CustomVision/Training/stable/v2.0/examples/CreateImageRegions.json b/specification/cognitiveservices/data-plane/CustomVision/Training/stable/v2.0/examples/CreateImageRegions.json new file mode 100644 index 000000000000..850cb26abd78 --- /dev/null +++ b/specification/cognitiveservices/data-plane/CustomVision/Training/stable/v2.0/examples/CreateImageRegions.json @@ -0,0 +1,29 @@ +{ + "parameters": { + "Content-Type": "application/json", + "Training-Key": "{API Key}", + "projectId": "bc3f7dad-5544-468c-8573-3ef04d55463e", + "batch": { + "regions" : [ + { + "imageId": "4d6eb844-42ee-42bc-bd6f-c32455ef07c9", + "tagId" : "b607964f-7bd6-4a3b-a869-6791fb6aab87", + "left": 0.25, + "top": 0.25, + "width": 0.25, + "height": 0.25 + } + ] + } + }, + "responses": { + "200": { + "headers": {}, + "body": { + "created": [ ], + "duplicated": [], + "exceeded": [] + } + } + } +} \ No newline at end of file diff --git a/specification/cognitiveservices/data-plane/CustomVision/Training/stable/v2.0/examples/CreateImageTags.json b/specification/cognitiveservices/data-plane/CustomVision/Training/stable/v2.0/examples/CreateImageTags.json new file mode 100644 index 000000000000..a665e7f9dce2 --- /dev/null +++ b/specification/cognitiveservices/data-plane/CustomVision/Training/stable/v2.0/examples/CreateImageTags.json @@ -0,0 +1,30 @@ +{ + "parameters": { + "Content-Type": "application/json", + "Training-Key": "{API Key}", + "projectId": "bc3f7dad-5544-468c-8573-3ef04d55463e", + "batch": { + "tags": [ + { + "imageId": "e31a14ab-5d78-4f7b-a267-3a1e4fd8a758", + "tagId": "349d72ac-0948-4d51-b1e4-c14a1f9b848a" + } + ] + } + }, + "responses": { + "200": { + "headers": {}, + "body": { + "created": [ + { + "imageId": "e31a14ab-5d78-4f7b-a267-3a1e4fd8a758", + "tagId": "349d72ac-0948-4d51-b1e4-c14a1f9b848a" + } + ], + "duplicated": null, + "exceeded": null + } + } + } +} \ No newline at end of file diff --git a/specification/cognitiveservices/data-plane/CustomVision/Training/stable/v2.0/examples/CreateImagesFromData.json b/specification/cognitiveservices/data-plane/CustomVision/Training/stable/v2.0/examples/CreateImagesFromData.json new file mode 100644 index 000000000000..75509c5cb6ac --- /dev/null +++ b/specification/cognitiveservices/data-plane/CustomVision/Training/stable/v2.0/examples/CreateImagesFromData.json @@ -0,0 +1,57 @@ +{ + "parameters": { + "Content-Type": "application/json", + "Training-Key": "{API Key}", + "projectId": "64b822c5-8082-4b36-a426-27225f4aa18c", + "tagIds": [ + "b607964f-7bd6-4a3b-a869-6791fb6aab87" + ], + "imageData": "multipart data" + }, + "responses": { + "200": { + "headers": {}, + "body": { + "isBatchSuccessful": true, + "images": [ + { + "sourceUrl": "\"hemlock_10.jpg\"", + "status": "OK", + "image": { + "id": "4d6eb844-42ee-42bc-bd6f-c32455ef07c9", + "created": "2017-12-19T15:56:10.65Z", + "width": 1095, + "height": 900, + "imageUri": "{Image Uri}", + "thumbnailUri": "{Thumbnail Uri}", + "tags": [ + { + "tagId": "b607964f-7bd6-4a3b-a869-6791fb6aab87", + "created": "2017-12-19T15:56:09.6105895Z" + } + ] + } + }, + { + "sourceUrl": "\"hemlock_6.jpg\"", + "status": "OK", + "image": { + "id": "f1855a92-b873-47e7-b513-f07a667ceda1", + "created": "2017-12-19T15:56:10.57Z", + "width": 900, + "height": 1531, + "imageUri": "{Image Uri}", + "thumbnailUri": "{Thumbnail Uri}", + "tags": [ + { + "tagId": "b607964f-7bd6-4a3b-a869-6791fb6aab87", + "created": "2017-12-19T15:56:09.5168568Z" + } + ] + } + } + ] + } + } + } +} \ No newline at end of file diff --git a/specification/cognitiveservices/data-plane/CustomVision/Training/stable/v2.0/examples/CreateImagesFromFiles.json b/specification/cognitiveservices/data-plane/CustomVision/Training/stable/v2.0/examples/CreateImagesFromFiles.json new file mode 100644 index 000000000000..da978c0a0170 --- /dev/null +++ b/specification/cognitiveservices/data-plane/CustomVision/Training/stable/v2.0/examples/CreateImagesFromFiles.json @@ -0,0 +1,47 @@ +{ + "parameters": { + "Content-Type": "application/json", + "Training-Key": "{API Key}", + "projectId": "64b822c5-8082-4b36-a426-27225f4aa18c", + "tagIds": "b607964f-7bd6-4a3b-a869-6791fb6aab87", + "batch": { + "images": [ + { + "name": "hemlock_10.jpg", + "contents": "{image contents}" + } + ], + "tagIds": [ + "b607964f-7bd6-4a3b-a869-6791fb6aab87" + ] + } + }, + "responses": { + "200": { + "headers": {}, + "body": { + "isBatchSuccessful": true, + "images": [ + { + "sourceUrl": "\"hemlock_10.jpg\"", + "status": "OK", + "image": { + "id": "4d6eb844-42ee-42bc-bd6f-c32455ef07c9", + "created": "2017-12-19T15:56:10.65Z", + "width": 1095, + "height": 900, + "imageUri": "{Image Uri}", + "thumbnailUri": "{Thumbnail Uri}", + "tags": [ + { + "tagId": "b607964f-7bd6-4a3b-a869-6791fb6aab87", + "created": "2017-12-19T15:56:09.6105895Z" + } + ] + } + } + ] + } + } + } +} \ No newline at end of file diff --git a/specification/cognitiveservices/data-plane/CustomVision/Training/stable/v2.0/examples/CreateImagesFromPredictions.json b/specification/cognitiveservices/data-plane/CustomVision/Training/stable/v2.0/examples/CreateImagesFromPredictions.json new file mode 100644 index 000000000000..58564980619d --- /dev/null +++ b/specification/cognitiveservices/data-plane/CustomVision/Training/stable/v2.0/examples/CreateImagesFromPredictions.json @@ -0,0 +1,46 @@ +{ + "parameters": { + "Content-Type": "application/json", + "Training-Key": "{API Key}", + "projectId": "64b822c5-8082-4b36-a426-27225f4aa18c", + "tagIds": "b607964f-7bd6-4a3b-a869-6791fb6aab87", + "batch": { + "images": [ + { + "id": "4d6eb844-42ee-42bc-bd6f-c32455ef07c9" + } + ], + "tagIds": [ + "b607964f-7bd6-4a3b-a869-6791fb6aab87" + ] + } + }, + "responses": { + "200": { + "headers": {}, + "body": { + "isBatchSuccessful": true, + "images": [ + { + "sourceUrl": "\"hemlock_10.jpg\"", + "status": "OK", + "image": { + "id": "4d6eb844-42ee-42bc-bd6f-c32455ef07c9", + "created": "2017-12-19T15:56:10.65Z", + "width": 1095, + "height": 900, + "imageUri": "{Image Uri}", + "thumbnailUri": "{Thumbnail Uri}", + "tags": [ + { + "tagId": "b607964f-7bd6-4a3b-a869-6791fb6aab87", + "created": "2017-12-19T15:56:09.6105895Z" + } + ] + } + } + ] + } + } + } +} \ No newline at end of file diff --git a/specification/cognitiveservices/data-plane/CustomVision/Training/stable/v2.0/examples/CreateImagesFromUrls.json b/specification/cognitiveservices/data-plane/CustomVision/Training/stable/v2.0/examples/CreateImagesFromUrls.json new file mode 100644 index 000000000000..b654934ccf85 --- /dev/null +++ b/specification/cognitiveservices/data-plane/CustomVision/Training/stable/v2.0/examples/CreateImagesFromUrls.json @@ -0,0 +1,46 @@ +{ + "parameters": { + "Content-Type": "application/json", + "Training-Key": "{API Key}", + "projectId": "64b822c5-8082-4b36-a426-27225f4aa18c", + "tagIds": "b607964f-7bd6-4a3b-a869-6791fb6aab87", + "batch": { + "images": [ + { + "url": "{url to image}" + } + ], + "tagIds": [ + "b607964f-7bd6-4a3b-a869-6791fb6aab87" + ] + } + }, + "responses": { + "200": { + "headers": {}, + "body": { + "isBatchSuccessful": true, + "images": [ + { + "sourceUrl": "{url to image}", + "status": "OK", + "image": { + "id": "4d6eb844-42ee-42bc-bd6f-c32455ef07c9", + "created": "2017-12-19T15:56:10.65Z", + "width": 1095, + "height": 900, + "imageUri": "{Image Uri}", + "thumbnailUri": "{Thumbnail Uri}", + "tags": [ + { + "tagId": "b607964f-7bd6-4a3b-a869-6791fb6aab87", + "created": "2017-12-19T15:56:09.6105895Z" + } + ] + } + } + ] + } + } + } +} \ No newline at end of file diff --git a/specification/cognitiveservices/data-plane/CustomVision/Training/stable/v2.0/examples/CreateProject.json b/specification/cognitiveservices/data-plane/CustomVision/Training/stable/v2.0/examples/CreateProject.json new file mode 100644 index 000000000000..7cd7ddc0da8d --- /dev/null +++ b/specification/cognitiveservices/data-plane/CustomVision/Training/stable/v2.0/examples/CreateProject.json @@ -0,0 +1,25 @@ +{ + "parameters": { + "Content-Type": "application/json", + "Training-Key": "{API Key}", + "name": "My New Project", + "description": "A test project", + "domainId": "ee85a74c-405e-4adc-bb47-ffa8ca0c9f31" + }, + "responses": { + "200": { + "headers": {}, + "body": { + "id": "bc3f7dad-5544-468c-8573-3ef04d55463e", + "name": "My New Project", + "description": "A test project", + "settings": { + "domainId": "ee85a74c-405e-4adc-bb47-ffa8ca0c9f31" + }, + "created": "2017-12-18T05:43:18.08Z", + "lastModified": "2017-12-18T05:43:18.0962423Z", + "thumbnailUri": null + } + } + } +} \ No newline at end of file diff --git a/specification/cognitiveservices/data-plane/CustomVision/Training/stable/v2.0/examples/CreateTag.json b/specification/cognitiveservices/data-plane/CustomVision/Training/stable/v2.0/examples/CreateTag.json new file mode 100644 index 000000000000..ed2bdd0a3ed1 --- /dev/null +++ b/specification/cognitiveservices/data-plane/CustomVision/Training/stable/v2.0/examples/CreateTag.json @@ -0,0 +1,21 @@ +{ + "parameters": { + "Content-Type": "application/json", + "Training-Key": "{API Key}", + "projectId": "bc3f7dad-5544-468c-8573-3ef04d55463e", + "name": "Tag1", + "description": "Description of Tag1", + "body": "" + }, + "responses": { + "200": { + "headers": {}, + "body": { + "id": "9e27bc1b-7ae7-4e3b-a4e5-36153479dc01", + "name": "Tag1", + "description": "Description of Tag1", + "imageCount": 0 + } + } + } +} \ No newline at end of file diff --git a/specification/cognitiveservices/data-plane/CustomVision/Training/stable/v2.0/examples/DeleteImageRegions.json b/specification/cognitiveservices/data-plane/CustomVision/Training/stable/v2.0/examples/DeleteImageRegions.json new file mode 100644 index 000000000000..8f6df982b3f1 --- /dev/null +++ b/specification/cognitiveservices/data-plane/CustomVision/Training/stable/v2.0/examples/DeleteImageRegions.json @@ -0,0 +1,14 @@ +{ + "parameters": { + "Content-Type": "application/json", + "Training-Key": "{API Key}", + "projectId": "bc3f7dad-5544-468c-8573-3ef04d55463e", + "regionIds": [ "" ] + }, + "responses": { + "204": { + "headers": {}, + "body": "" + } + } +} \ No newline at end of file diff --git a/specification/cognitiveservices/data-plane/CustomVision/Training/stable/v2.0/examples/DeleteImageTags.json b/specification/cognitiveservices/data-plane/CustomVision/Training/stable/v2.0/examples/DeleteImageTags.json new file mode 100644 index 000000000000..518da817475e --- /dev/null +++ b/specification/cognitiveservices/data-plane/CustomVision/Training/stable/v2.0/examples/DeleteImageTags.json @@ -0,0 +1,21 @@ +{ + "parameters": { + "Content-Type": "application/json", + "Training-Key": "{API Key}", + "projectId": "64b822c5-8082-4b36-a426-27225f4aa18c", + "imageIds": [ + "e31a14ab-5d78-4f7b-a267-3a1e4fd8a758", + "cf0f83fb-ebaa-4b25-8e34-613a6a0b8a12" + ], + "tagIds": [ + "e31a14ab-5d78-4f7b-a267-3a1e4fd8a758", + "cf0f83fb-ebaa-4b25-8e34-613a6a0b8a12" + ] + }, + "responses": { + "204": { + "headers": {}, + "body": "" + } + } +} \ No newline at end of file diff --git a/specification/cognitiveservices/data-plane/CustomVision/Training/stable/v2.0/examples/DeleteImages.json b/specification/cognitiveservices/data-plane/CustomVision/Training/stable/v2.0/examples/DeleteImages.json new file mode 100644 index 000000000000..145476cdc56d --- /dev/null +++ b/specification/cognitiveservices/data-plane/CustomVision/Training/stable/v2.0/examples/DeleteImages.json @@ -0,0 +1,17 @@ +{ + "parameters": { + "Content-Type": "application/json", + "Training-Key": "{API Key}", + "projectId": "64b822c5-8082-4b36-a426-27225f4aa18c", + "imageIds": [ + "e31a14ab-5d78-4f7b-a267-3a1e4fd8a758", + "cf0f83fb-ebaa-4b25-8e34-613a6a0b8a12" + ] + }, + "responses": { + "204": { + "headers": {}, + "body": "" + } + } +} \ No newline at end of file diff --git a/specification/cognitiveservices/data-plane/CustomVision/Training/stable/v2.0/examples/DeleteIteration.json b/specification/cognitiveservices/data-plane/CustomVision/Training/stable/v2.0/examples/DeleteIteration.json new file mode 100644 index 000000000000..e8485f9861ca --- /dev/null +++ b/specification/cognitiveservices/data-plane/CustomVision/Training/stable/v2.0/examples/DeleteIteration.json @@ -0,0 +1,14 @@ +{ + "parameters": { + "Content-Type": "application/json", + "Training-Key": "{API Key}", + "projectId": "64b822c5-8082-4b36-a426-27225f4aa18c", + "iterationId": "e31a14ab-5d78-4f7b-a267-3a1e4fd8a758" + }, + "responses": { + "204": { + "headers": {}, + "body": "" + } + } +} \ No newline at end of file diff --git a/specification/cognitiveservices/data-plane/CustomVision/Training/stable/v2.0/examples/DeletePrediction.json b/specification/cognitiveservices/data-plane/CustomVision/Training/stable/v2.0/examples/DeletePrediction.json new file mode 100644 index 000000000000..4d32761fe2ee --- /dev/null +++ b/specification/cognitiveservices/data-plane/CustomVision/Training/stable/v2.0/examples/DeletePrediction.json @@ -0,0 +1,17 @@ +{ + "parameters": { + "Content-Type": "application/json", + "Training-Key": "{API Key}", + "projectId": "64b822c5-8082-4b36-a426-27225f4aa18c", + "ids": [ + "e31a14ab-5d78-4f7b-a267-3a1e4fd8a758", + "cf0f83fb-ebaa-4b25-8e34-613a6a0b8a12" + ] + }, + "responses": { + "204": { + "headers": {}, + "body": "" + } + } +} \ No newline at end of file diff --git a/specification/cognitiveservices/data-plane/CustomVision/Training/stable/v2.0/examples/DeleteProject.json b/specification/cognitiveservices/data-plane/CustomVision/Training/stable/v2.0/examples/DeleteProject.json new file mode 100644 index 000000000000..df01ee93a164 --- /dev/null +++ b/specification/cognitiveservices/data-plane/CustomVision/Training/stable/v2.0/examples/DeleteProject.json @@ -0,0 +1,13 @@ +{ + "parameters": { + "Content-Type": "application/json", + "Training-Key": "{API Key}", + "projectId": "bc3f7dad-5544-468c-8573-3ef04d55463e" + }, + "responses": { + "204": { + "headers": {}, + "body": "" + } + } +} \ No newline at end of file diff --git a/specification/cognitiveservices/data-plane/CustomVision/Training/stable/v2.0/examples/DeleteTag.json b/specification/cognitiveservices/data-plane/CustomVision/Training/stable/v2.0/examples/DeleteTag.json new file mode 100644 index 000000000000..a0ec1fcd1899 --- /dev/null +++ b/specification/cognitiveservices/data-plane/CustomVision/Training/stable/v2.0/examples/DeleteTag.json @@ -0,0 +1,14 @@ +{ + "parameters": { + "Content-Type": "application/json", + "Training-Key": "{API Key}", + "projectId": "bc3f7dad-5544-468c-8573-3ef04d55463e", + "tagId": "9e27bc1b-7ae7-4e3b-a4e5-36153479dc01" + }, + "responses": { + "204": { + "headers": {}, + "body": "" + } + } +} \ No newline at end of file diff --git a/specification/cognitiveservices/data-plane/CustomVision/Training/stable/v2.0/examples/ExportIteration.json b/specification/cognitiveservices/data-plane/CustomVision/Training/stable/v2.0/examples/ExportIteration.json new file mode 100644 index 000000000000..56492e41b46e --- /dev/null +++ b/specification/cognitiveservices/data-plane/CustomVision/Training/stable/v2.0/examples/ExportIteration.json @@ -0,0 +1,19 @@ +{ + "parameters": { + "Content-Type": "application/json", + "Training-Key": "{API Key}", + "projectId": "64b822c5-8082-4b36-a426-27225f4aa18c", + "iterationId": "e31a14ab-5d78-4f7b-a267-3a1e4fd8a758", + "platform": "tensorflow" + }, + "responses": { + "200": { + "headers": {}, + "body": { + "platform": "TensorFlow", + "status": "Exporting", + "downloadUri": null + } + } + } +} \ No newline at end of file diff --git a/specification/cognitiveservices/data-plane/CustomVision/Training/stable/v2.0/examples/GetDomain.json b/specification/cognitiveservices/data-plane/CustomVision/Training/stable/v2.0/examples/GetDomain.json new file mode 100644 index 000000000000..d48adae04acd --- /dev/null +++ b/specification/cognitiveservices/data-plane/CustomVision/Training/stable/v2.0/examples/GetDomain.json @@ -0,0 +1,17 @@ +{ + "parameters": { + "Content-Type": "application/json", + "Training-Key": "{API Key}", + "domainId": "b30a91ae-e3c1-4f73-a81e-c270bff27c39" + }, + "responses": { + "200": { + "headers": {}, + "body": { + "id": "b30a91ae-e3c1-4f73-a81e-c270bff27c39", + "name": "Retail", + "exportable": false + } + } + } +} \ No newline at end of file diff --git a/specification/cognitiveservices/data-plane/CustomVision/Training/stable/v2.0/examples/GetDomains.json b/specification/cognitiveservices/data-plane/CustomVision/Training/stable/v2.0/examples/GetDomains.json new file mode 100644 index 000000000000..1ddf4a5f2290 --- /dev/null +++ b/specification/cognitiveservices/data-plane/CustomVision/Training/stable/v2.0/examples/GetDomains.json @@ -0,0 +1,53 @@ +{ + "parameters": { + "Content-Type": "application/json", + "Training-Key": "{API Key}" + }, + "responses": { + "200": { + "headers": {}, + "body": [ + { + "id": "ee85a74c-405e-4adc-bb47-ffa8ca0c9f31", + "name": "General", + "exportable": false + }, + { + "id": "c151d5b5-dd07-472a-acc8-15d29dea8518", + "name": "Food", + "exportable": false + }, + { + "id": "ca455789-012d-4b50-9fec-5bb63841c793", + "name": "Landmarks", + "exportable": false + }, + { + "id": "b30a91ae-e3c1-4f73-a81e-c270bff27c39", + "name": "Retail", + "exportable": false + }, + { + "id": "45badf75-3591-4f26-a705-45678d3e9f5f", + "name": "Adult", + "exportable": false + }, + { + "id": "0732100f-1a38-4e49-a514-c9b44c697ab5", + "name": "General (compact)", + "exportable": true + }, + { + "id": "b5cfd229-2ac7-4b2b-8d0a-2b0661344894", + "name": "Landmarks (compact)", + "exportable": true + }, + { + "id": "6b4faeda-8396-481b-9f8b-177b9fa3097f", + "name": "Retail (compact)", + "exportable": true + } + ] + } + } +} \ No newline at end of file diff --git a/specification/cognitiveservices/data-plane/CustomVision/Training/stable/v2.0/examples/GetExports.json b/specification/cognitiveservices/data-plane/CustomVision/Training/stable/v2.0/examples/GetExports.json new file mode 100644 index 000000000000..3f1b714ce6c3 --- /dev/null +++ b/specification/cognitiveservices/data-plane/CustomVision/Training/stable/v2.0/examples/GetExports.json @@ -0,0 +1,20 @@ +{ + "parameters": { + "Content-Type": "application/json", + "Training-Key": "{API Key}", + "projectId": "64b822c5-8082-4b36-a426-27225f4aa18c", + "iterationId": "e31a14ab-5d78-4f7b-a267-3a1e4fd8a758" + }, + "responses": { + "200": { + "headers": {}, + "body": [ + { + "platform": "TensorFlow", + "status": "Done", + "downloadUri": "{Download URI" + } + ] + } + } +} \ No newline at end of file diff --git a/specification/cognitiveservices/data-plane/CustomVision/Training/stable/v2.0/examples/GetImagePerformanceCount.json b/specification/cognitiveservices/data-plane/CustomVision/Training/stable/v2.0/examples/GetImagePerformanceCount.json new file mode 100644 index 000000000000..aa56993d9e22 --- /dev/null +++ b/specification/cognitiveservices/data-plane/CustomVision/Training/stable/v2.0/examples/GetImagePerformanceCount.json @@ -0,0 +1,15 @@ +{ + "parameters": { + "Content-Type": "application/json", + "Training-Key": "{API Key}", + "projectId": "bc3f7dad-5544-468c-8573-3ef04d55463e", + "iterationId": "cf0f83fb-ebaa-4b25-8e34-613a6a0b8a12", + "tagIds": [ "b5f7e6a2-a481-49a6-afec-a7cef1af3544" ] + }, + "responses": { + "200": { + "headers": {}, + "body": "1" + } + } +} \ No newline at end of file diff --git a/specification/cognitiveservices/data-plane/CustomVision/Training/stable/v2.0/examples/GetImagePerformances.json b/specification/cognitiveservices/data-plane/CustomVision/Training/stable/v2.0/examples/GetImagePerformances.json new file mode 100644 index 000000000000..53d22d37a5bd --- /dev/null +++ b/specification/cognitiveservices/data-plane/CustomVision/Training/stable/v2.0/examples/GetImagePerformances.json @@ -0,0 +1,42 @@ +{ + "parameters": { + "Content-Type": "application/json", + "Training-Key": "{API Key}", + "projectId": "bc3f7dad-5544-468c-8573-3ef04d55463e", + "iterationId": "b7b9d99c-a2c6-4658-9900-a98d2ff5bc66", + "tagIds": [ + "" + ], + "orderBy": "Newest" + }, + "responses": { + "200": { + "headers": {}, + "body": [ + { + "id": "dfd2d346-3ed5-4e1e-857d-af4e32cec042", + "created": "2018-01-31T20:18:26.5806336Z", + "predictions": [ + { + "tagId": "b5f7e6a2-a481-49a6-afec-a7cef1af3544", + "tagName": "Tag 1", + "probability": 1.0, + "boundingBox": { + "left": 0.25, + "top": 0.25, + "width": 0.25, + "height": 0.25 + } + } + ], + "width": 600, + "height": 1600, + "imageUri": "", + "thumbnailUri": "", + "tags" : [ ], + "regions": [ ] + } + ] + } + } +} \ No newline at end of file diff --git a/specification/cognitiveservices/data-plane/CustomVision/Training/stable/v2.0/examples/GetImageRegionProposals.json b/specification/cognitiveservices/data-plane/CustomVision/Training/stable/v2.0/examples/GetImageRegionProposals.json new file mode 100644 index 000000000000..02aeecf2c97e --- /dev/null +++ b/specification/cognitiveservices/data-plane/CustomVision/Training/stable/v2.0/examples/GetImageRegionProposals.json @@ -0,0 +1,28 @@ +{ + "parameters": { + "Content-Type": "application/json", + "Training-Key": "{API Key}", + "projectId": "bc3f7dad-5544-468c-8573-3ef04d55463e", + "imageId": "4d6eb844-42ee-42bc-bd6f-c32455ef07c9" + }, + "responses": { + "200": { + "headers": {}, + "body": { + "projectId": "bc3f7dad-5544-468c-8573-3ef04d55463e", + "imageId": "4d6eb844-42ee-42bc-bd6f-c32455ef07c9", + "proposals": [ + { + "confidence": 0.25, + "boundingBox": { + "left": 0.25, + "top": 0.25, + "width": 0.25, + "height": 0.25 + } + } + ] + } + } + } +} \ No newline at end of file diff --git a/specification/cognitiveservices/data-plane/CustomVision/Training/stable/v2.0/examples/GetImagesByIds.json b/specification/cognitiveservices/data-plane/CustomVision/Training/stable/v2.0/examples/GetImagesByIds.json new file mode 100644 index 000000000000..b4074dc03914 --- /dev/null +++ b/specification/cognitiveservices/data-plane/CustomVision/Training/stable/v2.0/examples/GetImagesByIds.json @@ -0,0 +1,14 @@ +{ + "parameters": { + "Content-Type": "application/json", + "Training-Key": "{API Key}", + "projectId": "bc3f7dad-5544-468c-8573-3ef04d55463e", + "iterationId": "cf0f83fb-ebaa-4b25-8e34-613a6a0b8a12" + }, + "responses": { + "200": { + "headers": {}, + "body": [] + } + } +} \ No newline at end of file diff --git a/specification/cognitiveservices/data-plane/CustomVision/Training/stable/v2.0/examples/GetIteration.json b/specification/cognitiveservices/data-plane/CustomVision/Training/stable/v2.0/examples/GetIteration.json new file mode 100644 index 000000000000..73d869176e5e --- /dev/null +++ b/specification/cognitiveservices/data-plane/CustomVision/Training/stable/v2.0/examples/GetIteration.json @@ -0,0 +1,25 @@ +{ + "parameters": { + "Content-Type": "application/json", + "Training-Key": "{API Key}", + "projectId": "64b822c5-8082-4b36-a426-27225f4aa18c", + "iterationId": "e31a14ab-5d78-4f7b-a267-3a1e4fd8a758" + }, + "responses": { + "200": { + "headers": {}, + "body": { + "id": "e31a14ab-5d78-4f7b-a267-3a1e4fd8a758", + "name": "Iteration 2", + "isDefault": false, + "status": "Completed", + "created": "2017-12-18T22:40:36.9066667Z", + "lastModified": "2017-12-19T15:47:02.9511889Z", + "trainedAt": "2017-12-19T15:47:02.9511889Z", + "projectId": "64b822c5-8082-4b36-a426-27225f4aa18c", + "exportable": false, + "domainId": "ee85a74c-405e-4adc-bb47-ffa8ca0c9f31" + } + } + } +} \ No newline at end of file diff --git a/specification/cognitiveservices/data-plane/CustomVision/Training/stable/v2.0/examples/GetIterationPerformance.json b/specification/cognitiveservices/data-plane/CustomVision/Training/stable/v2.0/examples/GetIterationPerformance.json new file mode 100644 index 000000000000..7439d312e675 --- /dev/null +++ b/specification/cognitiveservices/data-plane/CustomVision/Training/stable/v2.0/examples/GetIterationPerformance.json @@ -0,0 +1,38 @@ +{ + "parameters": { + "Content-Type": "application/json", + "Training-Key": "{API Key}", + "projectId": "bc3f7dad-5544-468c-8573-3ef04d55463e", + "iterationId": "fe1e83c4-6f50-4899-9544-6bb08cf0e15a", + "threshold": 0.9 + }, + "responses": { + "200": { + "headers": {}, + "body": { + "perTagPerformance": [ + { + "id": "e31ff107-5505-4753-be42-b369b21b026c", + "name": "Hemlock", + "precision": 1.0, + "precisionStdDeviation": 0.0, + "recall": 1.0, + "recallStdDeviation": 0.0 + }, + { + "id": "349d72ac-0948-4d51-b1e4-c14a1f9b848a", + "name": "Japanese Cherry", + "precision": 1.0, + "precisionStdDeviation": 0.0, + "recall": 1.0, + "recallStdDeviation": 0.0 + } + ], + "precision": 1.0, + "precisionStdDeviation": 0.0, + "recall": 1.0, + "recallStdDeviation": 0.0 + } + } + } +} \ No newline at end of file diff --git a/specification/cognitiveservices/data-plane/CustomVision/Training/stable/v2.0/examples/GetIterations.json b/specification/cognitiveservices/data-plane/CustomVision/Training/stable/v2.0/examples/GetIterations.json new file mode 100644 index 000000000000..65076112db77 --- /dev/null +++ b/specification/cognitiveservices/data-plane/CustomVision/Training/stable/v2.0/examples/GetIterations.json @@ -0,0 +1,49 @@ +{ + "parameters": { + "Content-Type": "application/json", + "Training-Key": "{API Key}", + "projectId": "64b822c5-8082-4b36-a426-27225f4aa18c" + }, + "responses": { + "200": { + "headers": {}, + "body": [ + { + "id": "fe1e83c4-6f50-4899-9544-6bb08cf0e15a", + "name": "Iteration 1", + "isDefault": true, + "status": "Completed", + "created": "2017-12-18T22:40:29.7304213Z", + "lastModified": "2017-12-18T22:40:41.3173903Z", + "trainedAt": "2017-12-18T22:40:41.0058589Z", + "projectId": "64b822c5-8082-4b36-a426-27225f4aa18c", + "exportable": false, + "domainId": "ee85a74c-405e-4adc-bb47-ffa8ca0c9f31" + }, + { + "id": "e31a14ab-5d78-4f7b-a267-3a1e4fd8a758", + "name": "Iteration 2", + "isDefault": false, + "status": "Completed", + "created": "2017-12-18T22:40:36.9066667Z", + "lastModified": "2017-12-19T15:47:02.9511889Z", + "trainedAt": "2017-12-19T15:47:02.9511889Z", + "projectId": "64b822c5-8082-4b36-a426-27225f4aa18c", + "exportable": false, + "domainId": "ee85a74c-405e-4adc-bb47-ffa8ca0c9f31" + }, + { + "id": "3adaf7b2-18fc-4376-9da4-b5ea160a7cf5", + "name": "Iteration 3", + "isDefault": false, + "status": "New", + "created": "2017-12-19T15:46:59.2533333Z", + "lastModified": "2017-12-19T15:46:59.2699369Z", + "projectId": "64b822c5-8082-4b36-a426-27225f4aa18c", + "exportable": false, + "domainId": null + } + ] + } + } +} \ No newline at end of file diff --git a/specification/cognitiveservices/data-plane/CustomVision/Training/stable/v2.0/examples/GetProject.json b/specification/cognitiveservices/data-plane/CustomVision/Training/stable/v2.0/examples/GetProject.json new file mode 100644 index 000000000000..1aa6738e11f5 --- /dev/null +++ b/specification/cognitiveservices/data-plane/CustomVision/Training/stable/v2.0/examples/GetProject.json @@ -0,0 +1,23 @@ +{ + "parameters": { + "Content-Type": "application/json", + "Training-Key": "{API Key}", + "projectId": "bc3f7dad-5544-468c-8573-3ef04d55463e" + }, + "responses": { + "200": { + "headers": {}, + "body": { + "id": "bc3f7dad-5544-468c-8573-3ef04d55463e", + "name": "My New Project", + "description": "A test project", + "settings": { + "domainId": "ee85a74c-405e-4adc-bb47-ffa8ca0c9f31" + }, + "created": "2017-12-18T05:43:18.08Z", + "lastModified": "2017-12-18T05:43:18.0962423Z", + "thumbnailUri": null + } + } + } +} \ No newline at end of file diff --git a/specification/cognitiveservices/data-plane/CustomVision/Training/stable/v2.0/examples/GetProjects.json b/specification/cognitiveservices/data-plane/CustomVision/Training/stable/v2.0/examples/GetProjects.json new file mode 100644 index 000000000000..267009f6e8b9 --- /dev/null +++ b/specification/cognitiveservices/data-plane/CustomVision/Training/stable/v2.0/examples/GetProjects.json @@ -0,0 +1,24 @@ +{ + "parameters": { + "Content-Type": "application/json", + "Training-Key": "{API Key}" + }, + "responses": { + "200": { + "headers": {}, + "body": [ + { + "id": "bc3f7dad-5544-468c-8573-3ef04d55463e", + "name": "My New Project", + "description": "", + "settings": { + "domainId": "ee85a74c-405e-4adc-bb47-ffa8ca0c9f31" + }, + "created": "2017-12-18T05:43:18.08Z", + "lastModified": "2017-12-18T05:43:18.0962423Z", + "thumbnailUri": null + } + ] + } + } +} \ No newline at end of file diff --git a/specification/cognitiveservices/data-plane/CustomVision/Training/stable/v2.0/examples/GetTag.json b/specification/cognitiveservices/data-plane/CustomVision/Training/stable/v2.0/examples/GetTag.json new file mode 100644 index 000000000000..bf11b89c5a4c --- /dev/null +++ b/specification/cognitiveservices/data-plane/CustomVision/Training/stable/v2.0/examples/GetTag.json @@ -0,0 +1,19 @@ +{ + "parameters": { + "Content-Type": "application/json", + "Training-Key": "{API Key}", + "projectId": "bc3f7dad-5544-468c-8573-3ef04d55463e", + "tagId": "9e27bc1b-7ae7-4e3b-a4e5-36153479dc01" + }, + "responses": { + "200": { + "headers": {}, + "body": { + "id": "9e27bc1b-7ae7-4e3b-a4e5-36153479dc01", + "name": "Tag1", + "description": "Description of Tag1", + "imageCount": 0 + } + } + } +} \ No newline at end of file diff --git a/specification/cognitiveservices/data-plane/CustomVision/Training/stable/v2.0/examples/GetTaggedImageCount.json b/specification/cognitiveservices/data-plane/CustomVision/Training/stable/v2.0/examples/GetTaggedImageCount.json new file mode 100644 index 000000000000..ad6351b8c0f6 --- /dev/null +++ b/specification/cognitiveservices/data-plane/CustomVision/Training/stable/v2.0/examples/GetTaggedImageCount.json @@ -0,0 +1,14 @@ +{ + "parameters": { + "Content-Type": "application/json", + "Training-Key": "{API Key}", + "projectId": "bc3f7dad-5544-468c-8573-3ef04d55463e", + "iterationId": "cf0f83fb-ebaa-4b25-8e34-613a6a0b8a12" + }, + "responses": { + "200": { + "headers": {}, + "body": "10" + } + } +} \ No newline at end of file diff --git a/specification/cognitiveservices/data-plane/CustomVision/Training/stable/v2.0/examples/GetTaggedImages.json b/specification/cognitiveservices/data-plane/CustomVision/Training/stable/v2.0/examples/GetTaggedImages.json new file mode 100644 index 000000000000..b4074dc03914 --- /dev/null +++ b/specification/cognitiveservices/data-plane/CustomVision/Training/stable/v2.0/examples/GetTaggedImages.json @@ -0,0 +1,14 @@ +{ + "parameters": { + "Content-Type": "application/json", + "Training-Key": "{API Key}", + "projectId": "bc3f7dad-5544-468c-8573-3ef04d55463e", + "iterationId": "cf0f83fb-ebaa-4b25-8e34-613a6a0b8a12" + }, + "responses": { + "200": { + "headers": {}, + "body": [] + } + } +} \ No newline at end of file diff --git a/specification/cognitiveservices/data-plane/CustomVision/Training/stable/v2.0/examples/GetTags.json b/specification/cognitiveservices/data-plane/CustomVision/Training/stable/v2.0/examples/GetTags.json new file mode 100644 index 000000000000..f424d85ce713 --- /dev/null +++ b/specification/cognitiveservices/data-plane/CustomVision/Training/stable/v2.0/examples/GetTags.json @@ -0,0 +1,20 @@ +{ + "parameters": { + "Content-Type": "application/json", + "Training-Key": "{API Key}", + "projectId": "bc3f7dad-5544-468c-8573-3ef04d55463e" + }, + "responses": { + "200": { + "headers": {}, + "body": [ + { + "id": "9e27bc1b-7ae7-4e3b-a4e5-36153479dc01", + "name": "Tag1", + "description": "Description of Tag1", + "imageCount": 0 + } + ] + } + } +} \ No newline at end of file diff --git a/specification/cognitiveservices/data-plane/CustomVision/Training/stable/v2.0/examples/GetUntaggedImageCount.json b/specification/cognitiveservices/data-plane/CustomVision/Training/stable/v2.0/examples/GetUntaggedImageCount.json new file mode 100644 index 000000000000..ad6351b8c0f6 --- /dev/null +++ b/specification/cognitiveservices/data-plane/CustomVision/Training/stable/v2.0/examples/GetUntaggedImageCount.json @@ -0,0 +1,14 @@ +{ + "parameters": { + "Content-Type": "application/json", + "Training-Key": "{API Key}", + "projectId": "bc3f7dad-5544-468c-8573-3ef04d55463e", + "iterationId": "cf0f83fb-ebaa-4b25-8e34-613a6a0b8a12" + }, + "responses": { + "200": { + "headers": {}, + "body": "10" + } + } +} \ No newline at end of file diff --git a/specification/cognitiveservices/data-plane/CustomVision/Training/stable/v2.0/examples/GetUntaggedImages.json b/specification/cognitiveservices/data-plane/CustomVision/Training/stable/v2.0/examples/GetUntaggedImages.json new file mode 100644 index 000000000000..b4074dc03914 --- /dev/null +++ b/specification/cognitiveservices/data-plane/CustomVision/Training/stable/v2.0/examples/GetUntaggedImages.json @@ -0,0 +1,14 @@ +{ + "parameters": { + "Content-Type": "application/json", + "Training-Key": "{API Key}", + "projectId": "bc3f7dad-5544-468c-8573-3ef04d55463e", + "iterationId": "cf0f83fb-ebaa-4b25-8e34-613a6a0b8a12" + }, + "responses": { + "200": { + "headers": {}, + "body": [] + } + } +} \ No newline at end of file diff --git a/specification/cognitiveservices/data-plane/CustomVision/Training/stable/v2.0/examples/QueryPredictions.json b/specification/cognitiveservices/data-plane/CustomVision/Training/stable/v2.0/examples/QueryPredictions.json new file mode 100644 index 000000000000..bf1cf24fbc77 --- /dev/null +++ b/specification/cognitiveservices/data-plane/CustomVision/Training/stable/v2.0/examples/QueryPredictions.json @@ -0,0 +1,62 @@ +{ + "parameters": { + "Content-Type": "application/json", + "Training-Key": "{API Key}", + "projectId": "bc3f7dad-5544-468c-8573-3ef04d55463e", + "query": { + "orderBy": "Newest", + "tags": [ + { + "id": "b5f7e6a2-a481-49a6-afec-a7cef1af3544", + "minThreshold": 0.9 + } + ] + } + }, + "responses": { + "200": { + "headers": {}, + "body": { + "results": [ + { + "id": "dfd2d346-3ed5-4e1e-857d-af4e32cec042", + "project": "8988643a-ae70-447d-9a22-15c4255e5ecb", + "iteration": "b7b9d99c-a2c6-4658-9900-a98d2ff5bc66", + "created": "2018-01-31T20:18:26.5806336Z", + "predictions": [ + { + "tagId": "b5f7e6a2-a481-49a6-afec-a7cef1af3544", + "tagName": "Tag 1", + "probability": 1.0 + }, + { + "tagId": "45619cda-d1c9-4bc8-a3e1-87c5d81adbc3", + "tagName": "Tag 2", + "probability": 3.60627153E-12 + } + ], + "imageUri": "", + "thumbnailUri": "" + } + ], + "token": { + "session": "1:286613", + "continuation": null, + "maxCount": 0, + "orderBy": "Newest", + "tags": [ + { + "id": "b5f7e6a2-a481-49a6-afec-a7cef1af3544", + "minThreshold": 0.9, + "maxThreshold": 1.0 + } + ], + "iterationId": null, + "startTime": null, + "endTime": null, + "application": null + } + } + } + } +} \ No newline at end of file diff --git a/specification/cognitiveservices/data-plane/CustomVision/Training/stable/v2.0/examples/QuickTestImage.json b/specification/cognitiveservices/data-plane/CustomVision/Training/stable/v2.0/examples/QuickTestImage.json new file mode 100644 index 000000000000..69ce03eeb6b1 --- /dev/null +++ b/specification/cognitiveservices/data-plane/CustomVision/Training/stable/v2.0/examples/QuickTestImage.json @@ -0,0 +1,32 @@ +{ + "parameters": { + "Content-Type": "application/json", + "Training-Key": "{API Key}", + "projectId": "64b822c5-8082-4b36-a426-27225f4aa18c", + "iterationId": "fe1e83c4-6f50-4899-9544-6bb08cf0e15a", + "imageData": "multipart-form-data" + }, + "responses": { + "200": { + "headers": {}, + "body": { + "id": "951098b2-9b69-427b-bddb-d5cb618874e3", + "project": "64b822c5-8082-4b36-a426-27225f4aa18c", + "iteration": "fe1e83c4-6f50-4899-9544-6bb08cf0e15a", + "created": "2017-12-19T14:21:41.6789561Z", + "predictions": [ + { + "tagId": "e31ff107-5505-4753-be42-b369b21b026c", + "tagName": "Hemlock", + "probability": 0.05149666 + }, + { + "tagId": "349d72ac-0948-4d51-b1e4-c14a1f9b848a", + "tagName": "Japanese Cherry", + "probability": 0.00 + } + ] + } + } + } +} \ No newline at end of file diff --git a/specification/cognitiveservices/data-plane/CustomVision/Training/stable/v2.0/examples/QuickTestImageUrl.json b/specification/cognitiveservices/data-plane/CustomVision/Training/stable/v2.0/examples/QuickTestImageUrl.json new file mode 100644 index 000000000000..99363212a175 --- /dev/null +++ b/specification/cognitiveservices/data-plane/CustomVision/Training/stable/v2.0/examples/QuickTestImageUrl.json @@ -0,0 +1,34 @@ +{ + "parameters": { + "Content-Type": "application/json", + "Training-Key": "{API Key}", + "projectId": "64b822c5-8082-4b36-a426-27225f4aa18c", + "iterationId": "fe1e83c4-6f50-4899-9544-6bb08cf0e15a", + "imageUrl": { + "url": "{Image URL}" + } + }, + "responses": { + "200": { + "headers": {}, + "body": { + "id": "951098b2-9b69-427b-bddb-d5cb618874e3", + "project": "64b822c5-8082-4b36-a426-27225f4aa18c", + "iteration": "fe1e83c4-6f50-4899-9544-6bb08cf0e15a", + "created": "2017-12-19T14:21:41.6789561Z", + "predictions": [ + { + "tagId": "e31ff107-5505-4753-be42-b369b21b026c", + "tagName": "Hemlock", + "probability": 0.05149666 + }, + { + "tagId": "349d72ac-0948-4d51-b1e4-c14a1f9b848a", + "tagName": "Japanese Cherry", + "probability": 0.00 + } + ] + } + } + } +} \ No newline at end of file diff --git a/specification/cognitiveservices/data-plane/CustomVision/Training/stable/v2.0/examples/TrainProject.json b/specification/cognitiveservices/data-plane/CustomVision/Training/stable/v2.0/examples/TrainProject.json new file mode 100644 index 000000000000..b12850dc8165 --- /dev/null +++ b/specification/cognitiveservices/data-plane/CustomVision/Training/stable/v2.0/examples/TrainProject.json @@ -0,0 +1,23 @@ +{ + "parameters": { + "Content-Type": "application/json", + "Training-Key": "{API Key}", + "projectId": "64b822c5-8082-4b36-a426-27225f4aa18c" + }, + "responses": { + "200": { + "headers": {}, + "body": { + "id": "e31a14ab-5d78-4f7b-a267-3a1e4fd8a758", + "name": "Iteration 2", + "isDefault": false, + "status": "Training", + "created": "2017-12-18T22:40:36.9066667Z", + "lastModified": "2017-12-19T15:46:58.197323Z", + "projectId": "64b822c5-8082-4b36-a426-27225f4aa18c", + "exportable": false, + "domainId": null + } + } + } +} \ No newline at end of file diff --git a/specification/cognitiveservices/data-plane/CustomVision/Training/stable/v2.0/examples/UpdateIteration.json b/specification/cognitiveservices/data-plane/CustomVision/Training/stable/v2.0/examples/UpdateIteration.json new file mode 100644 index 000000000000..3c7cfc7ae1a4 --- /dev/null +++ b/specification/cognitiveservices/data-plane/CustomVision/Training/stable/v2.0/examples/UpdateIteration.json @@ -0,0 +1,28 @@ +{ + "parameters": { + "Content-Type": "application/json", + "Training-Key": "{API Key}", + "projectId": "64b822c5-8082-4b36-a426-27225f4aa18c", + "iterationId": "e31a14ab-5d78-4f7b-a267-3a1e4fd8a758", + "updatedIteration": { + "name": "Best Iteration" + } + }, + "responses": { + "200": { + "headers": {}, + "body": { + "id": "e31a14ab-5d78-4f7b-a267-3a1e4fd8a758", + "name": "Best Iteration", + "isDefault": false, + "status": "Completed", + "created": "2017-12-18T22:40:36.9066667Z", + "lastModified": "2017-12-19T15:53:07.8782881Z", + "trainedAt": "2017-12-19T15:47:02.9511889Z", + "projectId": "64b822c5-8082-4b36-a426-27225f4aa18c", + "exportable": false, + "domainId": "ee85a74c-405e-4adc-bb47-ffa8ca0c9f31" + } + } + } +} \ No newline at end of file diff --git a/specification/cognitiveservices/data-plane/CustomVision/Training/stable/v2.0/examples/UpdateProject.json b/specification/cognitiveservices/data-plane/CustomVision/Training/stable/v2.0/examples/UpdateProject.json new file mode 100644 index 000000000000..7c287615090c --- /dev/null +++ b/specification/cognitiveservices/data-plane/CustomVision/Training/stable/v2.0/examples/UpdateProject.json @@ -0,0 +1,27 @@ +{ + "parameters": { + "Content-Type": "application/json", + "Training-Key": "{API Key}", + "projectId": "bc3f7dad-5544-468c-8573-3ef04d55463e", + "updatedProject": { + "name": "New Project Name", + "description": "A new Description" + } + }, + "responses": { + "200": { + "headers": {}, + "body": { + "id": "bc3f7dad-5544-468c-8573-3ef04d55463e", + "name": "New Project Name", + "description": "A new Description", + "settings": { + "domainId": "ee85a74c-405e-4adc-bb47-ffa8ca0c9f31" + }, + "created": "2017-12-18T05:43:18.08Z", + "lastModified": "2017-12-18T05:43:18.0962423Z", + "thumbnailUri": null + } + } + } +} \ No newline at end of file diff --git a/specification/cognitiveservices/data-plane/CustomVision/Training/stable/v2.0/examples/UpdateTag.json b/specification/cognitiveservices/data-plane/CustomVision/Training/stable/v2.0/examples/UpdateTag.json new file mode 100644 index 000000000000..49157fcd803b --- /dev/null +++ b/specification/cognitiveservices/data-plane/CustomVision/Training/stable/v2.0/examples/UpdateTag.json @@ -0,0 +1,23 @@ +{ + "parameters": { + "Content-Type": "application/json", + "Training-Key": "{API Key}", + "projectId": "bc3f7dad-5544-468c-8573-3ef04d55463e", + "tagId": "9e27bc1b-7ae7-4e3b-a4e5-36153479dc01", + "updatedTag": { + "name": "Better Tag Name", + "description": "Better description" + } + }, + "responses": { + "200": { + "headers": {}, + "body": { + "id": "9e27bc1b-7ae7-4e3b-a4e5-36153479dc01", + "name": "Better Tag Name", + "description": "Better description", + "imageCount": 0 + } + } + } +} \ No newline at end of file