Create a fine sort expression for a version of an OpenSearch application. If you set the dryRun parameter to true, this operation checks the specified fine sort expression. The default value of the dryRun parameter is false if you do not set this parameter.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

Request headers

This operation uses only common request headers. For more information, see Common request parameters.

Request syntax

POST /v4/openapi/app-groups/[appGroupIdentity]/apps/[appId]/second-ranks HTTP/1.1

Request parameters

Parameter Type Position Required Example Description
appGroupIdentity String Path Yes my_app_group_name

The name of the application.

appId Integer Path Yes 110157886

The ID of the version.

dryRun Boolean Query No true

Specifies whether the request is a dry run.

Request body

Parameter

Type

Required

Example

Description

name

String

No

"test"

The name of the expression.

meta

String

No

"random()"

The content of the expression.

description

String

No

"my_test"

The description of the expression.

active

Boolean

No

true

Specifies whether the expression is the default one.

For more information, see SecondRank.

Response parameters

Parameter Type Example Description
RequestId String ABCDEFGH

The ID of the request.

result Map {}

The information about the fine sort expression.

Examples

Sample requests

POST /v4/openapi/app-groups/os_function_test_v1/apps/150024378/second-ranks

{
    "name": "test_1",
    "meta": "text_relevance(title)",
    "description": "123",
    "active": true
}

Sample success responses

XML format

<requestId>C5E2F73C-8241-81F8-3A62-65478C5A3111</requestId>
<result>
    <id>89047</id>
    <name>test_1</name>
    <meta>text_relevance(title)</meta>
    <active>true</active>
    <description>123</description>
    <created>1593679894</created>
    <updated>1593679894</updated>
    <isDefault>true</isDefault>
    <isSys>false</isSys>
</result>

JSON format

{
    "requestId": "C5E2F73C-8241-81F8-3A62-65478C5A3111",
    "result": {
        "id": 89047,
        "name": "test_1",
        "meta": "text_relevance(title)",
        "active": true,
        "description": 123,
        "created": 1593679894,
        "updated": 1593679894,
        "isDefault": true,
        "isSys": false
    }
}

Error codes

For a list of error codes, visit the API Error Center.