Apps - Publish
发布应用程序的特定版本。
POST {Endpoint}/luis/api/v2.0/apps/{appId}/publish
URI 参数
| 名称 | 在 | 必需 | 类型 | 说明 |
|---|---|---|---|---|
|
app
|
path | True |
string (uuid) |
应用程序 ID。 |
|
Endpoint
|
path | True |
string |
支持的认知服务终结点(协议和主机名,例如:https://westus.api.cognitive.microsoft.com)。 |
请求头
| 名称 | 必需 | 类型 | 说明 |
|---|---|---|---|
| Ocp-Apim-Subscription-Key | True |
string |
请求正文
| 名称 | 类型 | 说明 |
|---|---|---|
| isStaging |
boolean |
指示是否应使用过渡槽,而不是生产槽。 |
| versionId |
string |
要发布的版本 ID。 |
响应
| 名称 | 类型 | 说明 |
|---|---|---|
| 201 Created |
一个对象,其中包含应用程序终结点 URL、其分配的终结点密钥和发布状态。 |
|
| Other Status Codes |
一个对象,其中包含应用程序终结点 URL、其分配的终结点密钥和发布状态,以防发布一个或多个区域失败。 |
|
| Other Status Codes |
错误响应。 |
安全性
Ocp-Apim-Subscription-Key
类型:
apiKey
在:
header
示例
Successful Publish Application request
示例请求
POST {Endpoint}/luis/api/v2.0/apps/c555c6ef-974f-4d73-b573-69feeb4a85f8/publish
{
"versionId": "0.1",
"isStaging": false
}
示例响应
{
"isStaging": false,
"endpointUrl": "https://westus.api.cognitive.microsoft.com/luis/v2.0/apps/c555c6ef-974f-4d73-b573-69feeb4a85f8",
"assignedEndpointKey": null,
"endpointRegion": "westus, cus",
"failedRegions": null,
"publishedDateTime": "2017-11-28T19:20:28Z"
}
{
"isStaging": false,
"endpointUrl": "https://westus.api.cognitive.microsoft.com/luis/v2.0/apps/c555c6ef-974f-4d73-b573-69feeb4a85f8",
"assignedEndpointKey": null,
"endpointRegion": "westus, cus",
"failedRegions": "cus",
"publishedDateTime": "2017-11-28T19:20:28Z"
}
定义
| 名称 | 说明 |
|---|---|
|
Application |
用于发布特定应用程序版本的对象模型。 |
|
Error |
调用 API 上的作时出现错误响应。 |
|
Production |
ApplicationPublishObject
用于发布特定应用程序版本的对象模型。
| 名称 | 类型 | 默认值 | 说明 |
|---|---|---|---|
| isStaging |
boolean |
False |
指示是否应使用过渡槽,而不是生产槽。 |
| versionId |
string |
要发布的版本 ID。 |
ErrorResponse
调用 API 上的作时出现错误响应。
| 名称 | 类型 | 说明 |
|---|---|---|
| errorType |
string |
ProductionOrStagingEndpointInfo
| 名称 | 类型 | 说明 |
|---|---|---|
| assignedEndpointKey |
string |
终结点密钥。 |
| endpointRegion |
string |
终结点的区域。 |
| endpointUrl |
string |
此模型版本的运行时终结点 URL。 |
| failedRegions |
string |
发布失败的区域。 |
| isStaging |
boolean |
指示是否应使用过渡槽,而不是生产槽。 |
| publishedDateTime |
string |
上次发布的时间戳。 |
| region |
string |
应用程序发布到的目标区域。 |
| versionId |
string |
要发布的版本 ID。 |