{
"swagger": "2.0",
"info": {
"title": "Custom_Vision_Admin_1.1",
"version": "1.0"
},
"host": "cognitivewcusprod.cognitiveservices.azure.com",
"basePath": "/customvision/v1.1/Admin",
"schemes": [
"https"
],
"securityDefinitions": {
"apiKeyHeader": {
"type": "apiKey",
"name": "Admin-key",
"in": "header"
},
"apiKeyQuery": {
"type": "apiKey",
"name": "Admin-key",
"in": "query"
}
},
"security": [
{
"apiKeyHeader": []
},
{
"apiKeyQuery": []
}
],
"x-servers": [
{
"url": "https://cognitivewcusprod.cognitiveservices.azure.com"
},
{
"url": "https://cognitivewcusprod.openai.azure.com"
},
{
"url": "https://westcentralus.api.cognitive.microsoft.com"
}
],
"paths": {
"/user/{oid}": {
"delete": {
"operationId": "5ba1468edad0a80ce8ddebe4",
"summary": "DeleteUser",
"parameters": [
{
"name": "oid",
"in": "path",
"required": true,
"type": "string"
},
{
"name": "Admin-Key",
"in": "header",
"description": "API key.",
"required": true,
"type": "string"
}
],
"responses": {
"204": {
"description": "No Content"
}
}
}
},
"/whitelist/{email}": {
"delete": {
"description": "Deletes a whitelisted user with specific capability",
"operationId": "5ba1468fdad0a80ce8ddebeb",
"summary": "DeleteWhitelistedUserWithCapability",
"parameters": [
{
"name": "email",
"in": "path",
"description": "The user email to delete",
"required": true,
"type": "string"
},
{
"name": "capability",
"in": "query",
"description": "Format - int32. The target capability to delete, default to Signup",
"type": "integer",
"enum": [
0,
1
]
},
{
"name": "Admin-Key",
"in": "header",
"description": "API key.",
"required": true,
"type": "string"
}
],
"responses": {
"204": {
"description": "No Content"
}
}
},
"put": {
"description": "Updates or creates a user in the whitelist with specific capability",
"operationId": "5ba1468fdad0a80ce8ddebea",
"summary": "PutWhitelistedUserWithCapability",
"parameters": [
{
"name": "email",
"in": "path",
"description": "The email to update",
"required": true,
"type": "string"
},
{
"name": "capability",
"in": "query",
"description": "Format - int32. The target capability, default to Signup",
"type": "integer",
"enum": [
0,
1
]
},
{
"name": "Admin-Key",
"in": "header",
"description": "API key.",
"required": true,
"type": "string"
}
],
"responses": {
"204": {
"description": "No Content"
}
}
}
},
"/user": {
"post": {
"operationId": "5ba1468edad0a80ce8ddebe0",
"summary": "GetApiKeyForUser",
"parameters": [
{
"name": "uid",
"in": "query",
"required": true,
"type": "string"
},
{
"name": "oid",
"in": "query",
"required": true,
"type": "string"
},
{
"name": "name",
"in": "query",
"required": true,
"type": "string"
},
{
"name": "issuer",
"in": "query",
"required": true,
"type": "string"
},
{
"name": "email",
"in": "query",
"required": true,
"type": "string"
},
{
"name": "altsecid",
"in": "query",
"type": "string"
},
{
"name": "tid",
"in": "query",
"type": "string"
},
{
"name": "createIfNotFound",
"in": "query",
"type": "boolean"
},
{
"name": "Admin-Key",
"in": "header",
"description": "API key.",
"required": true,
"type": "string"
}
],
"produces": [
"application/json",
"application/xml",
"text/xml"
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/ApiKeysModel"
},
"examples": {
"application/json": {
"TrainingKeys": {
"ApimSubscriptionId": "string",
"PrimaryKey": "string",
"SecondaryKey": "string"
},
"PredictionKeys": {
"ApimSubscriptionId": "string",
"PrimaryKey": "string",
"SecondaryKey": "string"
}
},
"application/xml": "\r\n \r\n string\r\n string\r\n string\r\n \r\n \r\n string\r\n string\r\n string\r\n \r\n",
"text/xml": "\r\n \r\n string\r\n string\r\n string\r\n \r\n \r\n string\r\n string\r\n string\r\n \r\n"
}
}
}
}
},
"/usage/prediction/user/{oid}": {
"get": {
"description": "Get usage for prediction resource for Oxford user",
"operationId": "5ba1468edad0a80ce8ddebe3",
"summary": "GetPredictionUsageForOxford",
"parameters": [
{
"name": "oid",
"in": "path",
"description": "object id.",
"required": true,
"type": "string"
},
{
"name": "Admin-Key",
"in": "header",
"description": "API key.",
"required": true,
"type": "string"
}
],
"produces": [
"application/json",
"application/xml",
"text/xml"
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/PredictionQuotaModel"
},
"examples": {
"application/json": {
"Total": 0,
"Used": 0,
"TimeUntilReset": "string"
},
"application/xml": "\r\n 0\r\n 0\r\n string\r\n",
"text/xml": "\r\n 0\r\n 0\r\n string\r\n"
}
}
}
}
},
"/usage/training/resource/{trainingApimSubscriptionId}/tier/{apiTier}": {
"get": {
"description": "Get usage for training resource for Azure user",
"operationId": "5ba1468edad0a80ce8ddebe1",
"summary": "GetTrainingUsageForAzure",
"parameters": [
{
"name": "trainingApimSubscriptionId",
"in": "path",
"required": true,
"type": "string"
},
{
"name": "apiTier",
"in": "path",
"required": true,
"type": "string"
},
{
"name": "Admin-Key",
"in": "header",
"description": "API key.",
"required": true,
"type": "string"
}
],
"produces": [
"application/json",
"application/xml",
"text/xml"
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/TrainingUsageModel"
},
"examples": {
"application/json": {
"Tier": "string",
"Projects": {
"Total": 0,
"Used": 0
},
"PerProjectQuota": [
{
"ProjectId": "string",
"Iterations": {
"Total": 0,
"Used": 0
},
"Images": {
"Total": 0,
"Used": 0
},
"Tags": {
"Total": 0,
"Used": 0
}
}
],
"DailyUsage": [
{
"Date": "string",
"StoredImages": 0,
"TrainedImages": 0,
"UploadedImages": 0,
"QuickTests": 0,
"TrainingTimeInMs": 0
}
]
},
"application/xml": "\r\n string\r\n \r\n 0\r\n 0\r\n \r\n \r\n string\r\n \r\n 0\r\n 0\r\n \r\n \r\n 0\r\n 0\r\n \r\n \r\n 0\r\n 0\r\n \r\n \r\n \r\n string\r\n 0\r\n 0\r\n 0\r\n 0\r\n 0\r\n \r\n",
"text/xml": "\r\n string\r\n \r\n 0\r\n 0\r\n \r\n \r\n string\r\n \r\n 0\r\n 0\r\n \r\n \r\n 0\r\n 0\r\n \r\n \r\n 0\r\n 0\r\n \r\n \r\n \r\n string\r\n 0\r\n 0\r\n 0\r\n 0\r\n 0\r\n \r\n"
}
}
}
}
},
"/usage/training/user/{oid}": {
"get": {
"description": "Get usage for training resource for Oxford user",
"operationId": "5ba1468edad0a80ce8ddebe2",
"summary": "GetTrainingUsageForOxford",
"parameters": [
{
"name": "oid",
"in": "path",
"required": true,
"type": "string"
},
{
"name": "Admin-Key",
"in": "header",
"description": "API key.",
"required": true,
"type": "string"
}
],
"produces": [
"application/json",
"application/xml",
"text/xml"
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/TrainingUsageModel"
},
"examples": {
"application/json": {
"Tier": "string",
"Projects": {
"Total": 0,
"Used": 0
},
"PerProjectQuota": [
{
"ProjectId": "string",
"Iterations": {
"Total": 0,
"Used": 0
},
"Images": {
"Total": 0,
"Used": 0
},
"Tags": {
"Total": 0,
"Used": 0
}
}
],
"DailyUsage": [
{
"Date": "string",
"StoredImages": 0,
"TrainedImages": 0,
"UploadedImages": 0,
"QuickTests": 0,
"TrainingTimeInMs": 0
}
]
},
"application/xml": "\r\n string\r\n \r\n 0\r\n 0\r\n \r\n \r\n string\r\n \r\n 0\r\n 0\r\n \r\n \r\n 0\r\n 0\r\n \r\n \r\n 0\r\n 0\r\n \r\n \r\n \r\n string\r\n 0\r\n 0\r\n 0\r\n 0\r\n 0\r\n \r\n",
"text/xml": "\r\n string\r\n \r\n 0\r\n 0\r\n \r\n \r\n string\r\n \r\n 0\r\n 0\r\n \r\n \r\n 0\r\n 0\r\n \r\n \r\n 0\r\n 0\r\n \r\n \r\n \r\n string\r\n 0\r\n 0\r\n 0\r\n 0\r\n 0\r\n \r\n"
}
}
}
}
},
"/users": {
"get": {
"operationId": "5ba1468fdad0a80ce8ddebe6",
"summary": "GetUsers",
"parameters": [
{
"name": "Admin-Key",
"in": "header",
"description": "API key.",
"required": true,
"type": "string"
}
],
"produces": [
"application/json",
"application/xml",
"text/xml"
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/UserModelArray"
},
"examples": {
"application/json": [
{
"Id": "string",
"Oid": "string",
"Uid": "string",
"Name": "string",
"Email": "string",
"Tier": "string",
"State": 0,
"CreatedAt": "string"
}
],
"application/xml": "\r\n string\r\n string\r\n string\r\n string\r\n string\r\n string\r\n 0\r\n string\r\n",
"text/xml": "\r\n string\r\n string\r\n string\r\n string\r\n string\r\n string\r\n 0\r\n string\r\n"
}
}
}
}
},
"/whitelist": {
"get": {
"description": "Gets a list of whitelisted users with specific capability",
"operationId": "5ba1468fdad0a80ce8ddebe9",
"summary": "GetWhitelistedUsersWithCapability",
"parameters": [
{
"name": "capability",
"in": "query",
"description": "Format - int32. capability of user",
"type": "integer",
"enum": [
0,
1
]
},
{
"name": "Admin-Key",
"in": "header",
"description": "API key.",
"required": true,
"type": "string"
}
],
"produces": [
"application/json",
"application/xml",
"text/xml"
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/WhitelistGet200TextXmlResponse"
},
"examples": {
"application/json": [
"string"
],
"application/xml": "string",
"text/xml": "string"
}
}
}
}
},
"/project/{projectId}/migrate": {
"post": {
"operationId": "5ba1468edad0a80ce8ddebe5",
"summary": "MigrateToAzure",
"parameters": [
{
"name": "projectId",
"in": "path",
"description": "Format - uuid.",
"required": true,
"type": "string"
},
{
"name": "oid",
"in": "query",
"required": true,
"type": "string"
},
{
"name": "subscriptionId",
"in": "query",
"description": "Format - uuid.",
"required": true,
"type": "string"
},
{
"name": "resourceName",
"in": "query",
"required": true,
"type": "string"
},
{
"name": "apiTier",
"in": "query",
"required": true,
"type": "string"
},
{
"name": "trainingApimSubscriptionId",
"in": "query",
"required": true,
"type": "string"
},
{
"name": "Admin-Key",
"in": "header",
"description": "API key.",
"required": true,
"type": "string"
}
],
"responses": {
"204": {
"description": "No Content"
}
}
}
},
"/user/{userId}/tier/{tier}": {
"patch": {
"operationId": "5ba1468fdad0a80ce8ddebe8",
"summary": "SetUserTier",
"parameters": [
{
"name": "userId",
"in": "path",
"description": "Format - uuid.",
"required": true,
"type": "string"
},
{
"name": "tier",
"in": "path",
"required": true,
"type": "string"
},
{
"name": "Admin-Key",
"in": "header",
"description": "API key.",
"required": true,
"type": "string"
}
],
"responses": {
"204": {
"description": "No Content"
}
}
}
},
"/user/{userId}/state/{state}": {
"patch": {
"description": "Update user state",
"operationId": "5ba1468fdad0a80ce8ddebe7",
"summary": "UpdateUserState",
"parameters": [
{
"name": "userId",
"in": "path",
"description": "Format - uuid. user id to update",
"required": true,
"type": "string"
},
{
"name": "state",
"in": "path",
"description": "Format - int32. new state",
"required": true,
"type": "integer",
"enum": [
0,
1
]
},
{
"name": "Admin-Key",
"in": "header",
"description": "API key.",
"required": true,
"type": "string"
}
],
"responses": {
"204": {
"description": "No Content"
}
}
}
},
"/quota": {
"delete": {
"operationId": "5cb6af32ca0b2d2104588212",
"summary": "DeleteQuota",
"parameters": [
{
"name": "apimSubscriptionId",
"in": "query",
"required": true,
"type": "string"
},
{
"name": "quotaName",
"in": "query",
"description": "Format - int32.",
"type": "integer",
"enum": [
0,
1
]
},
{
"name": "Admin-Key",
"in": "header",
"description": "API key.",
"required": true,
"type": "string"
}
],
"responses": {
"204": {
"description": "No Content"
}
}
},
"post": {
"operationId": "5cb6af32ca0b2d2104588211",
"summary": "SetQuota",
"parameters": [
{
"name": "apimSubscriptionId",
"in": "query",
"required": true,
"type": "string"
},
{
"name": "value",
"in": "query",
"description": "Format - int32.",
"required": true,
"type": "integer"
},
{
"name": "quotaName",
"in": "query",
"description": "Format - int32.",
"type": "integer",
"enum": [
0,
1
]
},
{
"name": "Admin-Key",
"in": "header",
"description": "API key.",
"required": true,
"type": "string"
}
],
"responses": {
"204": {
"description": "No Content"
}
}
}
},
"/{projectId}/labelproposals/setting": {
"get": {
"description": "Get pool size of Label Proposal for this project.",
"operationId": "5d5dcdd2ca0b2d1140efbefa",
"summary": "GetLabelSetting",
"parameters": [
{
"name": "projectId",
"in": "path",
"description": "Format - uuid. project Id.",
"required": true,
"type": "string"
},
{
"name": "Admin-Key",
"in": "header",
"description": "API key.",
"required": true,
"type": "string"
}
],
"produces": [
"application/json",
"application/xml",
"text/xml"
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/LabelSettingsModel"
},
"examples": {
"application/json": {
"Version": "string",
"LabelProposalPoolSize": 0
},
"application/xml": "\r\n string\r\n 0\r\n",
"text/xml": "\r\n string\r\n 0\r\n"
}
}
}
},
"post": {
"description": "Set pool size of Label Proposal.",
"operationId": "5d5dcdd2ca0b2d1140efbefb",
"summary": "SetLabelSetting",
"parameters": [
{
"name": "projectId",
"in": "path",
"description": "Format - uuid. project Id.",
"required": true,
"type": "string"
},
{
"name": "labelProposalPoolSize",
"in": "query",
"description": "Format - int32. Number of untagged images to be proposed. Default is unlimited to propose all untagged images. Unlimited is set to -1.",
"type": "integer"
},
{
"name": "Admin-Key",
"in": "header",
"description": "API key.",
"required": true,
"type": "string"
}
],
"responses": {
"204": {
"description": "No Content"
}
}
}
},
"/quota/refresh": {
"put": {
"operationId": "5cb6af32ca0b2d2104588213",
"summary": "RefreshQuota",
"parameters": [
{
"name": "Admin-Key",
"in": "header",
"description": "API key.",
"required": true,
"type": "string"
}
],
"responses": {
"204": {
"description": "No Content"
}
}
}
}
},
"definitions": {
"ApiKeysModel": {
"description": "Represents a set of account api keys.",
"type": "object",
"properties": {
"TrainingKeys": {
"$ref": "#/definitions/KeyPairModel",
"description": "Gets the keys used for training.",
"readOnly": false
},
"PredictionKeys": {
"$ref": "#/definitions/KeyPairModel",
"description": "Gets the keys used for prediction.",
"readOnly": false
}
}
},
"KeyPairModel": {
"description": "Represents a pair of api keys for a subscription.",
"type": "object",
"properties": {
"ApimSubscriptionId": {
"type": "string",
"readOnly": false,
"x-nullable": false
},
"PrimaryKey": {
"description": "Gets the primary key.",
"type": "string",
"readOnly": false,
"x-nullable": false
},
"SecondaryKey": {
"description": "Gets the secondary key.",
"type": "string",
"readOnly": false,
"x-nullable": false
}
}
},
"LabelSettingsModel": {
"description": "Represents a Label Setting.",
"type": "object",
"properties": {
"Version": {
"description": "Label Setting schema version.",
"type": "string",
"readOnly": false,
"x-nullable": false
},
"LabelProposalPoolSize": {
"format": "int32",
"description": "Number of untagged images to be proposed. Default is unlimited to propose all untagged images. Unlimited is set to -1.",
"type": "integer",
"readOnly": false,
"x-nullable": false
}
}
},
"PerProjectTrainingQuotaModel": {
"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": false,
"x-nullable": false
},
"Iterations": {
"$ref": "#/definitions/TrainingQuotaModel",
"description": "Gets the iteration quota for the project.",
"readOnly": false
},
"Images": {
"$ref": "#/definitions/TrainingQuotaModel",
"description": "Gets the image quota for the project.",
"readOnly": false
},
"Tags": {
"$ref": "#/definitions/TrainingQuotaModel",
"description": "Gets the tag quota for the project.",
"readOnly": false
}
}
},
"PredictionQuotaModel": {
"description": "Represents a quota",
"type": "object",
"properties": {
"Total": {
"format": "int32",
"description": "The total allowable amount in the quota",
"type": "integer",
"readOnly": false,
"x-nullable": false
},
"Used": {
"format": "int32",
"description": "The amount of quota that has currently been used",
"type": "integer",
"readOnly": false,
"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": false,
"x-nullable": true
}
}
},
"TrainingDailyUsageModel": {
"description": "Represents the usage for billing purpose in one day",
"type": "object",
"properties": {
"Date": {
"description": "Represent the date of the usage",
"type": "string",
"readOnly": false,
"x-nullable": false
},
"StoredImages": {
"format": "int32",
"description": "Gets the peak number of stored images in the day",
"type": "integer",
"readOnly": false,
"x-nullable": false
},
"TrainedImages": {
"format": "int32",
"description": "Gets the total number of images used in training in the day",
"type": "integer",
"readOnly": false,
"x-nullable": false
},
"UploadedImages": {
"format": "int32",
"description": "Gets the total number of images uploaded to service in the day",
"type": "integer",
"readOnly": false,
"x-nullable": false
},
"QuickTests": {
"format": "int32",
"description": "Gets the total number of quicktests in the day",
"type": "integer",
"readOnly": false,
"x-nullable": false
},
"TrainingTimeInMs": {
"format": "int32",
"description": "Gets the total training time in milliseconds in the day",
"type": "integer",
"readOnly": false,
"x-nullable": false
}
}
},
"TrainingQuotaModel": {
"description": "Represents a training quota.",
"type": "object",
"properties": {
"Total": {
"format": "int32",
"description": "The total allowable amount in the quota.",
"type": "integer",
"readOnly": false,
"x-nullable": false
},
"Used": {
"format": "int32",
"description": "The amount of quota that has currently been used.",
"type": "integer",
"readOnly": false,
"x-nullable": false
}
}
},
"TrainingUsageModel": {
"description": "Represents a set of quotas assocated with an account.",
"type": "object",
"properties": {
"Tier": {
"description": "Gets the tier of user.",
"type": "string",
"readOnly": false,
"x-nullable": false
},
"Projects": {
"$ref": "#/definitions/TrainingQuotaModel",
"description": "Gets the project quota.",
"readOnly": false
},
"PerProjectQuota": {
"description": "Gets a list of quotas that apply per-project for each project.",
"type": "array",
"items": {
"$ref": "#/definitions/PerProjectTrainingQuotaModel",
"x-nullable": false
},
"readOnly": false
},
"DailyUsage": {
"description": "Get a list of billing usage by day.",
"type": "array",
"items": {
"$ref": "#/definitions/TrainingDailyUsageModel",
"x-nullable": false
},
"readOnly": false
}
}
},
"UserModel": {
"type": "object",
"properties": {
"Id": {
"format": "uuid",
"type": "string",
"readOnly": false,
"x-nullable": false
},
"Oid": {
"type": "string",
"readOnly": false,
"x-nullable": false
},
"Uid": {
"type": "string",
"readOnly": false,
"x-nullable": false
},
"Name": {
"type": "string",
"readOnly": false,
"x-nullable": false
},
"Email": {
"type": "string",
"readOnly": false,
"x-nullable": false
},
"Tier": {
"type": "string",
"readOnly": false,
"x-nullable": false
},
"State": {
"format": "int32",
"enum": [
0,
1
],
"type": "integer",
"readOnly": false,
"x-nullable": false,
"x-ms-enum": {
"name": "UserState",
"modelAsString": true
}
},
"CreatedAt": {
"format": "date-time",
"type": "string",
"readOnly": false,
"x-nullable": false
}
}
},
"UserModelArray": {
"type": "array",
"items": {
"$ref": "#/definitions/UserModel"
}
},
"WhitelistGet200ApplicationJsonResponse": {
"type": "array",
"items": {
"type": "string"
}
},
"WhitelistGet200ApplicationXmlResponse": {
"type": "array",
"items": {
"type": "string"
}
},
"WhitelistGet200TextXmlResponse": {
"type": "array",
"items": {
"type": "string"
}
}
},
"tags": []
}