All Products
Search
Document Center

OpenSearch:CreateApp

Last Updated:Aug 04, 2026

Creates a version for an OpenSearch application.

Operation description

  • If an application with the same name already exists in the General-purpose Edition, a new version is created.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

The table below describes the authorization required to call this API. You can define it in a Resource Access Management (RAM) policy. The table's columns are detailed below:

  • Action: The actions can be used in the Action element of RAM permission policy statements to grant permissions to perform the operation.

  • API: The API that you can call to perform the action.

  • Access level: The predefined level of access granted for each API. Valid values: create, list, get, update, and delete.

  • Resource type: The type of the resource that supports authorization to perform the action. It indicates if the action supports resource-level permission. The specified resource must be compatible with the action. Otherwise, the policy will be ineffective.

    • For APIs with resource-level permissions, required resource types are marked with an asterisk (*). Specify the corresponding Alibaba Cloud Resource Name (ARN) in the Resource element of the policy.

    • For APIs without resource-level permissions, it is shown as All Resources. Use an asterisk (*) in the Resource element of the policy.

  • Condition key: The condition keys defined by the service. The key allows for granular control, applying to either actions alone or actions associated with specific resources. In addition to service-specific condition keys, Alibaba Cloud provides a set of common condition keys applicable across all RAM-supported services.

  • Dependent action: The dependent actions required to run the action. To complete the action, the RAM user or the RAM role must have the permissions to perform all dependent actions.

Action

Access level

Resource type

Condition key

Dependent action

opensearch:CreateApp

create

*App

