Help Center/ Cloud Firewall/ API Reference/ API/ Security report./ Obtaining a Security Report Template
Updated on 2025-08-12 GMT+08:00

Obtaining a Security Report Template

Function

This API is used to obtain a security report template.

Calling Method

For details, see Calling APIs.

URI

GET /v1/{project_id}/report-profile/{report_profile_id}

Table 1 Path Parameters

Parameter

Mandatory

Type

Description

project_id

Yes

String

Definition

Project ID, which is used to specify the project that an asset belongs to. You can query the assets of a project by project ID. You can obtain the project ID from the API or console. For details, see Obtaining a Project ID.

Constraints

N/A

Range

32-bit UUID.

Default Value

N/A

report_profile_id

Yes

String

Definition

Security report template ID.

Constraints

N/A

Range

32-bit UUID.

Default Value

N/A

Table 2 Query Parameters

Parameter

Mandatory

Type

Description

fw_instance_id

Yes

String

Definition

Firewall ID. It is a unique ID generated after a firewall instance is created. You can obtain the firewall ID by referring to Obtaining a Firewall ID.

Constraints

N/A

Range

32-bit UUID.

Default Value

N/A

Request Parameters

None

Response Parameters

Status code: 200

Table 3 Response body parameters

Parameter

Type

Description

data

ReportProfileInfoVO object

Table 4 ReportProfileInfoVO

Parameter

Type

Description

category

String

Definition

Report type.

Range

daily: daily report

weekly: weekly report

custom: custom report

description

String

Definition

Description.

Range

N/A

name

String

Definition

Template name.

Range

N/A

send_period

Integer

Definition

Sending time.

Range

N/A

send_week_day

Integer

Definition

Days in a week when data is sent.

Range

N/A

statistic_period

StatisticPeriod object

Definition

Statistical period, which needs to be set for custom reports.

Constraints

N/A

Range

N/A

Default Value

N/A

status

Integer

Definition

Enabling status.

Range

0: disabled; 1: enabled

topic_name

String

Definition

Notification topic name.

Range

N/A

topic_urn

String

Definition

Notification topic URN.

Range

N/A

subscription_type

Integer

Definition

Notification method.

Range

0: SMN notification; 1: no notification

Table 5 StatisticPeriod

Parameter

Type

Description

end_time

Long

Definition

End time.

Constraints

N/A

Range

Milliseconds-level timestamp.

Default Value

N/A

start_time

Long

Definition

End time.

Constraints

N/A

Range

Milliseconds-level timestamp.

Default Value

N/A

Status code: 400

Table 6 Response body parameters

Parameter

Type

Description

error_code

String

Definition

Error code.

Range

N/A

error_msg

String

Definition

Error message.

Range

N/A

Example Requests

Query the details about a security report template. The project ID is eb7accd78ea845078275b2ad5280a109, firewall ID is 8a996d43-75bd-48b4-b1b8-de0706b72b8f, and template ID is de068699-a2d6-4f3d-8e14-c0ac16ff364e.

https://{Endpoint}/v1/eb7accd78ea845078275b2ad5280a109/report-profile/de068699-a2d6-4f3d-8e14-c0ac16ff364e?fw_instance_id=8a996d43-75bd-48b4-b1b8-de0706b72b8f

Example Responses

Status code: 200

OK

{
  "data" : {
    "category" : "daily",
    "name" : "test",
    "send_period" : 16,
    "status" : 1,
    "topic_name" : "test",
    "topic_urn" : "urn:smn:cn-north-4:eb7accd78ea845078275b2ad5280a109:test"
  }
}

Status code: 400

Bad Request

{
  "error_code" : "CFW.00200003",
  "error_msg" : "Parameter error."
}

Status Codes

Status Code

Description

200

OK

400

Bad Request

Error Codes

See Error Codes.