Querying Details of an Event

Function

This API is used to query details of an event based on the event name.

URI

GET /V1.0/{project_id}/event/{event_name}

Request

None

Response

Table 2 Parameter description

Parameter

Type

Mandatory

Description

event_name

String

No

Specifies the event name. The name can be a system event name or a custom event name.

event_type

String

No

Specifies the event type. The value can be EVENT.SYS (system event) or EVENT.CUSTOM (custom event).

event_users

Array of strings

No

Specifies the name of the user who reports the event. It can also be a project ID.

event_sources

Array of strings

No

Specifies the event source. If the event is a system event, the source is the namespace of each service. To view the namespace of each service, see Services Interconnected with Cloud Eye. If the event is a custom event, the event source is defined by the user.

event_info

Array of objects

No

Specifies details of one or more events.

For details, see Table 3.

meta_data

MetaData object

No

Specifies the number of metadata records in the query result.

For details, see Table 6.

Table 3 event_info data structure description

Parameter

Type

Mandatory

Description

event_name

String

Yes

Specifies the event name. Start with a letter. Enter 1 to 64 characters. Only letters, digits, and underscores (_) are allowed.

event_source

String

No

Specifies the event source in the format of service.item. service and item each must start with a letter and contain 3 to 32 characters, including only letters, digits, and underscores (_).

time

Long

Yes

Specifies when the event occurred, which is a UNIX timestamp (ms). Since there is a latency between the client and the server, the data timestamp to be inserted should be within the period that starts from one hour before the current time plus 20s to 10 minutes after the current time minus 20s. In this way, the timestamp will be inserted to the database without being affected by the latency.

detail

Detail object

Yes

Specifies the event details.

For details, see Table 4.

event_id

String

No

Specifies the event ID.

Table 4 detail data structure description

Parameter

Type

Mandatory

Description

content

String

No

Specifies the event content. Enter up to 4,096 characters.

group_id

String

No

Specifies the resource group the event belongs to. This ID must be an existing resource group ID.

resource_id

String

No

Specifies the resource ID, which can contain a maximum of 128 characters.

resource_name

String

No

Specifies the resource name, which can contain a maximum of 128 characters.

event_state

String

No

Specifies the event status.

The value can be normal, warning, or incident.

event_level

String

No

Specifies the event severity.

The value can be Critical, Major, Minor, or Info.

event_user

String

No

Specifies the event user. Enter up to 64 characters.

event_type

String

No

Specifies the event type.

The value can be EVENT.SYS (system event) or EVENT.CUSTOM (custom event).

dimensions

Array of objects

No

Specifies one or more resource dimensions.

For details, see Table 5.

Table 5 dimensions data structure description

Parameter

Type

Mandatory

Description

name

String

No

Specifies the dimension. For example, the ECS dimension is instance_id. For details about the dimension of each service, see the key column in Services Interconnected with Cloud Eye.

value

String

No

Specifies the dimension value, for example, an ECS ID.

Enter 1 to 256 characters.

Table 6 meta_data data structure description

Parameter

Type

Mandatory

Description

total

Integer

No

Specifies the total number of events.

Returned Values

Error Codes

See Error Codes.