GetFile - 查看索引表版本详情

查看索引表版本详情。

接口说明

方法

GET

URI

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

调试

您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。

授权信息

下表是API对应的授权信息,可以在RAM权限策略语句的Action元素中使用,用来给RAM用户或RAM角色授予调用此API的权限。具体说明如下:

  • 操作:是指具体的权限点。
  • 访问级别:是指每个操作的访问级别,取值为写入(Write)、读取(Read)或列出(List)。
  • 资源类型:是指操作中支持授权的资源类型。具体说明如下:
    • 对于必选的资源类型,用前面加 * 表示。
    • 对于不支持资源级授权的操作,用全部资源表示。
  • 条件关键字:是指云产品自身定义的条件关键字。
  • 关联操作:是指成功执行操作所需要的其他权限。操作者必须同时具备关联操作的权限,操作才能成功。
操作访问级别资源类型条件关键字关联操作
searchengine:GetFileget
*Instance
acs:searchengine:{#regionId}:{#accountId}:instance/{#InstanceId}

请求语法

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

请求参数

名称类型必填描述示例值
instanceIdstring

实例 ID

ha-cn-pl32rf0****
indexNamestring

索引名称

test_api
versionNamestring

版本名称

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

文件全路径名称

/schemas/automobile_vector_schema.json

请求示例

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

返回参数

名称类型描述示例值
object

Schema of Response

requestIdstring

请求 ID。

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

索引信息

namestring

文件名称

testFile
fullPathNamestring

全路径名称

/schema.json
dataSourcestring

数据源

ha-cn-pl32rf0****_test_api
partitionlong

分片数

2
isDirboolean

是否为目录

true
contentstring

内容

{"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"}
extendobject

扩展信息

array

扩展信息

extendstring

扩展信息

返回示例

正确返回

{
  "requestId": "e1eef569-1ff7-4bf8-acf7-1cecca9894ce",
  "result": {
    "name":"version1",  // 文件名
    "fullPathName": "/root/version1",   // 全路径名称
    "dataSource": "odps1", // 数据源
    "partition": 1,  // 分片
    "isDir": false, // 是否为目录
    "content": ""
  }
}

示例

正常返回示例

JSON格式

{
  "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": [
        ""
      ]
    }
  }
}

错误码

访问错误中心查看更多错误码。

变更历史

变更时间变更内容概要操作
2024-07-31OpenAPI 返回结构发生变更查看变更详情
2022-01-12新增 OpenAPI查看变更详情