You need to enable JavaScript to run this app.
导航

数据治理 OpenAPI

最近更新时间2023.04.13 15:58:36

首次发布时间2023.03.20 21:07:35

1.概述

本文档提供关于数据质量相关的开放能力介绍。
注:私有化4.4版本(含)后支持。

2.API 公共参数

Context-path: /datafinder

3.入库校验明细

3.1 API 定义

Path:openapi/v1/{app_id}/data_quality/audit_result
Method: GET
Content-type: application/json
Query-parameters:

ParameterTypeDescriptionRequired
start_timestampint查询开始时间的10位时间戳true
end_timestampint查询结束时间的10位时间戳true
page_sizeint每页数量,不得超过1000true
page_noint页码,从1开始true

3.2 OpenAPI SDK 使用样例

bc 为创建的 RangersClient, 其初始化请参考 “OpenAPI SDK 使用说明”, 各语言的 SDK 都提供了类似的接口

调用(Python):

res = bc.data_finder('/openapi/v1/10000005/data_quality/audit_result', params={"start_timestamp": "1678636800", "end_timestamp": "1679155200", "page_size": "1000", "page_no": "1"})
print(res.content)

返回结果:

{
    "code": 200,
    "message": "success",
    "data": {
        "data_item_list": [
            {
                "name": "test_server_mp1",
                "show_name": "test_server_mp1",
                "platform": "",
                "sdk_version": "",
                "accept_count": 0,
                "dropped_count": 3,
                "receive_count": 3,
                "param_exception_count": 0,
                "group_by_key": "test_server_mp1,,",
                "error_types": [
                    {
                        "error_code": "1010006",
                        "error_msg": "入库事件发生时间超出有效窗口期",
                        "count": 3
                    }
                ]
            }
        ],
        "page_no": 1,
        "page_size": 10,
        "total": 1
    }
}