All Products
Search
Document Center

OpenSearch:GetTable

Last Updated:Oct 16, 2024

Queries the information about an index table.

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
searchengine:GetTableget
  • Instance
    acs:searchengine:{#regionId}:{#accountId}:instance/{#InstanceId}
    none
none

Request syntax

GET /openapi/ha3/instances/{instanceId}/tables/{tableName} HTTP/1.1

Request parameters

ParameterTypeRequiredDescriptionExample
instanceIdstringYes

The instance ID.

ha-cn-0ju2k3qer02

Sample requests

GET /openapi/ha3/instances/{instanceId}/tables/{tableName}

Response parameters

ParameterTypeDescriptionExample
object
requestIdstring

requestId

2AE63638-5420-56DC-BF59-37D8174039A0
resultobject

The results returned.

statusstring

The state of the index table. Valid values: NEW, PUBLISH, IN_USE, NOT_USE, STOP_USE, RESTORE_USE, and FAIL. After an index is created in an OpenSearch Retrieval Engine Edition instance, the index enters the IN_USE state. If the first full index fails to be created in an OpenSearch Vector Search Edition instance of the new version, the index is in the FAIL state.

IN_USE
dataSourceobject
configobject
accessKeystring

AK

ak
accessSecretstring

AS

as
fieldSchemaobject

The field. The value is a key-value pair in which the key indicates the field name and value indicates the field type.

string

id

{ "id": "INT64", "source_image": "STRING", "namespace": "INT64", "source_image_vector": "MULTI_FLOAT" }
vectorIndexarray<object>

The index schema.

vectorIndexobject
indexNamestring

The name of the index schema.

test_odps
vectorFieldstring

The vector field.

source_image_vector
sparseIndexFieldstring

The field that stores the indexes of the elements in sparse vectors.

sparse_indices
sparseValueFieldstring

The field that stores the elements in sparse vectors.

sparse_values
dimensionstring

The dimension of the vector.

128
vectorIndexTypestring

The vector retrieval algorithm.

Qc
distanceTypestring

The distance type.

SquaredEuclidean
namespacestring

The namespace field.

namespace
advanceParamsobject

The configurations of the index schema.

buildIndexParamsstring

The index building parameters.

{}
searchIndexParamsstring

The index retrieval parameters.

{}
minScanDocCntstring

The minimum number of retrieved candidate sets.

20000
linearBuildThresholdstring

The threshold for linear building.

5000
dataProcessConfigarray<object>

The configurations about field processing.

dataProcessConfigobject
operatorstring

The method used to process the field. Valid values: copy and vectorize. A value of copy indicates that the value of the source field is copied to the destination field. A value of vectorize indicates that the value of the source field is vectorized by a vectorization model and the output vector is stored in the destination field.

vectorize
dstFieldstring

The destination field.

source_image_vector
srcFieldstring

The source field.

source_image
paramsobject

The information about the model.

vectorModelstring

The vectorization model.

clip
vectorModalstring

The data type.

image
srcFieldConfigobject

The source of the data to be vectorized.

ossEndpointstring

The Object Storage Service (OSS) endpoint.

oss-cn-hangzhou-internal.aliyuncs.com
ossBucketstring

OSS Bucket

test
uidstring

The ID of the Alibaba Cloud account.

uid

Examples

Sample success responses

JSONformat

{
  "requestId": "2AE63638-5420-56DC-BF59-37D8174039A0",
  "result": {
    "name": "test_oss",
    "status": "IN_USE",
    "dataProcessorCount": 1,
    "partitionCount": 1,
    "dataSource": {
      "type": "odps",
      "dataTimeSec": 1715160176,
      "autoBuildIndex": true,
      "config": {
        "endpoint": "http://service.cn-hangzhou.maxcompute.aliyun-inc.com/api",
        "accessKey": "ak",
        "accessSecret": "as",
        "project": "dp_pdm_marketing_prod",
        "partition": "ds=20220808",
        "table": "test_add",
        "namespace": "namespace",
        "path": "vendor/sebastian/comparator/src/exceptions",
        "ossPath": "/opensearch_index_data/sift_oss_test.data",
        "bucket": "heytea-ops-oss"
      }
    },
    "rawSchema": "{}",
    "primaryKey": "id",
    "fieldSchema": {
      "key": "{\n        \"id\": \"INT64\",\n        \"source_image\": \"STRING\",\n        \"namespace\": \"INT64\",\n        \"source_image_vector\": \"MULTI_FLOAT\"\n    }\n"
    },
    "vectorIndex": [
      {
        "indexName": "test_odps",
        "vectorField": "source_image_vector",
        "sparseIndexField": "sparse_indices",
        "sparseValueField": "sparse_values",
        "dimension": "128",
        "vectorIndexType": "Qc",
        "distanceType": "SquaredEuclidean",
        "namespace": "namespace",
        "advanceParams": {
          "buildIndexParams": "{}",
          "searchIndexParams": "{}",
          "minScanDocCnt": "20000",
          "linearBuildThreshold": "5000"
        }
      }
    ],
    "dataProcessConfig": [
      {
        "operator": "vectorize",
        "dstField": "source_image_vector",
        "srcField": "source_image",
        "params": {
          "vectorModel": "clip",
          "vectorModal": "image",
          "srcFieldConfig": {
            "ossEndpoint": "oss-cn-hangzhou-internal.aliyuncs.com\n",
            "ossBucket": "test",
            "uid": "uid"
          }
        }
      }
    ]
  }
}

Error codes

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

Change history

Change timeSummary of changesOperation
2024-05-09The response structure of the API has changedView Change Details