Share via


Apps - Import Lu Format

Imports an application to LUIS, the application's structure is included in the request body.

POST {Endpoint}/luis/authoring/v3.0-preview/apps/import
POST {Endpoint}/luis/authoring/v3.0-preview/apps/import?format=lu&appName={appName}

URI Parameters

Name In Required Type Description
Endpoint
path True

string

Supported Cognitive Services endpoints (protocol and hostname, for example: https://westus.api.cognitive.microsoft.com).

appName
query

string

The application name to create. If not specified, the application name will be read from the imported object. If the application name already exists, an error is returned.

Request Header

Media Types: "text/plain"

Name Required Type Description
Ocp-Apim-Subscription-Key True

string

Request Body

Media Types: "text/plain"

Name Type Description
luisAppLu

string

A LUIS application structure.

Responses

Name Type Description
201 Created

string

The ID of the imported application.

Other Status Codes

ErrorResponse

Error Response.

Security

Ocp-Apim-Subscription-Key

Type: apiKey
In: header

Examples

Successful Import Application

Sample Request

POST {Endpoint}/luis/authoring/v3.0-preview/apps/import?format=lu&appName=Test LUIS App


"> LUIS application information\r\n> !# @app.name = Json 600 App\r\n> !# @app.desc = Json 600 App\r\n> !# @app.versionId = 0.1\r\n> !# @app.culture = en-us\r\n> !# @app.luis_schema_version = 6.0.0\r\n\r\n\r\n> # Intent definitions\r\n\r\n> !# @intent.inherits = name : Calendar.AcceptEventEntry; domain_name : Calendar; model_name : AcceptEventEntry\r\n\r\n## Calendar.AcceptEventEntry\r\n- save the date may 17 {@Calendar.Subject=pictures party}\r\n- schedule {@Calendar.Subject=appointment} for tomorrow please\r\n- {@Calendar.Subject=Meeting My Manager}\r\n- The meeting will last for one hour\r\n- Add an event to visit 209 Nashville Gym\r\n- Add {@Calendar.Subject=imax theater} to my upcoming events\r\n- dunmore pa sonic sounds Friday morning please\r\n- Add a new task {@Calendar.Subject=finish assignment}\r\n- Add a new event on 27 - Apr\r\n- calendar i ' ll be at the garage from 8 till 3 this saturday\r\n- Add an event to {@Calendar.Subject=read about adam lambert news}\r\n\r\n\r\n> !# @intent.inherits = name : Communication.AddContact; domain_name : Communication; model_name : AddContact\r\n\r\n## Communication.AddContact\r\n\r\n\r\n@ intent Communication.AddContact usesFeatures simpleentity1,phraselist1\r\n\r\n> !# @intent.inherits = name : Communication.AddMore; domain_name : Communication; model_name : AddMore\r\n\r\n## Communication.AddMore\r\n\r\n\r\n> !# @intent.inherits = name : Communication.Confirm; domain_name : Communication; model_name : Confirm\r\n\r\n## Communication.Confirm\r\n\r\n\r\n## intent1\r\n\r\n\r\n## None\r\n- a\r\n- hi {@simpleentity1=guys}\r\n- Please just delete {@Calendar.Subject=my meeting}\r\n- Extend {@Calendar.Subject=lunch meeting} 30 minutes extra\r\n- {@Calendar.Subject=Marketing meetings} on Tuesdays will now be every Wednesday please change on my calendar\r\n- {@Calendar.Subject=Appointment with Johnson} needs to be next week\r\n- Search for {@Calendar.Subject=meetings with Chris}\r\n- I want to reschedule the {@Calendar.Subject=meeting at the air force club}\r\n- Move the {@Calendar.Subject=BBQ party} to Friday\r\n- Am i free to {@Calendar.Subject=be with friends} saturday ?\r\n- Delete {@Calendar.Subject=Helen Fred ' s birthday}\r\n- {@Calendar.Subject=Call dad Mike}\r\n- {@Calendar.Subject=The workshop} will last for 10 hours\r\n- {@Calendar.Subject=email cloney John}\r\n- Change {@Calendar.Subject=the meeting with Chris} to 9 : 00 am\r\n\r\n\r\n> # Entity definitions\r\n\r\n> !# @entity.inherits = name : Calendar.Subject; domain_name : Calendar; model_name : Subject\r\n\r\n@ ml Calendar.Subject usesFeatures simpleentity1\r\n\r\n@ ml simpleentity1\r\n\r\n@ ml a1 hasRole role_a1\r\n    - @ datetimeV2 b1\r\n    - @ ml c1\r\n        - @ ml d1 usesFeatures phraselist1\r\n            - @ datetimeV2 e1 usesFeatures phraselist1\r\n\r\n\r\n\r\n> # PREBUILT Entity definitions\r\n\r\n@ prebuilt age\r\n\r\n@ prebuilt datetimeV2\r\n\r\n\r\n> # Phrase list definitions\r\n\r\n@ phraselist phraselist1(interchangeable) = \r\n\t- why,where,when,what,how,who\r\n\r\n\r\n> # List entities\r\n\r\n@ list closedlist = \r\n\t- a :\r\n\t\t- b\r\n\t\t- c\r\n\t\t- d\r\n\r\n\r\n> # RegEx entities\r\n\r\n\r\n> # Composite entities\r\n\r\n@ composite compositeentity1 usesFeatures simpleentity1,Calendar.Subject = [simpleentity1, datetimeV2]\r\n"

Sample Response

Location: https://westus.api.cognitive.microsoft.com/luis/api/v2.0/apps/374fac89-ae12-4afd-8c21-8a6424ce1c1f
"374fac89-ae12-4afd-8c21-8a6424ce1c1f"

Definitions

ErrorResponse

Error response when invoking an operation on the API.

Name Type Description
errorType

string