All Products
Search
Document Center

OpenSearch:CreateApp

Last Updated:Oct 16, 2024

Creates a version for an OpenSearch application.

Operation description

  • When you create a standard application, a new version of the application is created if the specified application name already exists.
  • When you create a version of an existing application, you must specify the autoSwitch and realtimeShared parameters.
  • When you create a version of an existing application, the value of the quota parameter is the same as that of the quota parameter in the previous version of the application.
  • When you create a version of an existing application, the modification of the value of the quota parameter does not take effect.

Debugging

You can run this interface directly in OpenAPI Explorer, saving you the trouble of calculating signatures. After running successfully, OpenAPI Explorer can automatically generate SDK code samples.

Authorization information

The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:

  • Operation: the value that you can use in the Action element to specify the operation on a resource.
  • Access level: the access level of each operation. The levels are read, write, and list.
  • Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
    • The required resource types are displayed in bold characters.
    • If the permissions cannot be granted at the resource level, All Resources is used in the Resource type column of the operation.
  • Condition Key: the condition key that is defined by the cloud service.
  • Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
OperationAccess levelResource typeCondition keyAssociated operation
opensearch:CreateAppcreate
  • App
    acs:opensearch:{#regionId}:{#accountId}:app-groups/{#AppGroupId}
    none
none

Request syntax

POST /v4/openapi/app-groups/{appGroupIdentity}/apps HTTP/1.1

Request parameters

ParameterTypeRequiredDescriptionExample
appGroupIdentitystringYes

The name of the application

my_app_group_name
dryRunbooleanNo

Specifies whether to perform a dry run. This parameter is only used to check whether the data source is valid. Valid values: true and false.

true
bodyAppNo

The request body.

Request body

ParameterTypeRequiredExampleDescription
typeStringYes"standard"The type of the application. Valid values:standard: standard edition.enhanced: advanced edition.
schemaObjectYesThe schema of the application.For more information, see Schema .
fetchFieldsArrayYes["id", "name"]The default display fields.
realtimeSharedBooleanYesfalseSpecifies whether to synchronize real-time data between the online and offline versions of the application.
autoSwitchBooleanYesfalseSpecifies whether to automatically publish the new version of the application.
descriptionStringNo"demo"The description of the application.
quotaObjectNoThe quota information about the application.For more information, see Quota .
dataSources[]ObjectNoThe information about each data source.For more information, see DataSource .
firstRanks[]ObjectNoThe information about each rough sort expression.For more information, see FirstRank .
secondRanks[]ObjectNoThe information about each fine sort expression.For more information, see SecondRank .
queryProcessors[]ObjectNoThe information about each query analysis rule.For more information, see QueryProcessor .
summaries[]ObjectNoThe settings of search result summaries.For more information, see Summary .

Response parameters

ParameterTypeDescriptionExample
object
resultobject

The returned results.

{}
requestIdstring

The request ID.

ABCDEFG

Examples

Sample success responses

JSONformat

{
  "result": {},
  "requestId": "ABCDEFG"
}

Error codes

For a list of error codes, visit the Service error codes.

Change history

Change timeSummary of changesOperation
2024-08-26The response structure of the API has changedView Change Details
2023-05-30The request parameters of the API has changedView Change Details