华为云Astro轻应用-导出数据:请求示例

时间:2025-02-12 14:56:04

请求示例

  • 示例1
    如下请求创建了一个仅执行一次的数据导出任务,执行时间为2020-05-31 00:00:00,导出的文件格式为csv,编码格式为utf-8,需要导出的对象通过名为“myTemplate”的模板指定,未指定任何导出筛选条件。
    POST https://AstroZero 域名 /u-route/baas/bulk/v1.0/export/data?flag=template&file_type=csv{    "scheduleMode": 1,    "firstScheduleDate": "2020-05-31 00:00:00",    "encodeType": "utf-8",    "templateName": "myTemplate"}
  • 示例2
    如下请求创建了周期性执行的数据导出任务,首次执行时间为2020-06-01 00:00:00,往后每隔一个月执行一次,导出的文件格式为txt,编码格式为GBK,需要导出的对象以数组的形式列在objects中,同时设定筛选条件,仅导出创建者id(createBy)为“1234567890xyz”的数据。
    POST https://AstroZero域名/u-route/baas/bulk/v1.0/export/data?flag=template&file_type=txt{    "scheduleMode": 2,    "firstScheduleDate": "2020-06-01 00:00:00",    "scheduleInterval": 1,    "intervalUnit": "Month",    "templateName": "template01",    "encodeType": "gbk",    "objects": [        "Flow",        "Page"    ],    "cond": {        "conjunction": "AND",        "conditions": [            {                "field": "createdBy",                "operator": "eq",                "value": "1234567890xyz"            }        ]    }}
support.huaweicloud.com/api-astrozero/astrozero_api_0075.html