Creates a sort script.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
opensearch:WriteSortScript |
create |
*App
|
None | None |
Request syntax
POST /v4/openapi/app-groups/{appGroupIdentity}/apps/{appVersionId}/sort-scripts HTTP/1.1
Path Parameters
|
Parameter |
Type |
Required |
Description |
Example |
| appGroupIdentity |
string |
Yes |
The name or ID of the application. |
search |
| appVersionId |
string |
Yes |
The ID of the report under the application. |
1234567 |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| body |
object |
No |
The request body. |
|
| scriptName |
string |
No |
The script name. |
rank_cava_20230606_v7 |
| type |
string |
No |
The type of the script. Currently, only cava_script is supported. |
cava_script |
| scope |
string |
No |
The scope of the script. |
second_rank |
| description |
string |
No |
The remarks of the script. |
Request parameters
| Name | Type | Required | Description |
| scriptParams | Map | Yes | The script parameters to be registered. |
scriptParams
| Name | Type | Required | Description |
| scriptName | String | Yes | The script name. |
| type | String | Yes | The type of the script. Currently, only cava_script is supported. |
| scope | String | Yes | The scope of the script. Currently, only second_rank is supported. |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
|||
| requestId |
string |
The request ID. |
ABCDEFGH |
| result |
object |
The returned result. |
|
| scriptName |
string |
The script name. |
rank_cava_20230606_v7 |
| type |
string |
The type of the script. |
cava_script |
| scope |
string |
The scope of the script. |
second_rank |
| status |
string |
Examples
Success response
JSON format
{
"requestId": "ABCDEFGH",
"result": {
"scriptName": "rank_cava_20230606_v7\n",
"type": "cava_script",
"scope": "second_rank"
},
"status": ""
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.