查询指定offer资源列表(指定连接器) - ShowOfferResourceList
功能介绍
查询指定offer资源列表(指定连接器)。
授权信息
账号具备所有API的调用权限,如果使用账号下的IAM用户调用当前API,该IAM用户需具备调用API所需的权限,具体权限要求请参见权限和授权项。
URI
GET /v1/{project_id}/eds/instances/{instance_id}/connectors/{connector_id}/offers/{offer_id}/resources
| 参数 | 是否必选 | 参数类型 | 描述 |
|---|---|---|---|
| project_id | 是 | String | 项目ID。 获取方法请参考获取项目ID。 |
| instance_id | 是 | String | 实例ID,开通的交换数据平台实例ID。 获取方法请参考获取实例ID。 |
| connector_id | 是 | String | 连接器ID,指定交换数据平台下连接器的ID。 获取方法请参考获取连接器ID。 |
| offer_id | 是 | String | Offer ID。 参数校验规则:最小长度1,最大长度100000。 |
| 参数 | 是否必选 | 参数类型 | 描述 |
|---|---|---|---|
| offset | 否 | Integer | 偏移量,表示从此偏移量开始查询,offset大于等于0。
|
| limit | 否 | Integer | 每页显示条目数量,最大数量999,超过999后只返回999(防止单页返回过大)。
|
请求参数
| 参数 | 是否必选 | 参数类型 | 描述 |
|---|---|---|---|
| X-Auth-Token | 是 | String | 用户Token。通过调用IAM服务“获取用户Token”接口获取(响应消息头中X-Subject-Token的值)。 |
响应参数
状态码: 200
| 参数 | 参数类型 | 描述 |
|---|---|---|
| data | Array of OfferResourceDetail objects | 返回数据。 |
| total | Long | 总数。 |
| error_code | String | 错误码。 |
| error_msg | String | 错误描述。 |
| 参数 | 参数类型 | 描述 |
|---|---|---|
| resource_id | String | 资源ID。 |
| resource_title | String | 资源名称。 |
| resource_type | String | 资源的文件类型。 |
| resource_category | String | 资源分类:
枚举值:
|
| artifacts | Array of Artifact objects | 数据清单。 |
| resource_dataset_attribute_list | Array of ResourceDatasetAttribute objects | 数据集资源属性列表。 |
| 参数 | 参数类型 | 描述 |
|---|---|---|
| data_resource_id | String | 所属资源ID。 |
| artifact_id | String | 资产ID。 |
| artifact_code | String | 资产编码。 |
| artifact_title | String | 文件名称。 |
| byte_size | Long | 文件大小。 |
| media_type | String | 资产格式类型。 |
| 参数 | 参数类型 | 描述 |
|---|---|---|
| attribute_code | String | 属性编码。 |
| attribute_data_type | String | 数据类型。 |
| length | Integer | 长度。 |
| num_prec | Integer | 精度。 |
| num_scale | Integer | 位数。 |
| sort_order | Integer | 排序号。 |
| real_data_type | String | 属性真实数据类型。 |
状态码: 400
| 参数 | 参数类型 | 描述 |
|---|---|---|
| data | Object | 返回数据。 |
| total | Long | 总数。 |
| error_code | String | 错误码。 |
| error_msg | String | 错误描述。 |
状态码: 500
| 参数 | 参数类型 | 描述 |
|---|---|---|
| data | Object | 返回数据。 |
| total | Long | 总数。 |
| error_code | String | 错误码。 |
| error_msg | String | 错误描述。 |
请求示例
查询指定offer资源列表(指定连接器)。
GET https://{endpoint}/v1/{project_id}/eds/instances/{instance_id}/connectors/{connector_id}/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 |
错误码
请参见错误码。