文档首页/ 安全云脑 SecMaster/ API参考/ API/ 基线检查/ 搜索基线检查结果列表
更新时间:2024-10-22 GMT+08:00

搜索基线检查结果列表

功能介绍

搜索基线检查结果列表

调用方法

请参见如何调用API

URI

POST /v2/{project_id}/workspaces/{workspace_id}/sa/baseline/search

表1 路径参数

参数

是否必选

参数类型

描述

project_id

String

项目id

最小长度:32

最大长度:36

workspace_id

String

工作空间id

最小长度:32

最大长度:36

请求参数

表2 请求Header参数

参数

是否必选

参数类型

描述

X-Auth-Token

String

用户token

最小长度:1

最大长度:2097152

X-Language

String

语言,参考值:zh-cn、en-us

最小长度:2

最大长度:6

content-type

String

内容类型

缺省值:application/json;charset=UTF-8

最小长度:0

最大长度:64

表3 请求Body参数

参数

是否必选

参数类型

描述

limit

Integer

分页大小

最小值:0

最大值:1000

offset

Integer

偏移量,表示查询该偏移量后面的记录

最小值:0

最大值:1000

sort_by

String

排序关键字

最小长度:0

最大长度:1000

order

String

降序或升序, DESC|ESC

最小长度:0

最大长度:1000

from_date

String

起始时间,格式ISO8601:YYYY-MM-DDTHH:mm:ss.ms+timezone。时区信息为事件发生时区,无法解析时区的时间,默认时区填东八区

最小长度:0

最大长度:64

to_date

String

截止时间,格式ISO8601:YYYY-MM-DDTHH:mm:ss.ms+timezone。时区信息为事件发生时区,无法解析时区的时间,默认时区填东八区

最小长度:0

最大长度:64

condition

Object

搜索条件表达式

最小长度:0

最大长度:1024

响应参数

状态码: 200

表4 响应Body参数

参数

参数类型

描述

code

String

错误码

最小长度:0

最大长度:64

total

Integer

查询结果总数

最小值:0

最大值:100000

size

Integer

分页大小

最小值:0

最大值:500

page

Integer

偏移量

最小值:0

最大值:100000

success

Boolean

是否成功

data

Array of strings

查询结果列表

最小长度:0

最大长度:64

数组长度:0 - 100

状态码: 400

表5 响应Body参数

参数

参数类型

描述

code

String

错误码

最小长度:0

最大长度:64

message

String

错误描述

最小长度:0

最大长度:1024

状态码: 401

表6 响应Body参数

参数

参数类型

描述

code

String

错误码

最小长度:0

最大长度:64

message

String

错误描述

最小长度:0

最大长度:1024

状态码: 500

表7 响应Body参数

参数

参数类型

描述

code

String

错误码

最小长度:0

最大长度:64

message

String

错误描述

最小长度:0

最大长度:1024

请求示例

查询基线检查结果的列表请求样例,查询2024年6月20号到2024年6月27号,遵从包ID为6add7d71-2261-4195-bab7-8ada0f0ed4d2,目录ID为0b78937f-4d9b-4223-9a46-2361e5090be0, 资源类型为iam_user, 按照最近更新时间降序排序,返回第一页,每页10条数据

{
  "limit" : 10,
  "offset" : 0,
  "sort_by" : "last_observed_time",
  "order" : "DESC",
  "from_date" : "2024-06-20T00:00:00.000Z",
  "to_date" : "2024-06-27T23:59:59.999Z",
  "condition" : {
    "conditions" : [ {
      "name" : "compliance_package_id",
      "data" : [ "compliance_package_id", "=", "6add7d71-2261-4195-bab7-8ada0f0ed4d2" ]
    }, {
      "name" : "catalog_id",
      "data" : [ "catalog_id", "=", "0b78937f-4d9b-4223-9a46-2361e5090be0" ]
    }, {
      "name" : "resource.type",
      "data" : [ "resource.type", "=", "iam_user" ]
    } ],
    "logics" : [ "compliance_package_id", "AND", "catalog_id", "AND", "resource.type" ]
  }
}

