更新时间:2024-03-15 GMT+08:00
分享

查询应用模板列表

功能介绍

查询应用模板列表。

URI

GET /v1/{project_id}/eds/instances/{instance_id}/connectors/{connector_id}/applications/templates

表1 路径参数

参数

是否必选

参数类型

描述

project_id

String

项目ID。

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

instance_id

String

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

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

connector_id

String

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

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

表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的值)。

响应参数

状态码: 200

表4 响应Body参数

参数

参数类型

描述

data

Array of ApplicationTemplate objects

返回数据。

total

Long

总数。

error_code

String

错误码。

error_msg

String

错误描述。

表5 ApplicationTemplate

参数

参数类型

描述

id

String

应用模板ID。

name

String

应用模板名称。

description

String

应用模板描述。

type

String

应用模板类型:

  • STRUCTURED:支持jdbc、csv下载
  • TRUSTED_ENV:支持可信环境下载
  • LOCAL_DOWN:支持本地下载
  • LUCKY_EXCEL:支持excel本地预览
  • UNSTRUCTURED:支持 obs sftp ftp下载
  • PDF_JS:支持pdf本地预览
  • STRUCTURED_VIEW:支持csv jdbc本地预览
  • WPS:wps应用
  • IMAGE_VIEWER:本地图片查看

枚举值:

  • STRUCTURED
  • TRUSTED_ENV
  • LOCAL_DOWN
  • LUCKY_EXCEL
  • UNSTRUCTURED
  • PDF_JS
  • STRUCTURED_VIEW
  • WPS
  • IMAGE_VIEWER

self

Boolean

资源是否是自己的。

natives

Boolean

是否内置应用, true内置,false自创。

operation

Array of strings

限制使用的操作。

枚举值:

  • VIEW
  • PROCESS
  • DOWNLOAD

status

String

状态:

  • NORMAL:正常使用状态
  • DISABLE:停用状态,不再分配给新的eds实例

枚举值:

  • NORMAL
  • DISABLE

icon

String

应用图标。

create_time

String

创建时间。

状态码: 400

表6 响应Body参数

参数

参数类型

描述

data

-

返回null

total

Long

总数。

error_code

String

错误码。

error_msg

String

错误描述。

状态码: 500

表7 响应Body参数

参数

参数类型

描述

data

-

返回null

total

Long

总数。

error_code

String

错误码。

error_msg

String

错误描述。

请求示例

查询应用模板列表。

GET https://{endpoint}/v1/{project_id}/eds/instances/{instance_id}/connectors/{connector_id}/applications/templates?offset=1&limit=10

响应示例

状态码: 200

OK

  • 应用模板列表。
    {
      "data" : [ {
        "id" : "234ac118-d58e-4324-9d41-************",
        "name" : "PDF_JS",
        "description" : "用于预览PDF文件,仅供测试",
        "type" : "PDF_JS",
        "self" : null,
        "natives" : true,
        "operation" : [ "VIEW" ],
        "status" : "NORMAL",
        "icon" : "icon: data:image/png;base64,iVBORw0KGgoAAAAN***          // ***代表省略的图标编码",
        "create_time" : "2023-05-23T21:37:02Z"
      }, {
        "id" : "234c118-758e-4324-9d41-************",
        "name" : "本地下载",
        "description" : "用于将文件下载到本地",
        "type" : "LOCAL_DOWN",
        "self" : null,
        "natives" : true,
        "operation" : [ "DOWNLOAD" ],
        "status" : "NORMAL",
        "icon" : "icon: data:image/png;base64,iVBORw0KGgoAAAAN***          // ***代表省略的图标编码",
        "create_time" : "2023-05-23T21:37:02Z"
      } ],
      "total" : 2,
      "error_code" : null,
      "error_msg" : null
    }

状态码

状态码

描述

200

OK

400

Bad Request

500

Internal Server Error

错误码

请参见错误码

分享:

    相关文档

    相关产品