你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn

Pattern - Update Patterns

Updates patterns in a version of the application.

PUT {Endpoint}/luis/authoring/v3.0-preview/apps/{appId}/versions/{versionId}/patternrules

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
patterns

PatternRuleUpdateObject[]

An array represents the patterns.

Responses

Name Type Description
200 OK

PatternRuleInfo[]

The updated patterns

Other Status Codes

ErrorResponse

Error Response.

Security

Ocp-Apim-Subscription-Key

Type: apiKey
In: header

Examples

Successful Batch Update Patterns request

Sample request

PUT {Endpoint}/luis/authoring/v3.0-preview/apps/86226c53-b7a6-416f-876b-226b2b5ab07b/versions/0.1/patternrules


[
  {
    "id": "cc8fa554-cc6c-4bcc-97eb-c8e5bc2091b3",
    "pattern": "Who's {Name} reporting to?",
    "intent": "report to"
  },
  {
    "id": "cc8fa554-cc6c-4bcc-97eb-c8e5bc2091b3",
    "pattern": "Who's {Name} reporting to?",
    "intent": "report to"
  }
]

Sample response

[
  {
    "id": "cc8fa554-cc6c-4bcc-97eb-c8e5bc2091b3",
    "pattern": "who's {Name} reporting to?",
    "intent": "report to"
  },
  {
    "id": "cc8fa554-cc6c-4bcc-97eb-c8e5bc2091b3",
    "pattern": "who's {Name} reporting to?",
    "intent": "report to"
  }
]

Definitions

Name Description
ErrorResponse

Error response when invoking an operation on the API.

PatternRuleInfo

Pattern rule

PatternRuleUpdateObject

Object model for updating a pattern.

ErrorResponse

Error response when invoking an operation on the API.

Name Type Description
errorType

string

PatternRuleInfo

Pattern rule

Name Type Description
id

string

The pattern ID.

intent

string

The intent's name where the pattern belongs to.

pattern

string

The pattern text.

PatternRuleUpdateObject

Object model for updating a pattern.

Name Type Description
id

string

The pattern ID.

intent

string

The intent's name which the pattern belongs to.

pattern

string

The pattern text.