Delen via


Apps - Publish

Publishes a specific version of the application.

POST {Endpoint}/luis/api/v2.0/apps/{appId}/publish

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

Request Header

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

string

Request Body

Name Type Description
isStaging

boolean

Indicates if the staging slot should be used, instead of the Production one.

versionId

string

The version ID to publish.

Responses

Name Type Description
201 Created

ProductionOrStagingEndpointInfo

An object containing the application endpoint URL, its assigned endpoint key and publishing status.

Other Status Codes

ProductionOrStagingEndpointInfo

An object containing the application endpoint URL, its assigned endpoint key and publishing status in case that publishing one or more regions failed.

Other Status Codes

ErrorResponse

Error Response.

Security

Ocp-Apim-Subscription-Key

Type: apiKey
In: header

Examples

Successful Publish Application request

Sample request

POST {Endpoint}/luis/api/v2.0/apps/c555c6ef-974f-4d73-b573-69feeb4a85f8/publish


{
  "versionId": "0.1",
  "isStaging": false
}

Sample response

{
  "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"
}

Definitions

Name Description
ApplicationPublishObject

Object model for publishing a specific application version.

ErrorResponse

Error response when invoking an operation on the API.

ProductionOrStagingEndpointInfo

ApplicationPublishObject

Object model for publishing a specific application version.

Name Type Default value Description
isStaging

boolean

False

Indicates if the staging slot should be used, instead of the Production one.

versionId

string

The version ID to publish.

ErrorResponse

Error response when invoking an operation on the API.

Name Type Description
errorType

string

ProductionOrStagingEndpointInfo

Name Type Description
assignedEndpointKey

string

The endpoint key.

endpointRegion

string

The endpoint's region.

endpointUrl

string

The Runtime endpoint URL for this model version.

failedRegions

string

Regions where publishing failed.

isStaging

boolean

Indicates if the staging slot should be used, instead of the Production one.

publishedDateTime

string

Timestamp when was last published.

region

string

The target region that the application is published to.

versionId

string

The version ID to publish.