Querying Details of an Event
Function
This API is used to query details of an event based on the event name.

Event subcategory parameters are only available in regions CN East-Shanghai1, CN East-Shanghai2, CN North-Beijing4, and CN South-Guangzhou.
Debugging
You can debug the API in API Explorer which supports automatic authentication. API Explorer can automatically generate and debug example SDK code.
URI
GET /V1.0/{project_id}/event/{event_name}
- Parameter description
Table 1 Parameter description Parameter
Type
Mandatory
Description
project_id
String
Yes
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 about how to obtain the project ID, see Obtaining a Project ID.
Constraints
N/A
Range
1 to 64 characters
Default Value
N/A
event_name
String
Yes
Definition
Event name. The name can be a system event name or a custom event name.
Constraints
N/A
Range
1 to 64 characters
Default Value
N/A
event_type
String
Yes
Definition
Event type.
Constraints
N/A
Range
The value can be:
- EVENT.SYS: system event
- EVENT.CUSTOM: custom event
Default Value
N/A
sub_event_type
String
No
Definition
Event subcategory.
Constraints
N/A
Range
The options are as follows: If the event type is system event, the value can be SUB_EVENT.OPS (O&M event) or SUB_EVENT.PLAN (planned event). If the event type is custom event, the value is SUB_EVENT.CUSTOM (custom event).
Default Value
SUB_EVENT.OPS
event_source
String
No
Definition
Event source. The value is the namespace of each cloud service. For details about the namespaces of cloud services, see Events Supported by Event Monitoring.
event_level
String
No
Constraints
N/A
Range
The value cannot exceed 32 characters.
Regular matching: ^((([a-z]|[A-Z]){1}([a-z]|[A-Z]|[0-9]|_)*\.([a-z]|[A-Z]){1}([a-z]|[A-Z]|[0-9]|_)*)|)$
Default Value
N/A
event_user
String
No
Definition
Event severity, which can be Critical, Major, Minor, or Info.
Constraints
N/A
Range
Critical, Major, Minor, or Info
Default Value
N/A
event_state
String
No
Definition
Name of the user who reports the event monitoring data. It can also be a project ID.
Constraints
N/A
Range
The value cannot exceed 64 characters.
Regular matching: ^([a-z]|[A-Z]|[0-9]|_|-|\/| |@|\.|)+$
Default Value
N/A
from
Long
No
Definition
Event status, which can be normal, warning, or incident.
Constraints
N/A
Range
normal, warning, or incident
Default Value
N/A
to
Long
No
Definition
Start time of the query. The value is a UNIX timestamp, in milliseconds. Example: 1605952700911
Constraints
N/A
Range
N/A
Default Value
N/A
start
Integer
No
Definition
End time of the query. The value is a UNIX timestamp, in milliseconds.
Constraints
from must be earlier than to.
Range
N/A
Default Value
N/A
limit
Integer
No
Definition
Pagination start value.
Constraints
N/A
Range
≥ 0
Regular matching: ^(0|[1-9][0-9]*)$
Default Value
0
Definition
Maximum number of records that can be queried at a time. The value range is (0,100] and the default value is 100.
Constraints
N/A
Range
1 to 100
Regular matching: ^([1-9]|[1-9][0-9]|100)$
Default Value
100
- Example
GET https://{Cloud Eye endpoint}/V1.0/{project_id}/event/{event_name}
Request
None
Response
- Response parameters
Parameter |
Type |
Mandatory |
Description |
---|---|---|---|
event_name |
String |
No |
Definition Event name. The name can be a system event name or a custom event name. Range N/A |
event_type |
String |
No |
Definition Event type. Range The value can be:
|
sub_event_type |
String |
No |
Definition Event subcategory. Range The value can be: If the event type is system event, the value can be SUB_EVENT.OPS or SUB_EVENT.PLAN. If the event type is custom event, the value is SUB_EVENT.CUSTOM.
|
event_users |
Array of strings |
No |
Definition Name of the user who reports the event. It can also be a project ID. Range N/A |
event_sources |
Array of strings |
No |
Definition 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. Range N/A |
event_info |
Array of objects |
No |
Definition Details of one or more events. For details, see Table 3. |
meta_data |
MetaData object |
No |
Definition Number of metadata records in the query results. For details, see Table 6. |
Parameter |
Type |
Mandatory |
Description |
---|---|---|---|
event_name |
String |
Yes |
Definition Event name. Range The value must start with a letter. It allows 1 to 64 characters and can only contain letters, digits, and underscores (_). |
event_source |
String |
No |
Definition Event source. Range The namespace must be in the service.item format and contain 3 to 32 characters. service and item each must start with a letter and contain only letters, digits, and underscores (_). |
time |
Long |
Yes |
Definition Time when an incident occurred. The value is a UNIX timestamp, in milliseconds. Range Since there is a latency between the client and the server, the timestamp when data was inserted must be within the time range [Current time – 1h + 20s, Current time + 10 mins – 20s]. In this way, the data will be inserted to the database without being affected by the latency. |
detail |
Detail object |
Yes |
Definition Event details. For details, see Table 4. |
event_id |
String |
No |
Definition Event ID. Range N/A |
Parameter |
Type |
Mandatory |
Description |
---|---|---|---|
content |
String |
No |
Definition Event content. Range Max. 4,096 characters |
group_id |
String |
No |
Definition Resource group that the event belongs to. Range 24 characters |
resource_id |
String |
No |
Definition Resource ID. Range Max. 128 characters |
resource_name |
String |
No |
Definition Resource name. Range Max. 128 characters |
event_state |
String |
No |
Definition Event status. Range The value can be:
|
event_level |
String |
No |
Definition Event severity. Range The value can be:
|
event_user |
String |
No |
Definition Event user. Range Max. 64 characters |
event_type |
String |
No |
Definition Event type. Range The value can be:
|
sub_event_type |
String |
No |
Definition Event subcategory. Range The options are as follows: If the event type is system event, the value can be SUB_EVENT.OPS (default) or SUB_EVENT.PLAN. If the event type is custom event, the value is SUB_EVENT.CUSTOM.
|
dimensions |
Array of objects |
No |
Definition Event dimension. Resource information is described by dimension. Event alarm rules can be configured by dimension to monitor specified resources and resource groups. For details, see Table 5. Range A maximum of four dimensions are supported. |
Parameter |
Type |
Mandatory |
Description |
---|---|---|---|
name |
String |
No |
Definition Monitoring dimension name. 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. Range N/A |
value |
String |
No |
Definition Dimension value, for example, an ECS ID. Range 1 to 256 characters |
- Example response
{ "event_name": "rebootServer", "event_type": "EVENT.SYS", "sub_event_type": "SUB_EVENT.OPS", "event_users": [ "" ], "event_sources": [ "SYS.ECS" ], "event_info": [ { "event_id": "ev1606302402256R6doP5YeZ", "event_name": "rebootServer", "event_source": "SYS.ECS", "time": 1606302400000, "detail": { "content": "{\"resourceSpecCode\":\"kc1.4xlarge.2.linux\",\"enterpriseProjectId\":\"6efb843e-391a-46a8-afc8-7fe51c9dd575\"}", "group_id": "", "resource_id": "ef8dad27-0488-4de7-bb43-1a0df9806d90", "resource_name": "CES-POROS-0001", "event_state": "normal", "event_level": "Minor", "event_user": "", "event_type": "EVENT.SYS", "sub_event_type": "SUB_EVENT.OPS", "dimensions": [ { "name": "instance_id", "value": "fddad01f-e3b6-420d-8fdc-a42451de7c34" } ] } }, { "event_id": "ev1606296088071wGoAOxVYa", "event_name": "rebootServer", "event_source": "SYS.ECS", "time": 1606296086000, "detail": { "content": "{\"resourceSpecCode\":\"kc1.4xlarge.2.linux\",\"enterpriseProjectId\":\"6efb843e-391a-46a8-afc8-7fe51c9dd575\"}", "group_id": "", "resource_id": "ef8dad27-0488-4de7-bb43-1a0df9806d90", "resource_name": "CES-POROS-0001", "event_state": "normal", "event_level": "Minor", "event_user": "", "event_type": "EVENT.SYS", "sub_event_type": "SUB_EVENT.OPS", "dimensions": [ { "name": "instance_id", "value": "fddad01f-e3b6-420d-8fdc-a42451de7c34" } ] } }, { "event_id": "ev1604654426090g7g37E6Yb", "event_name": "rebootServer", "event_source": "SYS.ECS", "time": 1604654425000, "detail": { "content": "{\"resourceSpecCode\":\"c6.4xlarge.2.linux\",\"enterpriseProjectId\":\"129559eb-f795-4b5f-9e46-cbd43a462362\"}", "group_id": "", "resource_id": "0bfa63ee-31f5-40a9-b992-50992c80c58a", "resource_name": "ndrv2-pod-ops-0001", "event_state": "normal", "event_level": "Minor", "event_user": "", "event_type": "EVENT.SYS", "sub_event_type": "SUB_EVENT.OPS", "dimensions": [ { "name": "instance_id", "value": "fddad01f-e3b6-420d-8fdc-a42451de7c34" } ] } } ], "meta_data": { "total": 5 } }
Returned Values
- Normal
- Abnormal
Returned Value
Description
400 Bad Request
Request error.
401 Unauthorized
The authentication information is not provided or is incorrect.
403 Forbidden
Access to the requested page is forbidden.
408 Request Timeout
The request timed out.
429 Too Many Requests
Concurrent requests are excessive.
500 Internal Server Error
Failed to complete the request because of an internal service error.
503 Service Unavailable
The service is currently unavailable.
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