文档首页> 交换数据空间 EDS> API参考> API> offer管理> 查询指定offer资源列表(不限连接器)
更新时间:2024-04-30 GMT+08:00
分享

查询指定offer资源列表(不限连接器)

功能介绍

查询指定offer资源列表(不限连接器)。

URI

GET /v1/{project_id}/eds/instances/{instance_id}/connectors/{connector_id}/broker/offers/{offer_id}/resources

表1 路径参数

参数

是否必选

参数类型

描述

project_id

String

项目ID。

获取方法请参考获取项目ID

instance_id

String

实例ID,开通的数据交换平台实例ID。

获取方法请参考获取实例ID

connector_id

String

连接器ID,指定数据交换平台下连接器的ID。

获取方法请参考获取连接器ID

offer_id

String

Offer ID,待查询Offer的ID详情。

参数校验规则:最小长度1,最大长度100000。

表2 Query参数

参数

是否必选

参数类型

描述

offset

Integer

偏移量,表示从此偏移量开始查询,offset大于等于0。

  • 最小值:0
  • 最大值:999999
  • 缺省值:0

limit

Integer

每页显示条目数量,最大数量999,超过999后只返回999(防止单页返回过大)。

  • 最小值:1
  • 最大值:999
  • 缺省值:10

请求参数

表3 请求Header参数

参数

是否必选

参数类型

描述

X-Auth-Token

String

用户Token。通过调用IAM服务获取用户Token接口获取(响应消息头中X-Subject-Token的值)。

最小长度:1

最大长度:100000

响应参数

状态码: 200

表4 响应Body参数

参数

参数类型

描述

data

Array of OfferResourceDetail objects

返回数据。

total

Long

总数。

error_code

String

错误码。

error_msg

String

错误描述。

表5 OfferResourceDetail

参数

参数类型

描述

resource_id

String

资源ID。

resource_title

String

资源名称。

resource_type

String

资源的文件类型。

resource_category

String

资源分类:

  • DATASET: 数据集
  • FILE:文件

枚举值:

  • DATASETS
  • FILE

artifacts

Array of Artifact objects

数据清单。

resource_dataset_attribute_list

Array of ResourceDatasetAttribute objects

数据集资源属性列表。

表6 Artifact

参数

参数类型

描述

data_resource_id

String

所属资源ID。

artifact_id

String

资产ID。

artifact_code

String

资产编码。

artifact_title

String

文件名称。

byte_size

Long

文件大小。

media_type

String

资产格式类型。

表7 ResourceDatasetAttribute

参数

参数类型

描述

attribute_code

String

属性编码。

attribute_data_type

String

数据类型。

length

Integer

长度。

num_prec

Integer

精度。

num_scale

Integer

位数。

sort_order

Integer

排序号。

real_data_type

String

属性真实数据类型。

状态码: 400

表8 响应Body参数

参数

参数类型

描述

data

-

返回null

total

Long

总数。

error_code

String

错误码。

error_msg

String

错误描述。

状态码: 500

表9 响应Body参数

参数

参数类型

描述

data

-

返回null

total

Long

总数。

error_code

String

错误码。

error_msg

String

错误描述。

请求示例

查询指定offer资源列表(不限连接器)。

GET https://{endpoint}/v1/{project_id}/eds/instances/{instance_id}/connectors/{connector_id}/broker/offers/{offer_id}/resources

响应示例

状态码: 200

OK

  • 资源列表。
    {
      "data" : [ {
        "resource_id" : "25546208-0854-49a0-9023-************",
        "resource_title" : "JDBC_TEST",
        "resource_type" : "jdbc",
        "resource_category" : "DATASETS",
        "artifacts" : [ {
          "data_resource_id" : "25546208-0854-49a0-9023-************",
          "artifact_id" : "303b4f5f-596e-41c9-ad50-************",
          "artifact_code" : "Aconnector-****c95b3165df8742afa8c0************",
          "artifact_title" : "animals",
          "byte_size" : 16384,
          "media_type" : "jdbc"
        } ],
        "resource_dataset_attribute_list" : [ {
          "attribute_code" : "id",
          "attribute_data_type" : "INTEGER",
          "length" : null,
          "num_prec" : 10,
          "num_scale" : 0,
          "sort_order" : 0,
          "real_data_type" : "integer"
        }, {
          "attribute_code" : "animal_name",
          "attribute_data_type" : "STRING",
          "length" : 255,
          "num_prec" : null,
          "num_scale" : null,
          "sort_order" : 1,
          "real_data_type" : "varchar(255)"
        }, {
          "attribute_code" : "category",
          "attribute_data_type" : "STRING",
          "length" : 255,
          "num_prec" : null,
          "num_scale" : null,
          "sort_order" : 2,
          "real_data_type" : "varchar(255)"
        }, {
          "attribute_code" : "habitat",
          "attribute_data_type" : "STRING",
          "length" : 255,
          "num_prec" : null,
          "num_scale" : null,
          "sort_order" : 3,
          "real_data_type" : "varchar(255)"
        } ]
      } ],
      "total" : 0,
      "error_code" : null,
      "error_msg" : null
    }

状态码

状态码

描述

200

OK

400

Bad Request

500

Internal Server Error

错误码

请参见错误码

分享:

    相关文档

    相关产品