主机安全服务(新版)HSS-镜像仓库镜像批量扫描:请求示例

时间:2023-12-25 17:37:40

请求示例

  • 类型为私有镜像的镜像进行批量扫描,body体传参镜像列表,operate_all没有传参,说明需要镜像列表批量扫描。

    POST https://{endpoint}/v5/{project_id}/image/batch-scan
    
    {
      "image_type" : "private_image",
      "image_info_list" : [ {
        "image_name" : "openjdk",
        "image_version" : "v8.8",
        "namespace" : "test"
      }, {
        "image_name" : "openjdk1",
        "image_version" : "v1.0",
        "namespace" : "test1"
      } ]
    }
  • 类型为私有镜像的镜像进行全量扫描,body体没有传参镜像列表,operate_all=true,说明需要镜像列表全量扫描。

    POST https://{endpoint}/v5/{project_id}/image/batch-scan
    
    {
      "image_type" : "private_image",
      "operate_all" : true
    }
support.huaweicloud.com/api-hss2.0/BatchScanSwrImage.html