Pattern - Batch Add Patterns
Adds a batch of patterns in a version of the application.
POST {Endpoint}/luis/authoring/v3.0-preview/apps/{appId}/versions/{versionId}/patternrules
URI Parameters
Name | In | Required | Type | Description |
---|---|---|---|---|
app
|
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). |
version
|
path | True |
string |
The version ID. |
Request Header
Name | Required | Type | Description |
---|---|---|---|
Ocp-Apim-Subscription-Key | True |
string |
Request Body
Name | Type | Description |
---|---|---|
patterns |
A JSON array containing patterns. |
Responses
Name | Type | Description |
---|---|---|
201 Created |
The created patterns |
|
Other Status Codes |
Error Response. |
Security
Ocp-Apim-Subscription-Key
Type:
apiKey
In:
header
Examples
Successful Batch Add Patterns request
Sample request
POST {Endpoint}/luis/authoring/v3.0-preview/apps/2370fb9d-7dbc-4898-a361-a742cf290766/versions/0.1/patternrules
[
{
"pattern": "Who's {Name} reporting to?",
"intent": "report to"
},
{
"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 |
---|---|
Error |
Error response when invoking an operation on the API. |
Pattern |
Object model for creating a pattern |
Pattern |
Pattern rule |
ErrorResponse
Error response when invoking an operation on the API.
Name | Type | Description |
---|---|---|
errorType |
string |
PatternRuleCreateObject
Object model for creating a pattern
Name | Type | Description |
---|---|---|
intent |
string |
The intent's name which the pattern belongs to. |
pattern |
string |
The pattern text. |
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. |