共用方式為


清單 - 數據擴充 API

執行 GET 或 POST 要求,以擷取符合指定篩選條件的IP範圍清單。

HTTP 要求

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

要求 BODY 參數

參數 描述
篩選 篩選具有要求所有搜尋篩選的物件,請參閱 IP範圍篩選 以取得詳細數據
sortDirection 排序方向。 可能的值為: ascdesc
sortField 用來排序IP範圍的欄位。 可能的值包括:
- category:IP 範圍的類別
- 標記:IP 範圍的標籤
- name: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
    }
  ]
}

如果您遇到任何問題,我們會在這裡提供説明。 若要取得產品問題的協助或支援,請 開啟支援票證