Model - Add Closed List

Adds a list entity model to a version of the application.

POST {Endpoint}/luis/api/v2.0/apps/{appId}/versions/{versionId}/closedlists

URI Parameters

Name In Required Type Description
appId
path True

string

uuid

The application ID.

Endpoint
path True

string

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

versionId
path True

string

The version ID.

Request Header

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

string

Request Body

Name Type Description
name

string

Name of the list entity.

subLists

WordListObject[]

Sublists for the feature.

Responses

Name Type Description
201 Created

string

The ID of the created model.

Other Status Codes

ErrorResponse

Error Response.

Security

Ocp-Apim-Subscription-Key

Type: apiKey
In: header

Examples

Successful Create Closed List Entity Model request

Sample request

POST {Endpoint}/luis/api/v2.0/apps/86226c53-b7a6-416f-876b-226b2b5ab07b/versions/0.1/closedlists


{
  "name": "States",
  "subLists": [
    {
      "canonicalForm": "New York",
      "list": [
        "NY",
        "New York"
      ]
    },
    {
      "canonicalForm": "Washington",
      "list": [
        "Washington",
        "WA"
      ]
    },
    {
      "canonicalForm": "California",
      "list": [
        "California",
        "CA",
        "Calif.",
        "Cal."
      ]
    }
  ]
}

Sample response

"8713b104-78ec-4c4f-9f96-f2e53562cc16"

Definitions

Name Description
ClosedListModelCreateObject

Object model for creating a list entity.

ErrorResponse

Error response when invoking an operation on the API.

WordListObject

Sublist of items for a list entity.

ClosedListModelCreateObject

Object model for creating a list entity.

Name Type Description
name

string

Name of the list entity.

subLists

WordListObject[]

Sublists for the feature.

ErrorResponse

Error response when invoking an operation on the API.

Name Type Description
errorType

string

WordListObject

Sublist of items for a list entity.

Name Type Description
canonicalForm

string

The standard form that the list represents.

list

string[]

List of synonym words.