API 文档
文档目录
    加载中
文档中心 API 文档 获取任务详情

获取任务详情

注意:本页面提供 API 文档为 DNSPod 传统 API ,仅支持 DNSPod Token。仅限主账号调用,子账号不可用。 推荐使用 腾讯云 API 3.0 ,支持 CAM 权限管理,同时支持主账号、子账号调用。兼容腾讯云 API 密钥,提供 API Explorer、API 调用统计等工具,还可以与腾讯云其他产品更好协同使用。

1. 接口描述

本接口 Batch.Detail 获取任务详情。
接口请求地址:https://dnsapi.cn/Batch.Detail
HTTP请求方式:POST

2. 请求参数

以下请求参数列表仅列出了接口请求参数,正式调用时需要加上公共请求参数,见 公共请求参数 页面。

参数名 是否必须 类型 参数描述
job_id Integer 任务ID。

3. 响应代码

以下请求参数列表仅列出了此接口请求响应代码,除此接口请求响应代码外。还包含 共通返回

响应码 描述
8 数据为空,没有查到该任务。

4. 示例

curl -X POST https://dnsapi.cn/Batch.Detail -d 'login_token=LOGIN_TOKEN&format=json&job_id=409752'

返回示例如下:

  • JSON:
{
    "status": {
        "code": "1",
        "message": "Action completed successful",
        "created_at": "2015-09-08 18:37:01"
    },
    "detail": [
        {
            "id": 0,
            "domain": "dnsapi1.cn",
            "domain_grade": "DP_Free",
            "err_msg": null,
            "status": "ok",
            "operation": "plus",
            "records": [
                {
                    "id": 0,
                    "sub_domain": "www",
                    "record_type": "A",
                    "area": "默认",
                    "value": "11.22.33.45",
                    "ttl": 600,
                    "err_msg": null,
                    "status": "ok",
                    "operation": "plus",
                    "record_id": 118332371,
                    "mx": null
                },
                {
                    "id": 1,
                    "sub_domain": "@",
                    "record_type": "A",
                    "area": "默认",
                    "value": "11.22.33.45",
                    "ttl": 600,
                    "err_msg": null,
                    "status": "ok",
                    "operation": "plus",
                    "record_id": 118332372,
                    "mx": null
                }
            ],
            "domain_id": "25562928"
        },
        {
            "id": 1,
            "domain": "dnsapi2.cn",
            "domain_grade": "DP_Free",
            "err_msg": null,
            "status": "ok",
            "operation": "plus",
            "records": [
                {
                    "id": 0,
                    "sub_domain": "www",
                    "record_type": "A",
                    "area": "默认",
                    "value": "11.22.33.45",
                    "ttl": 600,
                    "err_msg": null,
                    "status": "ok",
                    "operation": "plus",
                    "record_id": 118332377,
                    "mx": null
                },
                {
                    "id": 1,
                    "sub_domain": "@",
                    "record_type": "A",
                    "area": "默认",
                    "value": "11.22.33.45",
                    "ttl": 600,
                    "err_msg": null,
                    "status": "ok",
                    "operation": "plus",
                    "record_id": 118332378,
                    "mx": null
                }
            ],
            "domain_id": "25562929"
        }
    ],
    "total": 6,
    "success": 6,
    "fail": 0,
    "type": "domain",
    "created_at": "2015-09-08 18:36:43"
}
  • 字段说明:
  • detail.status 和 detail.records.status 对应 [‘error’,’ok’,’running’,’waiting’] 中的一种,分别代表出错、执行成功、正在执行中、等待执行,如果为 “error”,则在 err_msg 中会有错误信息。
  • total: 执行的总条数,单个域名、单个记录均计数为1。
  • success: 成功的条数。
  • fail: 失败的条数。
  • type: 对应 [‘domain’,’record_add’,’record_modify’] 中的一种,分别代表批量添加域名、批量添加记录、批量修改记录。
最近更新于 2022-01-24 11:45

DNSPod 域名检测工具

查询域名信息,快速排查网站问题

网站自助排障

快速判断问题、提供合适的解决方案