列表 - 数据扩充 API

运行 GET 或 POST 请求,提取与指定筛选器匹配的 IP 范围列表。

HTTP 请求

GET /api/v1/subnet/
POST /api/v1/subnet/

请求正文参数

参数 说明
filters 使用请求的所有搜索筛选器来筛选对象,有关更多详细信息,请参阅 IP 范围筛选器
SortDirection 排序方向。 可能值为:ascdesc
sortField 用于对 IP 范围进行排序的字段。 可能的值为:
- “类别”:IP 范围的类别
- “标记”:IP 范围的标记
- “名称”:IP 范围的名称
skip 跳过指定数量的记录
limit 请求返回的最大记录数

示例

请求

以下是一个请求示例。

curl -XPOST -H "Authorization:Token <your_token_key>" -H "Content-Type: application/json" "https://<tenant_id>.<tenant_region>.portal.cloudappsecurity.com/api/v1/subnet/" -d '{
  "filters": {
    // some filters
  },
  "skip": 5,
  "limit": 10
  // ...
}'

响应

返回 JSON 格式的 IP 范围列表。 有关响应字段的详细信息,请参阅属性

{
  "total": 1 // total number of records
  "hasNext": false // whether there is more data to show or not.
  "data": [
    {
      // returned records
      "_id": "5fd767259cd24bb563567d7c",
      "name": "range name",
      "subnets": [
        {
          "mask": 112,
          "address": "0000:0000:0000:0000:0000:ffff:c5c6:0000",
          "originalString": "197.198.192.20/16"
        }
      ],
      "location": {
        "name": "United States",
        "latitude": 39.5035514831543,
        "longitude": -99.01830291748047,
        "countryCode": "US",
        "countryName": "United States"
      },
      "organization": "isp name",
      "tags": [
        {
          "_id": "5ce2aaf42207ad108c76fa3a",
          "id": "000000290000000000000000",
          "target": 1,
          "type": 2,
          "name": "Contoso",
          "nameTemplate": {
            "template": "SAGE_BUILTIN_TAG_CONTOSO_NAME"
          },
          "description": "IP addresses used by Contoso",
          "descriptionTemplate": {
            "template": "SAGE_BUILTIN_TAG_CONTOSO_DESCRIPTION"
          },
          "visibility": 0,
          "status": 0,
          "_tid": 113348336
        }
      ],
      "category": 5,
      "lastModified": 1607952165309.8032,
      "_tid": 113348336
    }
  ]
}

如果遇到任何问题,我们可随时提供帮助。 要获取产品问题的帮助或支持,请开立支持票证