acs:opensearch:{#regionId}:{#accountId}:app-groups/{#AppGroupId}

None None

Request syntax

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

Path Parameters

Parameter

Type

Required

Description

Example

appGroupIdentity

string

Yes

The application name.

my_app_group_name

Request parameters

Parameter

Type

Required

Description

Example

dryRun

boolean

No

Specifies whether to perform a dry run (only validates whether the data source is valid). Valid values:

  • true: performs a dry run.

  • false: does not perform a dry run.

true

body

object

No

The request body.

autoSwitch

boolean

No

Specifies whether to automatically switch to the online version after the version is created.

false

networkType

string

No

The zone identifier. Valid values:

vpc

description

string

No

The version description.

"version description"

schema

object

No

The application schema for a single table.

tables

object

No

The table schema.

{ "primaryTable": true, "name": "main", "fields": { "id": { "name": "id", "type": "LITERAL", "primaryKey": true }, "title": { "name": "title", "type": "TEXT", "primaryKey": false }, "buy": { "name": "buy", "type": "INT", "primaryKey": false }, "cate_id": { "name": "cate_id", "type": "INT", "primaryKey": false }, "cate_name": { "name": "cate_name", "type": "LITERAL", "primaryKey": false } } }

indexes

object

No

The index schema.

filterFields

array

No

The attribute fields.

string

No

The attribute field.

id

searchFields

object

No

The index fields.

{ "fields": ["title"], "analyzer": "chn_standard" }

routeField

string

No

The name of the primary routing field.

field1

routeFieldValues

array

No

The list of hot values for the primary routing field. After configuration, secondary routing is enabled.

string

No

The hot value of the primary routing field.

routeFieldValues

secondRouteField

string

No

The name of the secondary routing field. This parameter takes effect only when routeFieldValues is configured. The wide table primary key is used by default.

field2

ttlField

object

No

The document cleanup configuration.

name

string

No

The document time field.

text1

ttl

integer

No

The time to live (TTL), in milliseconds.

1000

indexSortConfig

array<object>

No

The inverted index configuration.

object

No

The inverted index configuration.

field

string

No

The sort field.

field1

direction

string

No

The sort order.

ASC; DESC;

name

string

No

The wide table name.

table_name

schemas

array<object>

No

The application schema for multiple tables.

array<object>

No

The application schema for a single table.

tables

object

No

The table schema.

{ "primaryTable": true, "name": "main", "fields": { "id": { "name": "id", "type": "LITERAL", "primaryKey": true }, "title": { "name": "title", "type": "TEXT", "primaryKey": false }, "buy": { "name": "buy", "type": "INT", "primaryKey": false }, "cate_id": { "name": "cate_id", "type": "INT", "primaryKey": false }, "cate_name": { "name": "cate_name", "type": "LITERAL", "primaryKey": false } } }

indexes

object

No

The index schema.

filterFields

array

No

The attribute fields.

string

No

The attribute field.

id

searchFields

object

No

The index fields.

{ "fields": ["title"], "analyzer": "chn_standard" }

routeField

string

No

The name of the primary routing field.

field1

routeFieldValues

array

No

The list of hot values for the primary routing field. After configuration, secondary routing is enabled.

string

No

The hot value of the primary routing field.

routeFieldValues

secondRouteField

string

No

The name of the secondary routing field. This parameter takes effect only when routeFieldValues is configured. The wide table primary key is used by default.

field2

ttlField

object

No

The document cleanup configuration.

name

string

No

The document time field.

text1

ttl

integer

No

The time to live (TTL), in milliseconds.

1000

indexSortConfig

array<object>

No

The inverted index configuration.

object

No

The inverted index configuration.

field

string

No

The sort field.

field1

direction

string

No

The sort order.

  • ASC

  • DESC

DESC

name

string

No

The wide table name.

table_name

firstRanks

array<object>

No

The rough sort configuration.

object

No

The rough sort configuration.

type

string

No

The expression type.

STRING

name

string

No

The rough sort name.

test

description

string

No

The description.

Description

active

boolean

No

Specifies whether this is the default expression.

False

meta

any

No

The expression information (Array or String).

String :"random()*100+now()"; Array: [ { "attribute": "static_bm25()", "arg": "", "weight": 10 } ]

secondRanks

array<object>

No

The fine sort configuration.

object

No

The fine sort configuration.

meta

any

No

The fine sort expression. You can write expressions that contain fields, scoring features, and mathematical functions to implement complex sorting logic.

"cate_id > 0 and cate_id < 1000"

name

string

No

The fine sort name.

default

description

string

No

The description.

Description

active

boolean

No

Specifies whether this is the default expression.

False

dataSources

array<object>

No

The datasource config.

array<object>

No

The datasource config.

tableName

string

No

The application table name.

main

type

string

No

The data source type.

rds

fields

array<object>

No

The table field mapping information.

object

No

The table field mapping information.

{ "id": "id" }

plugins

object

No

The field data processing plugins.

{ "name": "JsonKeyValueExtractor", "parameters": { "key": "my_field" } }

keyField

string

No

The primary key.

id

schemaName

string

No

The wide table name.

table_name

parameters

object

No

The data source information.

{ "instanceId": "rds-instance-id", "dbName": "my_db", "dbTableName": "my_table", "dbUser": "my", "dbPassword": "my_passwd", "filter":"", "autoSync": true }

summaries

array<object>

No

The search result summary configuration.

array<object>

No

The search result summary configuration.

name

string

No

The group name.

default

meta

array<object>

No

The collection of summary configurations.

object

No

The summary configuration.

field

string

No

The field.

field1

len

integer

No

The length of the snippet. The value must be in the range of [1, 300].

50

element

string

No

The HTML tag for highlight.

em

ellipsis

string

No

The string used to connect snippets.

...

snippet

string

No

The number of snippets. The value must be in the range of [1, 5].

1

fetchFields

array

No

The default display fields.

string

No

The field.

field1

queryProcessors

array<object>

No

The query intention recognition configuration.

array<object>

No

The query intention recognition configuration.

name

string

No

The rule name.

name

domain

string

No

The industry type.

ECOMMERCE

category

string

No

The industry vertical.

""

processors

array<object>

No

The included features.

object

No

The included features.

{ "name": "stop_word", "useSystemDictionary": true, "interventionDictionary": "my_dict", "ignoreSpace": true }

indexes

array

No

The index scope of the application.

string

No

The application index.

default

active

boolean

No

Specifies whether this is the default rule.

True

cluster

object

No

The capability configuration.

maxTimeoutMS

integer

No

The timeout period of the cluster. Unit: ms.

750

maxQueryClauseLength

integer

No

The maximum length of a query clause.

1024

textSparseEmbeddingModel

string

No

Specifies the sparse vector model used by the LLM application version.

ops-text-sparse-embedding-001

textEmbeddingModel

string

No

Specifies the text embedding model used by the LLM application version.

ops-text-embedding-002

chunkModels

array<object>

No

The text segmentation method.

object

No

The text segmentation configuration item.

imageContentRecognizerModels

array<object>

No

The Image Content Recognition Service model.

object

No

The Image Content Recognition Service model configuration item.

graphRag

object

No

The GraphRAG integration configuration.

vectorIndexConfigs

array<object>

No

The advanced vector index configuration for dedicated instances.

object

No

The advanced vector index configuration item for dedicated instances.

domain

object

No

The industry model.

name

string

No

The industry type.

ecommerce

category

string

No

The industry vertical.

general

functions

object

No

The selected features.

{"qp":["spellcheck"],"algo":["pop"],"service":["suggest"]}

realtimeShared

boolean

No

Specifies whether to share the real-time stream.

interpretations

array<object>

No

The LLM table field descriptions.

object

No

The LLM table field descriptions.

prompts

array<object>

No

The prompt configuration.

object

No

The first prompt content in the request body.

configItems

array<object>

No

The list of configuration items in the request body.

object

No

The first element in the configuration item list.

Request body

Response elements

Element

Type

Description

Example

object

The root node.

requestId

string

The request ID.

ABCDEFG

result

object

The returned result.

{}

id

string

The application ID.

12888

isCurrent

boolean

Indicates whether this is the online version.

12333

clusterName deprecated

string

The cluster name.

vpc_sh_domain_1

type

string

The application type.

standard

description

string

The application description.

My application

status

string

The application status.

OK

schema

object

The application schema for a single table.

tables

object

The table schema.

{ "primaryTable": true, "name": "main", "fields": { "id": { "name": "id", "type": "LITERAL", "primaryKey": true }, "title": { "name": "title", "type": "TEXT", "primaryKey": false }, "buy": { "name": "buy", "type": "INT", "primaryKey": false }, "cate_id": { "name": "cate_id", "type": "INT", "primaryKey": false }, "cate_name": { "name": "cate_name", "type": "LITERAL", "primaryKey": false } } }

indexes

object

The index schema.

filterFields

array

The attribute fields.

string

The attribute field.

id

searchFields

object

The index fields.

{ "fields": ["title"], "analyzer": "chn_standard" }

routeField

string

The name of the level-1 routing field.

field1

routeFieldValues

array

The name of the level-2 routing field. This parameter takes effect only when routeFieldValues is configured. By default, the primary key of the wide table is used.

string

The hotspot value of the level-1 routing field.

routeFieldValues

secondRouteField

string

The name of the level-2 routing field. This parameter takes effect only when routeFieldValues is configured. By default, the primary key of the wide table is used.

field2

ttlField

object

The document expiration configuration.

name

string

The document time field.

text1

ttl

integer

The time to live (TTL), in milliseconds.

1000

indexSortConfig

array<object>

The inverted index configurations.

object

The inverted index configuration.

field

string

The sort field.

field1

direction

string

The sort order.

  • ASC

  • DESC

DESC

name

string

The name of the wide table.

test

progressPercent

integer

The data import progress percentage.

100

fetchFields

array

The collection of default display fields.

string

The default display fields.

field1

domain

object

The industry model.

category

string

The industry category.

-

name

string

The industry. Valid values:

  • GENERAL

  • ECOMMERCE

  • IT_CONTENT

GENERAL

functions

object

The selected features.

service

array

The ancillary service features.

string

The ancillary service features.

suggest

qp

array

The query analysis features.

string

The query analysis features.

spellcheck

algo

array

The sort policy features.

string

The sort policy features.

pop

schemas

array<object>

The application schema for multiple tables.

array<object>

The application schema.

tables

object

The table schema.

{ "primaryTable": true, "name": "main", "fields": { "id": { "name": "id", "type": "LITERAL", "primaryKey": true }, "title": { "name": "title", "type": "TEXT", "primaryKey": false }, "buy": { "name": "buy", "type": "INT", "primaryKey": false }, "cate_id": { "name": "cate_id", "type": "INT", "primaryKey": false }, "cate_name": { "name": "cate_name", "type": "LITERAL", "primaryKey": false } } }

indexes

object

The index schema.

filterFields

array

The attribute fields.

string

The attribute field.

field1

searchFields

object

The index fields.

{ "fields": ["title"], "analyzer": "chn_standard" }

routeField

string

The name of the level-1 routing field.

field1

routeFieldValues

array

The list of hotspot values for the level-1 routing field. After you configure this parameter, level-2 routing is enabled.

string

The hotspot value of the level-1 routing field.

routeFieldValues

secondRouteField

string

The name of the level-2 routing field. This parameter takes effect only when routeFieldValues is configured. By default, the primary key of the wide table is used.

field2

ttlField

object

The document expiration configuration.

name

string

The document time field.

fIeld1

ttl

integer

The time to live (TTL), in milliseconds.

1000

indexSortConfig

array<object>

The inverted index configuration.

object

The inverted index configuration.

field

string

The sort field.

fIeld1

direction

string

The sort order.

  • ASC

  • DESC

DESC

name

string

The name of the wide table.

main

firstRanks

array<object>

The rough sort configuration.

object

The rough sort configuration.

type

string

The type of the expression. Valid values: `STRUCT`: a structured expression. `STRING`: a custom formula. Default value: `STRING`.

STRUCT: The content of the expression is a structure. STRING (default): custom formula.

STRING

name

string

The name of the rough sort expression.

test

description

string

The description.

描述

active

boolean

Specifies whether the expression is the default one.

False

meta

any

The details of the expression. The value can be an array or a string.

String :"random()*100+now()"; Array: [ { "attribute": "static_bm25()", "arg": "", "weight": 10 } ]

secondRanks

array<object>

The fine sort configuration.

object

The fine sort configuration.

meta

any

The fine sort expression. You can write an expression that contains fields, feature functions, and mathematical functions to implement complex sort logic.

"cate_id > 0 and cate_id < 1000"

name

string

The name of the fine sort expression.

default

description

string

The description.

default

active

boolean

Specifies whether the expression is the default one.

False

dataSources

array<object>

The datasource config.

array<object>

The datasource config.

tableName

string

The name of the application table.

main

type

string

The type of the data source.

  • rds

  • odps

  • opensearch

  • polardb

rds

fields

array<object>

The information about field mappings.

object

The information about field mappings.

{ "id": "id" }

plugins

object

The data processing plugins for fields.

Plugin name (name):

  • JsonKeyValueExtractor

  • MultiValueSpliter

  • KeyValueExtractor

  • StringCatenateExtractor

  • HTMLTagRemover

Plugin parameters (parameters):

  • JsonKeyValueExtractor

  • MultiValueSpliter

  • KeyValueExtractor

  • StringCatenateExtractor

  • HTMLTagRemover

{ "name": "JsonKeyValueExtractor", "parameters": { "key": "my_field" } }

keyField

string

The primary key.

id

schemaName

string

The name of the wide table.

table_name

parameters

object

The information about the data source.

{ "instanceId": "rds-instance-id", "dbName": "my_db", "dbTableName": "my_table", "dbUser": "my", "dbPassword": "my_passwd", "filter":"", "autoSync": true }

summaries

array<object>

The search result summary configuration.

array<object>

The search result summary configuration.

name

string

The group name.

fefault

meta

array<object>

The summary configurations.

object

The summary configuration.

field

string

The field.

field1

len

integer

The length of the snippet. The value must be in the range of [1, 300].

50

element

string

The HTML tag for highlight.

em

ellipsis

string

The string used to connect snippets.

...

snippet

string

The number of snippets. The value must be in the range of [1, 5].

5

queryProcessors

array<object>

The query intention recognition configuration.

array<object>

The query intention recognition configuration.

name

string

The rule name.

test

domain

string

The industry. Valid values:

  • GENERAL: general

  • ECOMMERCE: e-commerce

  • IT_CONTENT: IT content

GENERAL

category

string

The industry category.

""

processors

array<object>

The features that are included.

object

The features that are included.

{ "name": "stop_word", "useSystemDictionary": true, "interventionDictionary": "my_dict", "ignoreSpace": true }

indexes

array

The indexes of the application.

string

The application index.

id

active

boolean

Specifies whether the rule is the default one.

False

cluster

object

The capability configuration.

maxTimeoutMS

integer

The timeout period for the cluster, in milliseconds.

750

maxQueryClauseLength

integer

The maximum length of the query clause.

1024

textEmbeddingModel

string

textSparseEmbeddingModel

string

chunkModels

array<object>

object

imageContentRecognizerModels

array<object>

object

graphRag

object

vectorIndexConfigs

array<object>

object

prompts

array<object>

The prompt configuration.

object

The prompt configuration.

{

updated

integer

The time when the configuration was last updated.

created

integer

The time when the configuration was created.

switchTime

integer

The switch online up time.

interpretations

array<object>

The LLM table field descriptions.

{     "name": "longyu_llm_1",     "schemas": [],     "interpretations": [         {             "table": "table1",             "fields": [                 {                     "name": "field1",                     "interpretation": " title"                 },                 {                     "name": "field2",                     "interpretation": " ID"                 }             ]         }     ] }

object

The LLM table field descriptions.

configItems

array<object>

The list of configuration items.

object

The first element in the configuration item list.

Examples

Success response

JSON format

{
  "requestId": "ABCDEFG",
  "result": {
    "id": "12888",
    "isCurrent": true,
    "clusterName": "vpc_sh_domain_1",
    "type": "standard",
    "description": "My application",
    "status": "OK",
    "schema": {
      "tables": {
        "primaryTable": true,
        "name": "main",
        "fields": {
          "id": {
            "name": "id",
            "type": "LITERAL",
            "primaryKey": true
          },
          "title": {
            "name": "title",
            "type": "TEXT",
            "primaryKey": false
          },
          "buy": {
            "name": "buy",
            "type": "INT",
            "primaryKey": false
          },
          "cate_id": {
            "name": "cate_id",
            "type": "INT",
            "primaryKey": false
          },
          "cate_name": {
            "name": "cate_name",
            "type": "LITERAL",
            "primaryKey": false
          }
        }
      },
      "indexes": {
        "filterFields": [
          "id"
        ],
        "searchFields": {
          "fields": [
            "title"
          ],
          "analyzer": "chn_standard"
        }
      },
      "routeField": "field1",
      "routeFieldValues": [
        "routeFieldValues"
      ],
      "secondRouteField": "field2\n",
      "ttlField": {
        "name": "text1\n",
        "ttl": 1000
      },
      "indexSortConfig": [
        {
          "field": "field1",
          "direction": "DESC"
        }
      ],
      "name": "test"
    },
    "progressPercent": 100,
    "fetchFields": [
      "field1"
    ],
    "domain": {
      "category": "-",
      "name": "GENERAL",
      "functions": {
        "service": [
          "suggest\n\n"
        ],
        "qp": [
          "spellcheck"
        ],
        "algo": [
          "pop"
        ]
      }
    },
    "schemas": [
      {
        "tables": {
          "primaryTable": true,
          "name": "main",
          "fields": {
            "id": {
              "name": "id",
              "type": "LITERAL",
              "primaryKey": true
            },
            "title": {
              "name": "title",
              "type": "TEXT",
              "primaryKey": false
            },
            "buy": {
              "name": "buy",
              "type": "INT",
              "primaryKey": false
            },
            "cate_id": {
              "name": "cate_id",
              "type": "INT",
              "primaryKey": false
            },
            "cate_name": {
              "name": "cate_name",
              "type": "LITERAL",
              "primaryKey": false
            }
          }
        },
        "indexes": {
          "filterFields": [
            "field1"
          ],
          "searchFields": {
            "fields": [
              "title"
            ],
            "analyzer": "chn_standard"
          }
        },
        "routeField": "field1\n",
        "routeFieldValues": [
          "routeFieldValues"
        ],
        "secondRouteField": "field2",
        "ttlField": {
          "name": "fIeld1",
          "ttl": 1000
        },
        "indexSortConfig": [
          {
            "field": "fIeld1",
            "direction": "DESC"
          }
        ],
        "name": "main"
      }
    ],
    "firstRanks": [
      {
        "type": "STRING",
        "name": "test",
        "description": "描述",
        "active": true,
        "meta": "String :\"random()*100+now()\";\nArray: [\n    {\n      \"attribute\": \"static_bm25()\",\n      \"arg\": \"\",\n      \"weight\": 10\n    }\n  ]"
      }
    ],
    "secondRanks": [
      {
        "meta": "\"cate_id > 0 and cate_id < 1000\"\n",
        "name": "default\n",
        "description": "default\n",
        "active": true
      }
    ],
    "dataSources": [
      {
        "tableName": "main",
        "type": "rds",
        "fields": [
          {
            "id": "id"
          }
        ],
        "plugins": {
          "name": "JsonKeyValueExtractor",
          "parameters": {
            "key": "my_field"
          }
        },
        "keyField": "id",
        "schemaName": "table_name",
        "parameters": {
          "instanceId": "rds-instance-id",
          "dbName": "my_db",
          "dbTableName": "my_table",
          "dbUser": "my",
          "dbPassword": "my_passwd",
          "filter": "",
          "autoSync": true
        }
      }
    ],
    "summaries": [
      {
        "name": "fefault",
        "meta": [
          {
            "field": "field1",
            "len": 50,
            "element": "em",
            "ellipsis": "...",
            "snippet": "5"
          }
        ]
      }
    ],
    "queryProcessors": [
      {
        "name": "test",
        "domain": "GENERAL",
        "category": "\"\"",
        "processors": [
          {
            "name": "stop_word",
            "useSystemDictionary": true,
            "interventionDictionary": "my_dict",
            "ignoreSpace": true
          }
        ],
        "indexes": [
          "id"
        ],
        "active": true
      }
    ],
    "cluster": {
      "maxTimeoutMS": 750,
      "maxQueryClauseLength": 1024,
      "textEmbeddingModel": "",
      "textSparseEmbeddingModel": "",
      "chunkModels": [
        {
          "test": "test",
          "test2": 1
        }
      ],
      "imageContentRecognizerModels": [
        {
          "test": "test",
          "test2": 1
        }
      ],
      "graphRag": {
        "test": "test",
        "test2": 1
      },
      "vectorIndexConfigs": [
        {
          "test": "test",
          "test2": 1
        }
      ]
    },
    "prompts": [
      {
        "name": "prompt_name",
        "isDefault": false,
        "description": "描述",
        "prompt": {
          "parameters": [
            {
              "name": "docs",
              "value": "doc内容的拼接方式,比如现在的 qwen的 '\n${doc}\n\n"
            }
          ],
          "messages": [
            {
              "role": "role_name,这里是否需要限定只能是 system, user, assistant,还是可以让用户随意填写",
              "content": "用户设置的prompt内容,里面可以使用 ${parameter_key} 来表示期望动态替换的内容,具体替换规则参考下面说明"
            }
          ]
        }
      }
    ],
    "updated": 0,
    "created": 0,
    "switchTime": 0,
    "interpretations": [
      {
        "test": "test",
        "test2": 1
      }
    ],
    "configItems": [
      {
        "test": "test",
        "test2": 1
      }
    ]
  }
}

Error codes

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.