Pattern - Update Pattern

Updates a pattern in a version of the application.

PUT {Endpoint}/luis/api/v2.0/apps/{appId}/versions/{versionId}/patternrules/{patternId}

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).

patternId
path True

string

uuid

The pattern ID.

versionId
path True

string

The version ID.

Request Header

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

string

Request Body

Name Type Description
id

string

The pattern ID.

intent

string

The intent's name which the pattern belongs to.

pattern

string

The pattern text.

Responses

Name Type Description
200 OK

PatternRuleInfo

The updated pattern

Other Status Codes

ErrorResponse

Error Response.

Security

Ocp-Apim-Subscription-Key

Type: apiKey
In: header

Examples

Successful Update Pattern request

Sample Request

PUT {Endpoint}/luis/api/v2.0/apps/86226c53-b7a6-416f-876b-226b2b5ab07b/versions/0.1/patternrules/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"
}

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.