UNPKG

openapi-directory

Version:

Building & bundling https://github.com/APIs-guru/openapi-directory for easy use from JS

1 lines 13 kB
{"openapi":"3.0.0","info":{"contact":{"x-twitter":"microsoft"},"title":"Custom Vision Prediction Client","version":"2.0","x-apisguru-categories":["cloud"],"x-logo":{"url":"https://twitter.com/microsoft/profile_image?size=original"},"x-origin":[{"format":"swagger","url":"https://raw.githubusercontent.com/Azure/azure-rest-api-specs/master/specification/cognitiveservices/data-plane/CustomVision/Prediction/stable/v2.0/Prediction.json","version":"2.0"}],"x-preferred":true,"x-providerName":"microsoft.com","x-serviceName":"cognitiveservices-Prediction","x-tags":["Microsoft"]},"paths":{"/{projectId}/image":{"post":{"operationId":"PredictImage","parameters":[{"description":"The project id","in":"path","name":"projectId","required":true,"x-nullable":false,"schema":{"type":"string","format":"uuid"},"examples":{"Successful PredictImage request":{"value":"64b822c5-8082-4b36-a426-27225f4aa18c"}}},{"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","in":"query","name":"iterationId","required":false,"x-nullable":true,"schema":{"type":"string","format":"uuid"},"examples":{"Successful PredictImage request":{"value":"fe1e83c4-6f50-4899-9544-6bb08cf0e15a"}}},{"description":"Optional. Specifies the name of application using the endpoint","in":"query","name":"application","required":false,"x-nullable":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/ApiKey"}],"requestBody":{"$ref":"#/components/requestBodies/PredictImage"},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ImagePrediction"},"examples":{"Successful PredictImage request":{"$ref":"#/components/examples/Successful_PredictImage_request"}}},"text/json":{"schema":{"$ref":"#/components/schemas/ImagePrediction"},"examples":{"Successful PredictImage request":{"$ref":"#/components/examples/Successful_PredictImage_request"}}},"application/xml":{"schema":{"$ref":"#/components/schemas/ImagePrediction"},"examples":{"Successful PredictImage request":{"$ref":"#/components/examples/Successful_PredictImage_request"}}},"text/xml":{"schema":{"$ref":"#/components/schemas/ImagePrediction"},"examples":{"Successful PredictImage request":{"$ref":"#/components/examples/Successful_PredictImage_request"}}}}}},"summary":"Predict an image and saves the result","tags":["ImagePredictionApi"]}},"/{projectId}/image/nostore":{"post":{"operationId":"PredictImageWithNoStore","parameters":[{"description":"The project id","in":"path","name":"projectId","required":true,"x-nullable":false,"schema":{"type":"string","format":"uuid"},"examples":{"Successful PredictImageWithNoStore request":{"value":"64b822c5-8082-4b36-a426-27225f4aa18c"}}},{"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","in":"query","name":"iterationId","required":false,"x-nullable":true,"schema":{"type":"string","format":"uuid"},"examples":{"Successful PredictImageWithNoStore request":{"value":"fe1e83c4-6f50-4899-9544-6bb08cf0e15a"}}},{"description":"Optional. Specifies the name of application using the endpoint","in":"query","name":"application","required":false,"x-nullable":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/ApiKey"}],"requestBody":{"$ref":"#/components/requestBodies/PredictImage"},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ImagePrediction"},"examples":{"Successful PredictImageWithNoStore request":{"$ref":"#/components/examples/Successful_PredictImageWithNoStore_request"}}},"text/json":{"schema":{"$ref":"#/components/schemas/ImagePrediction"},"examples":{"Successful PredictImageWithNoStore request":{"$ref":"#/components/examples/Successful_PredictImageWithNoStore_request"}}},"application/xml":{"schema":{"$ref":"#/components/schemas/ImagePrediction"},"examples":{"Successful PredictImageWithNoStore request":{"$ref":"#/components/examples/Successful_PredictImageWithNoStore_request"}}},"text/xml":{"schema":{"$ref":"#/components/schemas/ImagePrediction"},"examples":{"Successful PredictImageWithNoStore request":{"$ref":"#/components/examples/Successful_PredictImageWithNoStore_request"}}}}}},"summary":"Predict an image without saving the result","tags":["ImagePredictionApi"]}},"/{projectId}/url":{"post":{"operationId":"PredictImageUrl","parameters":[{"description":"The project id","in":"path","name":"projectId","required":true,"x-nullable":false,"schema":{"type":"string","format":"uuid"},"examples":{"Successful PredictImageUrl request":{"value":"64b822c5-8082-4b36-a426-27225f4aa18c"}}},{"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","in":"query","name":"iterationId","required":false,"x-nullable":true,"schema":{"type":"string","format":"uuid"},"examples":{"Successful PredictImageUrl request":{"value":"fe1e83c4-6f50-4899-9544-6bb08cf0e15a"}}},{"description":"Optional. Specifies the name of application using the endpoint","in":"query","name":"application","required":false,"x-nullable":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/ApiKey"}],"requestBody":{"$ref":"#/components/requestBodies/ImageUrl"},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ImagePrediction"},"examples":{"Successful PredictImageUrl request":{"$ref":"#/components/examples/Successful_PredictImageUrl_request"}}},"text/json":{"schema":{"$ref":"#/components/schemas/ImagePrediction"},"examples":{"Successful PredictImageUrl request":{"$ref":"#/components/examples/Successful_PredictImageUrl_request"}}},"application/xml":{"schema":{"$ref":"#/components/schemas/ImagePrediction"},"examples":{"Successful PredictImageUrl request":{"$ref":"#/components/examples/Successful_PredictImageUrl_request"}}},"text/xml":{"schema":{"$ref":"#/components/schemas/ImagePrediction"},"examples":{"Successful PredictImageUrl request":{"$ref":"#/components/examples/Successful_PredictImageUrl_request"}}}}}},"summary":"Predict an image url and saves the result","tags":["ImagePredictionApi"]}},"/{projectId}/url/nostore":{"post":{"operationId":"PredictImageUrlWithNoStore","parameters":[{"description":"The project id","in":"path","name":"projectId","required":true,"x-nullable":false,"schema":{"type":"string","format":"uuid"},"examples":{"Successful PredictImageUrlWithNoStore request":{"value":"64b822c5-8082-4b36-a426-27225f4aa18c"}}},{"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","in":"query","name":"iterationId","required":false,"x-nullable":true,"schema":{"type":"string","format":"uuid"},"examples":{"Successful PredictImageUrlWithNoStore request":{"value":"fe1e83c4-6f50-4899-9544-6bb08cf0e15a"}}},{"description":"Optional. Specifies the name of application using the endpoint","in":"query","name":"application","required":false,"x-nullable":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/ApiKey"}],"requestBody":{"$ref":"#/components/requestBodies/ImageUrl"},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ImagePrediction"},"examples":{"Successful PredictImageUrlWithNoStore request":{"$ref":"#/components/examples/Successful_PredictImageUrlWithNoStore_request"}}},"text/json":{"schema":{"$ref":"#/components/schemas/ImagePrediction"},"examples":{"Successful PredictImageUrlWithNoStore request":{"$ref":"#/components/examples/Successful_PredictImageUrlWithNoStore_request"}}},"application/xml":{"schema":{"$ref":"#/components/schemas/ImagePrediction"},"examples":{"Successful PredictImageUrlWithNoStore request":{"$ref":"#/components/examples/Successful_PredictImageUrlWithNoStore_request"}}},"text/xml":{"schema":{"$ref":"#/components/schemas/ImagePrediction"},"examples":{"Successful PredictImageUrlWithNoStore request":{"$ref":"#/components/examples/Successful_PredictImageUrlWithNoStore_request"}}}}}},"summary":"Predict an image url without saving the result","tags":["ImagePredictionApi"]}}},"servers":[{"url":"https://southcentralus.api.cognitive.microsoft.com/customvision/v2.0/Prediction"},{"url":"{Endpoint}","variables":{"Endpoint":{"description":"Supported Cognitive Services endpoints","x-ms-parameter-location":"client","x-ms-skip-url-encoding":true,"default":""}}}],"components":{"examples":{"Successful_PredictImage_request":{"value":{"created":"2017-12-19T14:21:41.6789561Z","id":"951098b2-9b69-427b-bddb-d5cb618874e3","iteration":"fe1e83c4-6f50-4899-9544-6bb08cf0e15a","predictions":[{"probability":0.05149666,"tagId":"e31ff107-5505-4753-be42-b369b21b026c","tagName":"Hemlock"},{"probability":0.000193528482,"tagId":"349d72ac-0948-4d51-b1e4-c14a1f9b848a","tagName":"Japanese Cherry"}],"project":"64b822c5-8082-4b36-a426-27225f4aa18c"}},"Successful_PredictImageWithNoStore_request":{"value":{"created":"2017-12-19T14:21:41.6789561Z","id":"951098b2-9b69-427b-bddb-d5cb618874e3","iteration":"fe1e83c4-6f50-4899-9544-6bb08cf0e15a","predictions":[{"probability":0.05149666,"tagId":"e31ff107-5505-4753-be42-b369b21b026c","tagName":"Hemlock"},{"probability":0.000193528482,"tagId":"349d72ac-0948-4d51-b1e4-c14a1f9b848a","tagName":"Japanese Cherry"}],"project":"64b822c5-8082-4b36-a426-27225f4aa18c"}},"Successful_PredictImageUrl_request":{"value":{"created":"2017-12-19T14:21:41.6789561Z","id":"951098b2-9b69-427b-bddb-d5cb618874e3","iteration":"fe1e83c4-6f50-4899-9544-6bb08cf0e15a","predictions":[{"probability":0.05149666,"tagId":"e31ff107-5505-4753-be42-b369b21b026c","tagName":"Hemlock"},{"probability":0.000193528482,"tagId":"349d72ac-0948-4d51-b1e4-c14a1f9b848a","tagName":"Japanese Cherry"}],"project":"64b822c5-8082-4b36-a426-27225f4aa18c"}},"Successful_PredictImageUrlWithNoStore_request":{"value":{"created":"2017-12-19T14:21:41.6789561Z","id":"951098b2-9b69-427b-bddb-d5cb618874e3","iteration":"fe1e83c4-6f50-4899-9544-6bb08cf0e15a","predictions":[{"probability":0.05149666,"tagId":"e31ff107-5505-4753-be42-b369b21b026c","tagName":"Hemlock"},{"probability":0.000193528482,"tagId":"349d72ac-0948-4d51-b1e4-c14a1f9b848a","tagName":"Japanese Cherry"}],"project":"64b822c5-8082-4b36-a426-27225f4aa18c"}}},"parameters":{"ApiKey":{"in":"header","name":"Prediction-Key","required":true,"x-ms-client-name":"ApiKey","x-ms-parameter-location":"client","schema":{"type":"string"},"examples":{"Successful PredictImage request":{"value":"{API Key}"},"Successful PredictImageWithNoStore request":{"value":"{API Key}"},"Successful PredictImageUrl request":{"value":"{API Key}"},"Successful PredictImageUrlWithNoStore request":{"value":"{API Key}"}}},"Endpoint":{"description":"Supported Cognitive Services endpoints","in":"path","name":"Endpoint","required":true,"x-ms-parameter-location":"client","x-ms-skip-url-encoding":true,"schema":{"type":"string"}}},"requestBodies":{"ImageUrl":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ImageUrl"}},"text/json":{"schema":{"$ref":"#/components/schemas/ImageUrl"}},"application/xml":{"schema":{"$ref":"#/components/schemas/ImageUrl"}},"text/xml":{"schema":{"$ref":"#/components/schemas/ImageUrl"}},"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/ImageUrl"}}},"description":"An {Iris.Web.Api.Models.ImageUrl} that contains the url of the image to be evaluated","required":true},"PredictImage":{"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"imageData":{"type":"string","format":"binary"}},"required":["imageData"]}}}}},"schemas":{"BoundingBox":{"properties":{"height":{"format":"float","type":"number","nullable":false},"left":{"format":"float","type":"number","nullable":false},"top":{"format":"float","type":"number","nullable":false},"width":{"format":"float","type":"number","nullable":false}},"type":"object","nullable":true},"ImagePrediction":{"properties":{"created":{"format":"date-time","readOnly":true,"type":"string","nullable":false},"id":{"format":"uuid","readOnly":true,"type":"string","nullable":false},"iteration":{"format":"uuid","readOnly":true,"type":"string","nullable":false},"predictions":{"items":{"$ref":"#/components/schemas/Prediction"},"readOnly":true,"type":"array","nullable":true},"project":{"format":"uuid","readOnly":true,"type":"string","nullable":false}},"type":"object","nullable":true},"ImageUrl":{"properties":{"url":{"type":"string","nullable":true}},"type":"object","nullable":true},"Prediction":{"properties":{"boundingBox":{"$ref":"#/components/schemas/BoundingBox"},"probability":{"format":"float","readOnly":true,"type":"number","nullable":false},"tagId":{"format":"uuid","readOnly":true,"type":"string","nullable":false},"tagName":{"readOnly":true,"type":"string","nullable":true}},"type":"object","nullable":true}}}}