响应示例

状态码: 200

请求成功

{
  "code" : "00000000",
  "data" : [ {
    "create_time" : "2024-01-03T01:16:21.666+08:00",
    "data_object" : {
      "arrive_time" : "2024-01-03T11:28:03.993Z+0800",
      "baseline_type" : {
        "baseline_type" : "合规检查",
        "baseline_type_en" : "Compliance Check",
        "baseline_type_zh" : "合规检查",
        "category" : "",
        "category_en" : "",
        "category_zh" : "",
        "id" : "23f48a58cXXX162846076cd0"
      },
      "catalog_id" : "9378d1e8-XXX-4aae-XXX-c41cf6829ede",
      "checkitem_id" : "13fcc967-cb49-XXX-811a-9f72ce6ce8ac",
      "compliance_package_id" : "39488f96-XXX-4cc6-XXX-ad3c29b3a6c2",
      "create_time" : "2024-01-02T17:16:21.666Z+0800",
      "data_source" : {
        "company_name" : "xxxxxx",
        "domain_id" : "ac7438b990efXXXb45e8bf4",
        "product_feature" : "SA",
        "product_module" : "Base-line",
        "product_name" : "SecMaster",
        "project_id" : "15645222e8XXX93dab6341da6",
        "region_id" : "cn-north-7",
        "source_type" : 1
      },
      "dataclass_id" : "f846c8e0-XXX-XXX-bcbf-f77190847f08",
      "domain_id" : "ac7438b990eXXX1004eb45e8bf4",
      "domain_name" : "ac7438b99XXX1004eb45e8bf4",
      "end_time" : "2024-01-03T11:28:51.564Z+0800",
      "execitem_id" : "ca2a1361-5738-479c-8c40-d078e775a23a",
      "execitem_version" : 1,
      "first_observed_time" : "2024-01-03T11:28:50.955Z+0800",
      "handle_status" : "qualified",
      "id" : "39c56d70a9c2492XXXd91934cb5cb_13fcc967-XXX-494b-XXX-9f72ce6ce8ac",
      "is_deleted" : false,
      "last_observed_time" : "2024-01-03T11:28:51.564Z+0800",
      "method" : 1,
      "origin_id" : "",
      "project_id" : "15645222e874XXX93dab6341da6",
      "region_id" : "cn-north-7",
      "region_name" : "cn-north-7",
      "resource" : {
        "domain_id" : "ac7438b990eXXX04eb45e8bf4",
        "id" : "39c56d70a9cXXX1934cb5cb",
        "name" : "adfasd",
        "project_id" : "15645222XXXc93dab6341da6",
        "provider" : "xxxxxx",
        "region_id" : "cn-north-7",
        "type" : "agency"
      },
      "severity" : "informational",
      "start_time" : "2024-01-03T11:28:50.955Z+0800",
      "task_id" : "10da8403-XXX-442d-XXX-fa2fdf42a3a1",
      "title" : "项目服务中的委托权限配置检查",
      "trigger_flag" : false,
      "update_time" : "2024-01-03T11:28:51.887Z+0800",
      "workspace_id" : "1350a050-XXX-45e2-XXX-9cbfef116de7"
    },
    "dataclass_ref" : {
      "id" : "f846c8e0-XXX-3767-XXX-f77190847f08"
    },
    "format_version" : 0,
    "id" : "39c56d7XXX278fXXX934cb5cb_13fcc967-cb49-XXX-811a-9f72ce6ce8ac",
    "update_time" : "2024-01-03T19:28:51.887+08:00",
    "version" : 0
  }, {
    "create_time" : "2024-01-03T01:16:21.821+08:00",
    "data_object" : {
      "arrive_time" : "2024-01-03T11:28:03.993Z+0800",
      "baseline_type" : {
        "baseline_type" : "合规检查",
        "baseline_type_en" : "Compliance Check",
        "baseline_type_zh" : "合规检查",
        "category" : "",
        "category_en" : "",
        "category_zh" : "",
        "id" : "23f48a58c5b2fXXX162846076cd0"
      },
      "catalog_id" : "9378d1e8-XXX-4aae-XXX-c41cf6829ede",
      "checkitem_id" : "13fcc967-cb49-XXX-811a-9f72ce6ce8ac",
      "compliance_package_id" : "39488f96-XXX-4cc6-XXX-ad3c29b3a6c2",
      "create_time" : "2024-01-02T17:16:21.821Z+0800",
      "data_source" : {
        "company_name" : "xxxxxx",
        "domain_id" : "ac7438b990efXXX004eb45e8bf4",
        "product_feature" : "SA",
        "product_module" : "Base-line",
        "product_name" : "SecMaster",
        "project_id" : "15645222XXX5c93dab6341da6",
        "region_id" : "cn-north-7",
        "source_type" : 1
      },
      "dataclass_id" : "f846c8e0-XXX-3767-bcbf-f77190847f08",
      "domain_id" : "ac7438b990eXXXb741004eb45e8bf4",
      "domain_name" : "ac7438bXXX37b741004eb45e8bf4",
      "end_time" : "2024-01-03T11:28:51.701Z+0800",
      "execitem_id" : "ca2a1361-XXX-479c-XXX-d078e775a23a",
      "execitem_version" : 1,
      "first_observed_time" : "2024-01-03T11:28:51.565Z+0800",
      "handle_status" : "qualified",
      "id" : "f295575ab57XXX977d9be93ca9fe_13fcc967-XXX-494b-XXX-9f72ce6ce8ac",
      "is_deleted" : false,
      "last_observed_time" : "2024-01-03T11:28:51.701Z+0800",
      "method" : 1,
      "origin_id" : "",
      "project_id" : "15645222e8XXXa985c93dab6341da6",
      "region_id" : "cn-north-7",
      "region_name" : "cn-north-7",
      "resource" : {
        "domain_id" : "ac7438b99XXX1004eb45e8bf4",
        "id" : "f295575ab57bXXXd9be93ca9fe",
        "name" : "apigw_admin_trust_secmaster",
        "project_id" : "15645222e8XXX93dab6341da6",
        "provider" : "xxxxxx",
        "region_id" : "cn-north-7",
        "type" : "agency"
      },
      "severity" : "informational",
      "start_time" : "2024-01-03T11:28:51.565Z+0800",
      "task_id" : "10da8403-4955XXXd-a974-faXXX2a3a1",
      "title" : "项目服务中的委托权限配置检查",
      "trigger_flag" : false,
      "update_time" : "2024-01-03T11:28:52.023Z+0800",
      "workspace_id" : "1350a050-d09a-4XXX-9503-9cbfef116de7"
    },
    "dataclass_ref" : {
      "id" : "f846c8e0-cf0e-XXX-bcbf-XXX7f08"
    },
    "format_version" : 0,
    "id" : "f295575ab57b49XXXe93ca9fe_13fcc967-XXX-494b-XXX-9f72ce6ce8ac",
    "update_time" : "2024-01-03T19:28:52.023+08:00",
    "version" : 0
  } ],
  "page" : 0,
  "size" : 10,
  "success" : true,
  "total" : 2
}

状态码: 400

请求失败

{
  "error_code" : "SecMaster.00040006",
  "error_msg" : "Invalid request parameters"
}

状态码: 401

权限不足

{
  "error_code" : "SecMaster.90010015",
  "error_msg" : "Unauthorized request"
}

状态码: 500

请求失败

{
  "error_code" : "SecMaster.00040011",
  "error_msg" : "Internal system error."
}

状态码

状态码

描述

200

请求成功

400

请求失败

401

权限不足

500

请求失败

错误码

请参见错误码