更新时间:2024-04-01 GMT+08:00
分享

导出元数据

功能介绍

导出数据表的元数据,即将数据表的各个字段信息导出,但不包含具体的数据记录。导出完成后,可根据得到的定时任务id,查看该任务的执行情况。

URI

POST AstroZero域名/u-route/baas/bulk/v1.0/export/schema?flag={template}

表1 路径参数

参数

是否必选

描述

flag

当前支持的flag为template。当“flag=template”时,需通过templateName同时指定需要使用的模板名称。

请求参数

表2 请求参数

参数

是否必选

参数类型

描述

encodeType

String

元数据导出文件的编码格式。

  • utf-8:utf-8编码
  • gbk:GBK编码

firstScheduleDate

String

首次执行时间,格式为“yyyy-MM-dd HH:mm:ss”

  • scheduleMode=2时,必选。
  • scheduleMode=1时,与isImmediate互斥。

objects

Array of Strings

一个字符串数组,每一项为一个希望导出元数据的对象名称。

scheduleMode

Number

导出模式。

  • 1:仅执行一次
  • 2:按设定频率执行

intervalUnit

String

执行间隔单位,“scheduleMode=2”时必选,可选值及其意义如下:

  • Hour:小时
  • Day:天
  • Month:月

scheduleInterval

Number

执行间隔,为一数值,“scheduleMode=2”时必选。

isImmediate

Boolean

是否立即导出,“scheduleMode=1”时可选,“scheduleMode=1”时与firstScheduleDate互斥。

templateName

String

需要使用的模板名称,与查询参数中的flag配合使用,“flag=template”必选。

响应参数

表3 响应参数

参数

参数类型

描述

resCode

String

返回码,如果返回“0”代表请求成功,其他错误码说明请参考错误码

resMsg

String

返回消息,如果成功状态,通常会返回“Success”,其他情况会返回具体的错误信息。

result

String

创建成功的记录ID,成功时返回。

请求示例

该请求导出对象表Lead和PortalUser中的元数据。
POST https://AstroZero域名/u-route/baas/bulk/v1.0/export/schema
 
{
    "scheduleMode":1,
    "taskStatus":"Active",
    "firstScheduleDate":"2020-06-02 00:00:00",
    "encodeType":"gbk",
    "objects":["Lead","PortalUser"]
}

响应示例

{
    "resCode": "0",
    "resMsg": "成功",
    "result": "1234567890abcdefg"
}

状态码

状态码请参见状态码

错误码

错误码请参见错误码

分享:

    相关文档

    相关产品