获取列表项

编辑

使用其 id 或其 list_idvalue 字段检索列表项。

对于 ipip_range 列表容器,您可以检索最多 10,000 个列表项。

请求 URL

编辑

GET <kibana 主机>:<端口>/api/lists/items

URL 查询参数

编辑

URL 查询必须包含以下一项:

  • id - GET /api/lists/items?id=<id>
  • list_idvalue - GET /api/lists/items?list_id=<list_id>&value=<value>

示例请求

编辑

检索 idinternal-ip-address 的列表项

GET api/lists/items?id=internal-ip-excludes

检索 internal-ip-excludes 容器中 value10.0.0.1 的列表项

GET api/lists/items?list_id=internal-ip-excludes&value=10.0.0.1

使用 CIDR 表示法从 ip 容器检索列表项

GET api/lists/items?list_id=internal-ip-excludes&value=127.0.0.0/30

检索包含指定 IP 地址的 ip_range 容器中的列表项

GET api/lists/items?list_id=internal-ip-ranges&value=192.168.1.14

响应代码

编辑
200
表示调用成功。

响应负载

编辑
[
  {
    "created_at": "2020-08-11T11:22:13.669Z",
    "created_by": "elastic",
    "id": "aZdB3XMBx7pemMHopQ6L",
    "list_id": "internal-ip-excludes",
    "tie_breaker_id": "26115356-c2c2-4f1c-a4ed-19b81191775a",
    "type": "ip",
    "updated_at": "2020-08-11T11:22:13.669Z",
    "updated_by": "elastic",
    "value": "127.0.0.1"
  },
  {
    "created_at": "2020-08-11T11:22:13.669Z",
    "created_by": "elastic",
    "id": "apdB3XMBx7pemMHopQ6L",
    "list_id": "internal-ip-excludes",
    "tie_breaker_id": "fa247f45-bf8b-48bc-b89d-5191cba096e6",
    "type": "ip",
    "updated_at": "2020-08-11T11:22:13.669Z",
    "updated_by": "elastic",
    "value": "127.0.0.2"
  },
  {
    "created_at": "2020-08-11T11:22:13.670Z",
    "created_by": "elastic",
    "id": "a5dB3XMBx7pemMHopQ6L",
    "list_id": "internal-ip-excludes",
    "tie_breaker_id": "60edc3e4-9a79-4bff-b7dc-096b052797f8",
    "type": "ip",
    "updated_at": "2020-08-11T11:22:13.670Z",
    "updated_by": "elastic",
    "value": "127.0.0.3"
  }
]