{ "swagger": "2.0", "info": { "version": "1.2", "title": "TrainingApi" }, "host": "southcentralus.api.cognitive.microsoft.com", "basePath": "/customvision/v1.2/Training", "schemes": [ "https" ], "paths": { "/account": { "get": { "tags": [ "AccountApi" ], "summary": "Get basic information about your account", "operationId": "GetAccountInfo", "consumes": [], "produces": [ "application/json", "text/json", "application/xml", "text/xml" ], "parameters": [ { "$ref": "#/parameters/ApiKey" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/Account" } } }, "x-ms-examples": { "Successful GetAccountInfo request": { "$ref": "./examples/GetAccountInfo.json" } } } }, "/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": "An 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": { "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. Limited 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", "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", "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", "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. Limited 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": "PostImageTags", "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 PostImageTags request": { "$ref": "./examples/PostImageTags.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. Limited 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}/predictions/query": { "post": { "tags": [ "PredictionsApi" ], "summary": "Get images that were sent to your prediction endpoint", "operationId": "QueryPredictionResults", "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/PredictionQuery" } } }, "x-ms-examples": { "Successful QueryPredictionResults request": { "$ref": "./examples/QueryPredictionResults.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}/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/ImagePredictionResult" } } }, "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": [ "application/json", "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/ImagePredictionResult" } } }, "x-ms-examples": { "Successful QuickTestImage request": { "$ref": "./examples/QuickTestImage.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}/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/{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 a trained iteration", "operationId": "GetIterationPerformance", "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 id of the trained iteration", "required": true, "type": "string", "format": "uuid", "x-nullable": false }, { "name": "threshold", "in": "query", "description": "The 0 to 1 threshold to determine positive prediction", "required": true, "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}/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 }, { "$ref": "#/parameters/ApiKey" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/Export" } } }, "x-ms-examples": { "Successful ExportIteration request": { "$ref": "./examples/ExportIteration.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": { "$ref": "#/definitions/TagList" } } }, "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" } } } }, "/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" } } } } }, "definitions": { "Account": { "description": "Represents a user account", "type": "object", "properties": { "UserName": { "description": "Gets the name of the account owner", "type": "string", "readOnly": true, "x-nullable": true }, "Email": { "description": "Gets the email associated with this account", "type": "string", "readOnly": true, "x-nullable": true }, "Keys": { "$ref": "#/definitions/ApiKeys", "description": "Gets the api keys associated with this account", "readOnly": true }, "Quotas": { "$ref": "#/definitions/AccountQuota", "description": "Gets the quotas associated with this account", "readOnly": true } }, "x-nullable": true }, "ApiKeys": { "type": "object", "properties": { "TrainingKeys": { "$ref": "#/definitions/KeyPair" }, "PredictionKeys": { "$ref": "#/definitions/KeyPair" } }, "x-nullable": true }, "AccountQuota": { "description": "Represents a set of quotas associated with an account", "type": "object", "properties": { "Tier": { "description": "Gets the tier of user", "type": "string", "readOnly": true, "x-nullable": true }, "Projects": { "$ref": "#/definitions/Quota", "description": "Gets the project quota", "readOnly": true }, "Predictions": { "$ref": "#/definitions/Quota", "description": "Gets the prediction quota", "readOnly": true }, "PerProject": { "description": "Gets a list of quotas that apply per-project for each project", "type": "array", "items": { "$ref": "#/definitions/PerProjectQuota" }, "readOnly": true, "x-nullable": true } }, "x-nullable": true }, "KeyPair": { "type": "object", "properties": { "PrimaryKey": { "type": "string", "x-nullable": true }, "SecondaryKey": { "type": "string", "x-nullable": true } }, "x-nullable": true }, "Quota": { "description": "Represents a quota", "type": "object", "properties": { "Total": { "format": "int32", "description": "The total allowable amount in the quota", "type": "integer", "readOnly": true, "x-nullable": false }, "Used": { "format": "int32", "description": "The amount of quota that has currently been used", "type": "integer", "readOnly": true, "x-nullable": false }, "TimeUntilReset": { "format": "duration", "description": "Gets the time remaining until the quota resets. Null if this quota does not reset.", "type": "string", "readOnly": true, "x-nullable": true } }, "x-nullable": true }, "PerProjectQuota": { "description": "Represents a set of quotas for a given project", "type": "object", "properties": { "ProjectId": { "format": "uuid", "description": "Gets the project id of the project this quota applies to", "type": "string", "readOnly": true, "x-nullable": false }, "Iterations": { "$ref": "#/definitions/Quota", "description": "Gets the iteration quota for the project", "readOnly": true }, "Images": { "$ref": "#/definitions/Quota", "description": "Gets the image quota for the project", "readOnly": true }, "Tags": { "$ref": "#/definitions/Quota", "description": "Gets the tag quota for the project", "readOnly": true } }, "x-nullable": true }, "Domain": { "type": "object", "properties": { "Id": { "format": "uuid", "type": "string", "readOnly": true, "x-nullable": false }, "Name": { "type": "string", "readOnly": true, "x-nullable": true }, "Exportable": { "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 }, "Predictions": { "type": "array", "items": { "$ref": "#/definitions/PredictionTag" }, "readOnly": true, "x-nullable": true } }, "x-nullable": true }, "ImageTag": { "type": "object", "properties": { "TagId": { "format": "uuid", "type": "string", "readOnly": true, "x-nullable": false }, "Created": { "format": "date-time", "type": "string", "readOnly": true, "x-nullable": false } }, "x-nullable": true }, "PredictionTag": { "type": "object", "properties": { "TagId": { "format": "uuid", "type": "string", "readOnly": true, "x-nullable": false }, "Tag": { "type": "string", "readOnly": true, "x-nullable": true }, "Probability": { "format": "float", "type": "number", "readOnly": true, "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", "ErrorUnknown" ], "type": "string", "readOnly": true, "x-nullable": false }, "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 } }, "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 } }, "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 } }, "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 }, "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 }, "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 }, "PredictionQuery": { "type": "object", "properties": { "Results": { "type": "array", "items": { "$ref": "#/definitions/Prediction" }, "readOnly": true, "x-nullable": true }, "Token": { "$ref": "#/definitions/PredictionQueryToken", "readOnly": true } }, "x-nullable": true }, "Prediction": { "description": "result of an image classification request", "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/PredictionTag" }, "readOnly": true, "x-nullable": true }, "ImageUri": { "type": "string", "readOnly": true, "x-nullable": true }, "ThumbnailUri": { "type": "string", "readOnly": true, "x-nullable": true } }, "x-nullable": true }, "ImageUrl": { "type": "object", "properties": { "Url": { "type": "string", "x-nullable": true } }, "x-nullable": true }, "ImagePredictionResult": { "description": "result of an image prediction request", "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/ImageTagPrediction" }, "readOnly": true, "x-nullable": true } }, "x-nullable": true }, "ImageTagPrediction": { "type": "object", "properties": { "TagId": { "format": "uuid", "type": "string", "readOnly": true, "x-nullable": false }, "Tag": { "type": "string", "readOnly": true, "x-nullable": true }, "Probability": { "format": "float", "type": "number", "readOnly": true, "x-nullable": false } }, "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" }, "CurrentIterationId": { "format": "uuid", "description": "Gets the current iteration id", "type": "string", "readOnly": true, "x-nullable": true }, "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 modified", "type": "string", "readOnly": true, "x-nullable": false }, "ThumbnailUri": { "description": "Gets the thumbnail url representing the image", "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 }, "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 }, "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": "double", "description": "Gets the precision", "type": "number", "readOnly": true, "x-nullable": false }, "PrecisionStdDeviation": { "format": "double", "description": "Gets the standard deviation for the precision", "type": "number", "readOnly": true, "x-nullable": false }, "Recall": { "format": "double", "description": "Gets the recall", "type": "number", "readOnly": true, "x-nullable": false }, "RecallStdDeviation": { "format": "double", "description": "Gets the standard deviation for the recall", "type": "number", "readOnly": true, "x-nullable": false } }, "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": "double", "description": "Gets the precision", "type": "number", "readOnly": true, "x-nullable": false }, "PrecisionStdDeviation": { "format": "double", "description": "Gets the standard deviation for the precision", "type": "number", "readOnly": true, "x-nullable": false }, "Recall": { "format": "double", "description": "Gets the recall", "type": "number", "readOnly": true, "x-nullable": false }, "RecallStdDeviation": { "format": "double", "description": "Gets the standard deviation for the recall", "type": "number", "readOnly": true, "x-nullable": false } }, "x-nullable": true }, "Export": { "type": "object", "properties": { "Platform": { "enum": [ "CoreML", "TensorFlow" ], "type": "string", "readOnly": true, "x-nullable": false }, "Status": { "enum": [ "Exporting", "Failed", "Done" ], "type": "string", "readOnly": true, "x-nullable": false }, "DownloadUri": { "type": "string", "readOnly": true, "x-nullable": true } }, "x-nullable": true }, "TagList": { "type": "object", "properties": { "Tags": { "type": "array", "items": { "$ref": "#/definitions/Tag" }, "readOnly": true, "x-nullable": true }, "TotalTaggedImages": { "format": "int32", "type": "integer", "readOnly": true, "x-nullable": false }, "TotalUntaggedImages": { "format": "int32", "type": "integer", "readOnly": true, "x-nullable": false } }, "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" } } }