All Products
Search
Document Center

OpenSearch:GetFile

Last Updated:Dec 24, 2025

Retrieves the details of an index version.

Operation description

Method

GET

URI

/openapi/ha3/instances/{instanceId}/indexes/{indexName}/versions/{versionName}/file

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

searchengine:GetFile

get

*Instance

acs:searchengine:{#regionId}:{#accountId}:instance/{#InstanceId}

None None

Request syntax

GET /openapi/ha3/instances/{instanceId}/indexes/{indexName}/versions/{versionName}/file HTTP/1.1

Path Parameters

Parameter

Type

Required

Description

Example

instanceId

string

Yes

The instance ID.

ha-cn-pl32rf0****

indexName

string

Yes

The index name.

test_api

versionName

string

Yes

The version name.

ha-cn-pl32rf0****@ha-cn-pl32rf0****_test_api@bj_vpc_domain_1@point_cloud_3d@index_config_edit

Request parameters

Parameter

Type

Required

Description

Example

fileName

string

Yes

The full path of the file.

/schemas/automobile_vector_schema.json

Request example

GET  /openapi/ha3/instances/ose-test1/indexes/index1/versions/version1?fileName=/root/test.txt

Response elements

Element

Type

Description

Example

object

Schema of Response

requestId

string

The request ID.

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

result

object

The index information.

name

string

The file name.

testFile

fullPathName

string

The full path of the file.

/schema.json

dataSource

string

The data source.

ha-cn-pl32rf0****_test_api

partition

integer

The number of shards.

2

isDir

boolean

Indicates whether the path points to a directory.

true

content

string

The content of the file.

{"summarys":{"parameter":{"file_compressor":"zstd"},"summary_fields":["id"]},"file_compress":[{"name":"file_compressor","type":"zstd"},{"name":"no_compressor","type":""}],"indexs":[{"index_fields":"name","index_name":"ids","index_type":"STRING"},{"has_primary_key_attribute":true,"index_fields":"id","is_primary_key_sorted":false,"index_name":"id","index_type":"PRIMARYKEY64"}],"attributes":[{"file_compress":"no_compressor","field_name":"id"}],"fields":[{"user_defined_param":{},"compress_type":"uniq","field_type":"STRING","field_name":"id"},{"compress_type":"uniq","field_type":"STRING","field_name":"name"}],"table_name":"api"}

extend

object

The extended information.

array

The extended information.

string

The extended information.

Response example

Successful response

{
  "requestId": "e1eef569-1ff7-4bf8-acf7-1cecca9894ce",
  "result": {
    "name":"version1",  // The file name
    "fullPathName": "/root/version1",   // The full path of the file
    "dataSource": "odps1", // The data source
    "partition": 1,  // The shard
    "isDir": false, // Indicates whether the path points to a directory
    "content": ""
  }
}

Examples

Success response

JSON format

{
  "requestId": "2AE63638-5420-56DC-BF59-37D8174039A0",
  "result": {
    "name": "testFile",
    "fullPathName": "/schema.json",
    "dataSource": "ha-cn-pl32rf0****_test_api",
    "partition": 2,
    "isDir": true,
    "content": "{\"summarys\":{\"parameter\":{\"file_compressor\":\"zstd\"},\"summary_fields\":[\"id\"]},\"file_compress\":[{\"name\":\"file_compressor\",\"type\":\"zstd\"},{\"name\":\"no_compressor\",\"type\":\"\"}],\"indexs\":[{\"index_fields\":\"name\",\"index_name\":\"ids\",\"index_type\":\"STRING\"},{\"has_primary_key_attribute\":true,\"index_fields\":\"id\",\"is_primary_key_sorted\":false,\"index_name\":\"id\",\"index_type\":\"PRIMARYKEY64\"}],\"attributes\":[{\"file_compress\":\"no_compressor\",\"field_name\":\"id\"}],\"fields\":[{\"user_defined_param\":{},\"compress_type\":\"uniq\",\"field_type\":\"STRING\",\"field_name\":\"id\"},{\"compress_type\":\"uniq\",\"field_type\":\"STRING\",\"field_name\":\"name\"}],\"table_name\":\"api\"}",
    "extend": {
      "key": [
        ""
      ]
    }
  }
}

Error codes

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.