获取请求列表 |文档 | IP 地理定位批量API | WhoisXML API

获取请求列表

地址 https://ip-geolocation.whoisxmlapi.com/api/bgservice/request/list

CURL 请求示例

curl https://ip-geolocation.whoisxmlapi.com/api/bgservice/request/list -X POST -H "Content-Type: application/json"  -d '{"apiKey": "YOUR_API_KEY", "page": 1, "onlyIds": false, "perPage": 10, "sort": "desc", "format": "json"}'

POST 请求正文示例

{
    "apiKey": "YOUR_API_KEY",
    "page": 1,
    "format": "json",
    "onlyIds": false,
    "perPage": 10,
    "sort": "desc"
}

输入参数

apiKey

必填。在“我的产品”页面获取您的个人 API KEY。

page

选填。整数。

用于与'perPage'一起对结果集进行分页。

默认值:1。

onlyIds

选填。布尔值。

如果为真,则仅返回 ID 列表。

默认值:真。

perPage

选填。整数。

将结果集的每一页限制为该请求数。

最小值:10;最大值:50。

默认值:10

sort

选填。String。

指定响应中请求的顺序。

允许值:“asc”、“desc”。

默认值:“描述”。

format

选填。String。

用于指定响应格式。

允许值:“xml”、“json”、“csv”。

默认值:“json”。

示例输出

{
    "response": {
        "current_page": 1,
        "data": [
            {
                "id": 596
            },
            {
                "id": 595
            },
            {
                "id": 544
            }
        ],
        "from": 1,
        "last_page": 1,
        "per_page": 10,
        "to": 3,
        "total": 3
    }
}

Code: 200 OK.
{
    "response": {
        "current_page": 1,
        "data": [
            {
                "id": 596,
                "date_start": "1528377253",
                "total_terms": 3,
                "invalid_terms": 0,
                "processed_terms": 3,
                "failed_terms": 0,
                "ready": 1
            },
            {
                "id": 595,
                "date_start": "1528377227",
                "total_terms": 20,
                "invalid_terms": 0,
                "processed_terms": 20,
                "failed_terms": 0,
                "ready": 1
            },
            {
                "id": 544,
                "date_start": "1528204702",
                "total_terms": 500,
                "invalid_terms": 0,
                "processed_terms": 500,
                "failed_terms": 0,
                "ready": 1
            }
        ],
        "from": 1,
        "last_page": 1,
        "per_page": 10,
        "to": 3,
        "total": 3
    }
}

Code: 200 OK.

输入参数

response

响应对象。

包含带有用户请求成功数据数组的“数据”字段。

'from''to'字段表示为当前页面返回的请求的结果 ID 范围。

'per_page'是页面的大小, 'total'是结果中的请求数量。

'current_page''last_page'对应结果中的页数。

如果出现错误,它会在“错误”字段中包含其描述。如果有多个错误,它们的描述将返回到“错误”数组中。

data

Array

用户请求的信息元素列表(如果'onlyIds'true ,则每个元素只有'id'字段)。

data[k].id

响应对象。

请求 ID。

data[k].date_start

String

请求的开始 Unix 时间戳的字符串表示。

data[k].total_terms

整数。

请求中的术语(IP、电子邮件、域名)总数。

data[k].invalid_terms

整数。

无效条款的数量。

data[k].processed_terms

整数。

已处理的术语数量。

data[k].failed_terms

整数。

无法处理的术语数量。

data[k].ready

整数。

如果处理已完成,则为 1,否则为 0。

from

整数。

当前数据页面中的请求ID。

to

整数。

最大限度。数据集当前页面中的请求ID。

per_page

整数。

最大限度。结果集每页的请求数量。

total

整数。

结果集中的请求总数。

current_page

整数。

结果集中的当前页码。

last_page

整数。

集合中最后一页的页码。

error

String

错误描述。

errors

Array

多条错误信息。