{
"swagger": "2.0",
"info": {
"title": "Custom_Vision_Admin_1.0",
"version": "1.0"
},
"host": "virginia.api.cognitive.microsoft.us",
"basePath": "/customvision/v1.0/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://virginia.api.cognitive.microsoft.us"
},
{
"url": "https://cognitivevirginiaprod.cognitiveservices.azure.us"
},
{
"url": "https://usgovvirginia.api.cognitive.microsoft.us"
},
{
"url": "https://cognitivevirginiaprod.openai.azure.us"
}
],
"paths": {
"/user/{oid}": {
"delete": {
"operationId": "5ab9bd6940d86a1be8ee9659",
"summary": "DeleteUser",
"parameters": [
{
"name": "oid",
"in": "path",
"required": true,
"type": "string"
},
{
"name": "Admin-Key",
"in": "header",
"required": true,
"type": "string"
}
],
"responses": {
"204": {
"description": "No Content"
}
}
}
},
"/whitelist/{email}": {
"delete": {
"description": "Deletes a whitelisted user",
"operationId": "58acd3b5ef062f0344a427d0",
"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",
"required": true,
"type": "string"
}
],
"responses": {
"204": {
"description": "No Content"
}
}
},
"put": {
"description": "Updates or creates a user in the whitelist",
"operationId": "58acd3b5ef062f0344a427cf",
"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",
"required": true,
"type": "string"
}
],
"responses": {
"204": {
"description": "No Content"
}
}
}
},
"/user": {
"post": {
"operationId": "59079bcfc8cb2316bc6e874c",
"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",
"required": true,
"type": "string"
}
],
"produces": [
"application/json",
"text/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"
}
},
"text/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": "5a81de7440d86a0d8ccdb227",
"summary": "GetPredictionUsageForOxford",
"parameters": [
{
"name": "oid",
"in": "path",
"description": "object id",
"required": true,
"type": "string"
},
{
"name": "Admin-Key",
"in": "header",
"required": true,
"type": "string"
}
],
"produces": [
"application/json",
"text/json",
"application/xml",
"text/xml"
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/PredictionQuotaModel"
},
"examples": {
"application/json": {
"Total": 0,
"Used": 0,
"TimeUntilReset": "string"
},
"text/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": "5a7e1c8b40d86a0d8ccdb036",
"summary": "GetTrainingUsageForAzure",
"parameters": [
{
"name": "trainingApimSubscriptionId",
"in": "path",
"required": true,
"type": "string"
},
{
"name": "apiTier",
"in": "path",
"required": true,
"type": "string"
},
{
"name": "Admin-Key",
"in": "header",
"required": true,
"type": "string"
}
],
"produces": [
"application/json",
"text/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
}
]
},
"text/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
}
]
},
"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 \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 \r\n"
}
}
}
}
},
"/usage/training/user/{oid}": {
"get": {
"description": "Get usage for training resource for Oxford user",
"operationId": "5a7e1c8b40d86a0d8ccdb037",
"summary": "GetTrainingUsageForOxford",
"parameters": [
{
"name": "oid",
"in": "path",
"required": true,
"type": "string"
},
{
"name": "Admin-Key",
"in": "header",
"required": true,
"type": "string"
}
],
"produces": [
"application/json",
"text/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
}
]
},
"text/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
}
]
},
"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 \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 \r\n"
}
}
}
}
},
"/user/{userId}": {
"get": {
"operationId": "58ffb34ec8cb2315f48692ea",
"summary": "GetUser",
"parameters": [
{
"name": "userId",
"in": "path",
"description": "Format - uuid.",
"required": true,
"type": "string"
},
{
"name": "Admin-Key",
"in": "header",
"required": true,
"type": "string"
}
],
"produces": [
"application/json",
"text/json",
"application/xml",
"text/xml"
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/UserModel"
},
"examples": {
"application/json": {
"Id": "string",
"Oid": "string",
"Uid": "string",
"Name": "string",
"Email": "string",
"Tier": "string",
"State": 0,
"CreatedAt": "string"
},
"text/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"
}
}
}
}
},
"/users": {
"get": {
"operationId": "58f936c0c8cb23079006312c",
"summary": "GetUsers",
"parameters": [
{
"name": "Admin-Key",
"in": "header",
"required": true,
"type": "string"
}
],
"produces": [
"application/json",
"text/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"
}
],
"text/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",
"operationId": "58acd3b5ef062f0344a427ce",
"summary": "GetWhitelistedUsersWithCapability",
"parameters": [
{
"name": "capability",
"in": "query",
"description": "Format - int32. capability of user",
"type": "integer",
"enum": [
0,
1
]
},
{
"name": "Admin-Key",
"in": "header",
"required": true,
"type": "string"
}
],
"produces": [
"application/json",
"text/json",
"application/xml",
"text/xml"
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/WhitelistUsersGet200TextXmlResponse"
},
"examples": {
"application/json": [
"string"
],
"text/json": [
"string"
],
"application/xml": "string",
"text/xml": "string"
}
}
}
}
},
"/user/{oid}/migrate/{azureSubscriptionId}/{resourceGroupName}": {
"post": {
"description": "Migrate user's projects to an Azure resource",
"operationId": "5a820b1b40d86a0d8ccdb28b",
"summary": "MigrateProjectsToAzure",
"parameters": [
{
"name": "oid",
"in": "path",
"description": "user oid to migrate",
"required": true,
"type": "string"
},
{
"name": "azureSubscriptionId",
"in": "path",
"description": "The azure subscription id",
"required": true,
"type": "string"
},
{
"name": "resourceGroupName",
"in": "path",
"description": "The resource group name",
"required": true,
"type": "string"
},
{
"name": "Admin-Key",
"in": "header",
"required": true,
"type": "string"
}
],
"responses": {
"204": {
"description": "No Content"
}
}
}
},
"/user/{userId}/tier/{tier}": {
"patch": {
"operationId": "5900ea74c8cb2315f486937d",
"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",
"required": true,
"type": "string"
}
],
"responses": {
"204": {
"description": "No Content"
}
}
}
},
"/user/{userId}/state/{state}": {
"patch": {
"description": "Update user state",
"operationId": "5900ea74c8cb2315f486937e",
"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",
"required": true,
"type": "string"
}
],
"responses": {
"204": {
"description": "No Content"
}
}
}
}
},
"definitions": {
"ApiKeysModel": {
"type": "object",
"properties": {
"TrainingKeys": {
"$ref": "#/definitions/KeyPairModel"
},
"PredictionKeys": {
"$ref": "#/definitions/KeyPairModel"
}
},
"x-nullable": true
},
"KeyPairModel": {
"type": "object",
"properties": {
"ApimSubscriptionId": {
"type": "string",
"x-nullable": true
},
"PrimaryKey": {
"type": "string",
"x-nullable": true
},
"SecondaryKey": {
"type": "string",
"x-nullable": true
}
},
"x-nullable": true
},
"TrainingUsageModel": {
"type": "object",
"properties": {
"Tier": {
"type": "string",
"x-nullable": true
},
"Projects": {
"$ref": "#/definitions/TrainingQuotaModel"
},
"PerProjectQuota": {
"type": "array",
"items": {
"$ref": "#/definitions/PerProjectTrainingQuotaModel"
},
"x-nullable": true
},
"DailyUsage": {
"type": "array",
"items": {
"$ref": "#/definitions/TrainingDailyUsageModel"
},
"x-nullable": true
}
},
"x-nullable": true
},
"TrainingQuotaModel": {
"type": "object",
"properties": {
"Total": {
"format": "int32",
"type": "integer",
"x-nullable": false
},
"Used": {
"format": "int32",
"type": "integer",
"x-nullable": false
}
},
"x-nullable": true
},
"PerProjectTrainingQuotaModel": {
"type": "object",
"properties": {
"ProjectId": {
"format": "uuid",
"type": "string",
"x-nullable": false
},
"Iterations": {
"$ref": "#/definitions/TrainingQuotaModel"
},
"Images": {
"$ref": "#/definitions/TrainingQuotaModel"
},
"Tags": {
"$ref": "#/definitions/TrainingQuotaModel"
}
},
"x-nullable": true
},
"TrainingDailyUsageModel": {
"type": "object",
"properties": {
"Date": {
"type": "string",
"x-nullable": true
},
"StoredImages": {
"format": "int32",
"type": "integer",
"x-nullable": false
},
"TrainedImages": {
"format": "int32",
"type": "integer",
"x-nullable": false
},
"UploadedImages": {
"format": "int32",
"type": "integer",
"x-nullable": false
},
"QuickTests": {
"format": "int32",
"type": "integer",
"x-nullable": false
}
},
"x-nullable": true
},
"PredictionQuotaModel": {
"type": "object",
"properties": {
"Total": {
"format": "int32",
"type": "integer",
"x-nullable": false
},
"Used": {
"format": "int32",
"type": "integer",
"x-nullable": false
},
"TimeUntilReset": {
"format": "duration",
"type": "string",
"x-nullable": true
}
},
"x-nullable": true
},
"UserModel": {
"type": "object",
"properties": {
"Id": {
"format": "uuid",
"type": "string",
"x-nullable": false
},
"Oid": {
"type": "string",
"x-nullable": true
},
"Uid": {
"type": "string",
"x-nullable": true
},
"Name": {
"type": "string",
"x-nullable": true
},
"Email": {
"type": "string",
"x-nullable": true
},
"Tier": {
"type": "string",
"x-nullable": true
},
"State": {
"format": "int32",
"enum": [
0,
1
],
"type": "integer",
"x-nullable": false,
"x-ms-enum": {
"name": "UserState",
"modelAsString": true
}
},
"CreatedAt": {
"format": "date-time",
"type": "string",
"x-nullable": false
}
},
"x-nullable": true
},
"UserModelArray": {
"type": "array",
"items": {
"$ref": "#/definitions/UserModel"
},
"x-nullable": true
},
"WhitelistUsersGet200ApplicationJsonResponse": {
"type": "array",
"items": {
"type": "string",
"x-nullable": true
},
"x-nullable": true
},
"WhitelistUsersGet200TextJsonResponse": {
"type": "array",
"items": {
"type": "string",
"x-nullable": true
},
"x-nullable": true
},
"WhitelistUsersGet200ApplicationXmlResponse": {
"type": "array",
"items": {
"type": "string",
"x-nullable": true
},
"x-nullable": true
},
"WhitelistUsersGet200TextXmlResponse": {
"type": "array",
"items": {
"type": "string",
"x-nullable": true
},
"x-nullable": true
}
},
"tags": []
}