All Products
Search
Document Center

OpenSearch:BuildIndex

Last Updated:Jul 16, 2024

Triggers reindexing.

Operation description

Method

POST

URI

/openapi/ha3/instances/{instanceId}/actions/build-index

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer.

Authorization information

There is currently no authorization information disclosed in the API.

Request syntax

POST /openapi/ha3/instances/{instanceId}/actions/build-index

Request parameters

ParameterTypeRequiredDescriptionExample
instanceIdstringYes

The instance ID.

ha-cn-7mz2iv7sq01
bodyobjectNo

The request body, which is a JSON string. For more information, see the following parameters.

dataSourceNamestringNo

The name of the data source.

my_data_source
domainstringNo

The data center in which the data source is deployed.

test
dataSourceTypestringNo

The type of the data source.

swift
partitionstringNo

The partition in the MaxCompute table. This parameter is required if type is set to odps.

20201010
dataTimeSecintegerNo

The timestamp in seconds. The value must be of the INTEGER type. This parameter is required if you specify an API data source.

1640867288
buildModestringNo

The reindexing method. Valid values: api: API data source. indexRecover: data recovery by using indexing.

indexRecover
generationlongNo

The data restoration version.

160131146

Sample requests



POST /openapi/ha3/instances/ha3_instance_name/actions/build-index

​ 

 {

    "dataSourceName": "my_data_source",

    "domain": "test", // Specifies where the data source is deployed.

    "indexes": [

      "index1",

      "index2"

    ],
    "dataSourceType": "odps", // Set this parameter to odps or swift. This parameter is required.

    "partition": "20201010", // This parameter is required for the odps data source.

    "dataTimeSec": 1640867288 // The timestamp in seconds. It is of the INT type. This parameter is required for the API-pushed data source.

  }

 ​  ​ 

{

    "dataSourceName": "my_data_source",

    "domain": "test", // Specifies where the data source is deployed.

    "indexes": [

      "index1",

      "index2"

    ],

    "dataSourceType": "swift", // Set this parameter to odps or swift. This parameter is required.

    "partition": "20201010", // This parameter is required for the odps data source.

    "dataTimeSec": 1640867288 // The timestamp in seconds. It is of the INT type. This parameter is required for the API-pushed data source.
  }

 ​

Response parameters

ParameterTypeDescriptionExample
object

Schema of Response

requestIdstring

id of request

407BFD91-DE7D-50BA-8F88-CDE52A3B5E46
resultobject

The list of clusters

{}

Sample responses

Sample success responses 

{

  "requestId": "0A6EB64B-B4C8-CF02-810F-E660812972FF",

  "result": []

}

Examples

Sample success responses

JSONformat

{
  "requestId": "407BFD91-DE7D-50BA-8F88-CDE52A3B5E46",
  "result": {}
}

Error codes

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

Change history

Change timeSummary of changesOperation
2022-01-12Add OperationView Change Details