From 62749e25ccaaadba33847f75b03d8a1f20deadde Mon Sep 17 00:00:00 2001 From: Amir George Date: Sun, 2 Dec 2018 13:07:00 +0200 Subject: [PATCH] Add packaging APIs --- .../Authoring/stable/v2.0/LUIS-Authoring.json | 112 +++++++++++++++++- ...GetPublishedApplicationPackageRequest.json | 14 +++ ...ulGetTrainedApplicationPackageRequest.json | 14 +++ 3 files changed, 139 insertions(+), 1 deletion(-) create mode 100644 specification/cognitiveservices/data-plane/LUIS/Authoring/stable/v2.0/examples/package/SuccessfulGetPublishedApplicationPackageRequest.json create mode 100644 specification/cognitiveservices/data-plane/LUIS/Authoring/stable/v2.0/examples/package/SuccessfulGetTrainedApplicationPackageRequest.json diff --git a/specification/cognitiveservices/data-plane/LUIS/Authoring/stable/v2.0/LUIS-Authoring.json b/specification/cognitiveservices/data-plane/LUIS/Authoring/stable/v2.0/LUIS-Authoring.json index 05bb003fbd7a..b0f22041e318 100644 --- a/specification/cognitiveservices/data-plane/LUIS/Authoring/stable/v2.0/LUIS-Authoring.json +++ b/specification/cognitiveservices/data-plane/LUIS/Authoring/stable/v2.0/LUIS-Authoring.json @@ -7574,7 +7574,7 @@ "post": { "description": "Assigns an azure account to the application.", "operationId": "5be32228e8473de116325515", - "summary": "apps - Assign a LUIS azure accounts to an application", + "summary": "apps - Assign a LUIS azure account to an application", "parameters": [ { "$ref": "#/parameters/AppIdInPath" @@ -7768,6 +7768,98 @@ } } } + }, + "/package/{appId}/slot/{slotName}/gzip": { + "get": { + "description": "Packages published LUIS application as GZip.", + "operationId": "apps-packagepublishedapplicationasgzip", + "summary": "package - Gets published LUIS application package in binary stream GZip format", + "parameters": [ + { + "$ref": "#/parameters/AppIdInPath" + }, + { + "$ref": "#/parameters/SlotNameInPath" + } + ], + "responses": { + "200": { + "description": "The GZip binary stream of the published application package.", + "schema": { + "$ref": "#/definitions/PackageBinaryStreamObject" + } + }, + "429": { + "$ref": "#/responses/429" + }, + "400": { + "description": "This error can be returned if the request's parameters are incorrect meaning the required parameters are missing, malformed, or too large.\r\n\r\nThis error can be returned if the request's body is incorrect meaning the JSON is missing, malformed, or too large. ", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + }, + "401": { + "$ref": "#/responses/401" + }, + "403": { + "$ref": "#/responses/403" + } + }, + "produces": [ + "application/octet-stream" + ], + "x-ms-examples": { + "Successful Get published application package request": { + "$ref": "./examples/package/SuccessfulGetTrainedApplicationPackageRequest.json" + } + } + } + }, + "/package/{appId}/versions/{versionId}/gzip": { + "get": { + "description": "Packages trained LUIS application as GZip.", + "operationId": "apps-packagetrainedapplicationasgzip", + "summary": "package - Gets trained LUIS application package in binary stream GZip format", + "parameters": [ + { + "$ref": "#/parameters/AppIdInPath" + }, + { + "$ref": "#/parameters/VersionIdInPath" + } + ], + "responses": { + "200": { + "description": "The GZip binary stream of the trained application package.", + "schema": { + "$ref": "#/definitions/PackageBinaryStreamObject" + } + }, + "429": { + "$ref": "#/responses/429" + }, + "400": { + "description": "This error can be returned if the request's parameters are incorrect meaning the required parameters are missing, malformed, or too large.\r\n\r\nThis error can be returned if the request's body is incorrect meaning the JSON is missing, malformed, or too large. ", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + }, + "401": { + "$ref": "#/responses/401" + }, + "403": { + "$ref": "#/responses/403" + } + }, + "produces": [ + "application/octet-stream" + ], + "x-ms-examples": { + "Successful Get published application package request": { + "$ref": "./examples/package/SuccessfulGetPublishedApplicationPackageRequest.json" + } + } + } } }, "responses": { @@ -10087,6 +10179,15 @@ "type": "string" } } + }, + "PackageBinaryStreamObject": { + "description": "The binary stream of the application package.", + "type": "array", + "items": { + "type": "byte" + }, + "required": [], + "properties": { } } }, "parameters": { @@ -10134,6 +10235,15 @@ "format": "uuid", "x-ms-parameter-location": "method" }, + "SlotNameInPath": { + "name": "slotName", + "in": "path", + "description": "The publishing slot name.", + "required": true, + "type": "string", + "format": "uuid", + "x-ms-parameter-location": "method" + }, "SkipInPath": { "name": "skip", "in": "query", diff --git a/specification/cognitiveservices/data-plane/LUIS/Authoring/stable/v2.0/examples/package/SuccessfulGetPublishedApplicationPackageRequest.json b/specification/cognitiveservices/data-plane/LUIS/Authoring/stable/v2.0/examples/package/SuccessfulGetPublishedApplicationPackageRequest.json new file mode 100644 index 000000000000..d4b7ddf12933 --- /dev/null +++ b/specification/cognitiveservices/data-plane/LUIS/Authoring/stable/v2.0/examples/package/SuccessfulGetPublishedApplicationPackageRequest.json @@ -0,0 +1,14 @@ +{ + "parameters": { + "Endpoint": "{Endpoint}", + "Ocp-Apim-Subscription-Key": "00000000000000000000000000000000", + "appId": "363187f1-c573-46b3-bc4c-ae01d686e68e", + "slotName": "PRODUCTION" + }, + "responses": { + "200": { + "headers": {}, + "body": [] + } + } +} \ No newline at end of file diff --git a/specification/cognitiveservices/data-plane/LUIS/Authoring/stable/v2.0/examples/package/SuccessfulGetTrainedApplicationPackageRequest.json b/specification/cognitiveservices/data-plane/LUIS/Authoring/stable/v2.0/examples/package/SuccessfulGetTrainedApplicationPackageRequest.json new file mode 100644 index 000000000000..a611a23cad6a --- /dev/null +++ b/specification/cognitiveservices/data-plane/LUIS/Authoring/stable/v2.0/examples/package/SuccessfulGetTrainedApplicationPackageRequest.json @@ -0,0 +1,14 @@ +{ + "parameters": { + "Endpoint": "{Endpoint}", + "Ocp-Apim-Subscription-Key": "00000000000000000000000000000000", + "appId": "363187f1-c573-46b3-bc4c-ae01d686e68e", + "versionId": "0.1" + }, + "responses": { + "200": { + "headers": {}, + "body": [] + } + } +} \ No newline at end of file