Partager via


Model - Create Regex Entity Role

Create a role for an regular expression entity in a version of the application.

POST {Endpoint}/luis/api/v2.0/apps/{appId}/versions/{versionId}/regexentities/{entityId}/roles

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

entityId
path True

string

uuid

The entity model 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
name

string

The entity role name.

Responses

Name Type Description
201 Created

string

The ID of the created entity role

Other Status Codes

ErrorResponse

Error Response.

Security

Ocp-Apim-Subscription-Key

Type: apiKey
In: header

Examples

Successful Create Regex Entity Role request

Sample request

POST {Endpoint}/luis/api/v2.0/apps/86226c53-b7a6-416f-876b-226b2b5ab07b/versions/0.1/regexentities/fc821c4e-a2f8-4074-9410-7271b38a692d/roles


{
  "name": "sample role"
}

Sample response

Location: https://westus.api.cognitive.microsoft.com/luis/api/v2.0/apps/86226c53-b7a6-416f-876b-226b2b5ab07b/versions/0.1/regexentities/fc821c4e-a2f8-4074-9410-7271b38a692d/roles/3d73462d-98f0-4dcd-8d30-fab9e65f2e73
"3d73462d-98f0-4dcd-8d30-fab9e65f2e73"

Definitions

Name Description
EntityRoleCreateObject

Object model for creating an entity role.

ErrorResponse

Error response when invoking an operation on the API.

EntityRoleCreateObject

Object model for creating an entity role.

Name Type Description
name

string

The entity role name.

ErrorResponse

Error response when invoking an operation on the API.

Name Type Description
errorType

string