Error:
An unexpected error occurred. Please click Reload to try again.
Error:
An unexpected error occurred. Please click Reload to try again.
为什么API查询到EDL只返回 100 个条目而不是整个列表? - Knowledge Base - Palo Alto Networks

为什么API查询到EDL只返回 100 个条目而不是整个列表?

5709
Created On 09/28/20 07:31 AM - Last Modified 03/02/23 05:36 AM


Question


为什么API查询到EDL只返回 100 个条目而不是整个列表?

细节
  • PAN-OS 升级到 9.0.x
  • API 查询列表EDL仅返回 100 个条目
  • 相同的查询将返回 8.1.x 上的所有条目


Environment


  • 帕洛阿尔托防火墙
  • PAN-OS 升级到 9.0.x
  • 外部动态列表 (EDL ) 配置。


Answer


  1. 默认查询在PAN-OS9.0.x 将仅返回 100 个条目。
  2. 要获取特定数量的条目,请使用 newly introduced条记录范围
  3. 这是类似的行为CLI命令也是如此。 见下文。
request system external-list show type predefined-ip name panw-known-ip-list

panw-known-ip-list
        Total valid entries     : 614
        Total ignored entries   : 0
        Total invalid entries   : 0
        Total displayed entries : 100
新参数“条记录" 可用于自定义显示条目的数量。
request system external-list show type predefined-ip num-records 500 name panw-known-ip-list

panw-known-ip-list
        Total valid entries     : 614
        Total ignored entries   : 0
        Total invalid entries   : 0
        Total displayed entries : 500
  1. 可以使用相同的参数API通过添加 <num-records>x</num-records> 进行查询,其中 x 是编号。所需的条目。
例子API没有 num 记录的调用:
https://NGFW-IP/api/?type=op&cmd=<request><system><external-list><show><type><predefined-ip><name>panw-known-ip-list</name></predefined-ip></type></show></external-list></system></request>&key=key
 
没有 NumRecord 的 XMLAPI 调用

API 使用 num 记录调用 500 个条目
https://NGFW-IP/api/?type=op&cmd=<request><system><external-list><show><type><predefined-ip><num-records>500</num-records><name>panw-known-ip-list</name></predefined-ip></type></show></external-list></system></request>&key=key
XMLAPICallwithNumRecord
 


Actions
  • Print
  • Copy Link

    https://knowledgebase.paloaltonetworks.com/KCSArticleDetail?id=kA14u000000HAuUCAW&lang=zh_CN&refURL=http%3A%2F%2Fknowledgebase.paloaltonetworks.com%2FKCSArticleDetail

Choose Language