Search Baseline Check Results
Function
This API is used to search baseline check results.
Calling Method
For details, see Calling APIs.
URI
POST /v2/{project_id}/workspaces/{workspace_id}/sa/baseline/search
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
project_id |
Yes |
String |
Project ID. Minimum: 32 Maximum: 36 |
workspace_id |
Yes |
String |
Workspace ID. Minimum: 32 Maximum: 36 |
Request Parameters
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
X-Auth-Token |
Yes |
String |
User token. Minimum: 1 Maximum: 2097152 |
X-Language |
Yes |
String |
Language. The values are zh-CN and en-US. Minimum: 2 Maximum: 6 |
content-type |
Yes |
String |
Content type. Default: application/json;charset=UTF-8 Minimum: 0 Maximum: 64 |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
limit |
No |
Integer |
Page size. Minimum: 0 Maximum: 1000 |
offset |
No |
Integer |
Offset. The records after this offset will be queried. Minimum: 0 Maximum: 1000 |
sort_by |
No |
String |
Sorting keyword. Minimum: 0 Maximum: 1000 |
order |
No |
String |
Descending or ascending order, the value is DESC or ESC. Minimum: 0 Maximum: 1000 |
from_date |
No |
String |
Start time. The format is ISO 8601: YYYY-MM-DDTHH:mm:ss.ms+Time zone. Time zone refers to where the incident occurred. If this parameter cannot be parsed, the default time zone GMT+8 is used. Minimum: 0 Maximum: 64 |
to_date |
No |
String |
End time. The format is ISO 8601: YYYY-MM-DDTHH:mm:ss.ms+Time zone. Time zone refers to where the incident occurred. If this parameter cannot be parsed, the default time zone GMT+8 is used. Minimum: 0 Maximum: 64 |
condition |
No |
Object |
Search condition expression. Minimum: 0 Maximum: 1024 |
Response Parameters
Status code: 200
Parameter |
Type |
Description |
---|---|---|
code |
String |
Error code Minimum: 0 Maximum: 64 |
total |
Integer |
Total number of queried records. Minimum: 0 Maximum: 100000 |
size |
Integer |
Page size. Minimum: 0 Maximum: 500 |
page |
Integer |
Offset. Minimum: 0 Maximum: 100000 |
success |
Boolean |
Successful or not. |
data |
Array of strings |
List of searching result. Minimum: 0 Maximum: 64 Array Length: 0 - 100 |
Status code: 400
Parameter |
Type |
Description |
---|---|---|
code |
String |
Error Code Minimum: 0 Maximum: 64 |
message |
String |
Error Description Minimum: 0 Maximum: 1024 |
Status code: 401
Parameter |
Type |
Description |
---|---|---|
code |
String |
Error Code Minimum: 0 Maximum: 64 |
message |
String |
Error Description Minimum: 0 Maximum: 1024 |
Status code: 500
Parameter |
Type |
Description |
---|---|---|
code |
String |
Error Code Minimum: 0 Maximum: 64 |
message |
String |
Error Description Minimum: 0 Maximum: 1024 |
Example Requests
Query the request example of baseline check results. The time ranges from June 20, 2024 to June 27, 2024. The compliance package ID is 6add7d71-2261-4195-bab7-8ada0f0ed4d2. The directory ID is 0b78937f-4d9b-4223-9a46-2361e5090be0. The resource type is iam_user. The results are sorted in descending order of the update time. Each page contains 10 records.
{ "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" ] } }
Example Responses
Status code: 200
Request successful.
{ "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" : "Compliance Check", "baseline_type_en" : "Compliance Check", "baseline_type_zh" : "Compliance Check", "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" : "Agency Permissions for Project Services", "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" : "Compliance check", "baseline_type_en" : "Compliance Check", "baseline_type_zh" : "Compliance check", "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" : "Agency Permissions for Project Services", "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 }
Status code: 400
Request failed.
{ "error_code" : "SecMaster.00040006", "error_msg" : "Invalid request parameters" }
Status code: 401
Insufficient permissions.
{ "error_code" : "SecMaster.90010015", "error_msg" : "Unauthorized request" }
Status code: 500
Request failed.
{ "error_code" : "SecMaster.00040011", "error_msg" : "Internal system error." }
Status Codes
Status Code |
Description |
---|---|
200 |
Request successful. |
400 |
Request failed. |
401 |
Insufficient permissions. |
500 |
Request failed. |
Error Codes
See Error Codes.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot