Help Center/ SecMaster/ API Reference/ API/ Alert Rule Management/ Total number of alert rules
Updated on 2024-12-25 GMT+08:00

Total number of alert rules

Function

List alert rule metrics

Calling Method

For details, see Calling APIs.

URI

GET /v1/{project_id}/workspaces/{workspace_id}/siem/alert-rules/metrics

Table 1 Path Parameters

Parameter

Mandatory

Type

Description

project_id

Yes

String

Project ID. Project ID.

workspace_id

Yes

String

Workspace ID. Workspace ID.

Request Parameters

Table 2 Request header parameters

Parameter

Mandatory

Type

Description

X-Auth-Token

Yes

String

User token. You can obtain the token by calling the IAM API used to obtain a user token. Token of an IAM user. To obtain it, call the corresponding IAM API.

Response Parameters

Status code: 200

Table 3 Response header parameters

Parameter

Type

Description

X-request-id

String

This field is the request ID number for task tracking. Format is request_uuid-timestamp-hostname.

Table 4 Response body parameters

Parameter

Type

Description

category

String

Indicator type and number of groups. Metric category. GROUP_COUNT.

metric

Map<String,Number>

Indicator value. Metric value.

Status code: 400

Table 5 Response header parameters

Parameter

Type

Description

X-request-id

String

This field is the request ID number for task tracking. Format is request_uuid-timestamp-hostname.

Example Requests

None

Example Responses

Status code: 200

Success

  • Example 1

    {
      "category" : {
        "GROUP_COUNT" : null
      },
      "metric" : null
    }
  • Example 2

    {
      "category" : "GROUP_COUNT",
      "metric" : {
        "ENABLED" : 8,
        "DISABLED" : 2
      }
    }

Status Codes

Status Code

Description

200

Success

400

Bad Request

Error Codes

See Error Codes.