Querying the Event List
Function
This API is used to obtain all events created by the current user in the project.
Constraints
The information returned by this API is the metadata information of the event notification, excluding the secret value.
Calling Method
For details, see Calling APIs.
Authorization Information
Each account has all the permissions required to call all APIs, but IAM users must be assigned the required permissions.
- If you are using role/policy-based authorization, see Permissions Policies and Supported Actions for details on the required permissions.
- If you are using identity policy-based authorization, the following identity policy-based permissions are required.
Action
Access Level
Resource Type (*: required)
Condition Key
Alias
Dependencies
csms::listEvents
List
-
-
csms:event:list
-
URI
GET /v1/{project_id}/csms/events
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| project_id | Yes | String | Definition Project ID. For details, see Obtaining a Project ID. Constraints N/A Range The value returned by the IAM API is used, which contains 32 characters. Default Value N/A |
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| limit | No | String | Definition Number of secret events returned on each page Constraints By default, 50 secret events are returned on each page. A maximum of 1,000 secrets can be returned. Range N/A Default Value N/A |
| marker | No | String | Definition Name of the last secret event on each page is used as a pagination tag. If this parameter is left blank, the first page is queried. Constraints Parameters marker and limit must be used together. If the number of records returned on the last page is less than the value of limit, the query ends. Range N/A Default Value N/A |
Request Parameters
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| X-Auth-Token | Yes | String | Definition User token. It can be obtained by calling the IAM API. The value of X-Subject-Token in the response header is the user token. This parameter is optional if AK/SK authentication is used. Constraints N/A Range Obtain the value by calling the IAM API for obtaining the user token. Default Value N/A |
Response Parameters
Status code: 200
| Parameter | Type | Description |
|---|---|---|
| events | Array of Event objects | Definition Event details list Range N/A |
| page_info | PageInfo object | Definition Pagination information. Range N/A |
| Parameter | Type | Description |
|---|---|---|
| name | String | Definition Event notification name Range N/A |
| event_id | String | Definition Resource ID of the event notification Range N/A |
| event_types | Array of strings | Definition Set the basic event type list. Range Array. The value ranges from 1 to 12. |
| state | String | Definition Event notification status Range |
| create_time | Long | Definition Timestamp when an event notification was created, that is, the total number of seconds since January 1, 1970. Range N/A |
| update_time | Long | Definition Timestamp when an event notification was last updated, that is, the total number of seconds since January 1, 1970. Range N/A |
| notification | Notification object | Definition Notification. Range N/A |
| Parameter | Type | Description |
|---|---|---|
| target_type | String | Definition Type of the object to which the event notification is sent Constraints SMN and EG messages are supported. Range N/A Default Value N/A |
| target_id | String | Definition ID of the object to which the event notification is sent Constraints N/A Range N/A Default Value N/A |
| target_name | String | Definition Name of the object to which the event notification is sent Constraints N/A Range N/A Default Value N/A |
| Parameter | Type | Description |
|---|---|---|
| next_marker | String | Definition Query address of the next page (secret name at the end of the current page and the start of the next page) Range N/A |
| previous_marker | String | Definition Secret name at the start of the current page and the end of the last page Range N/A |
| current_count | Integer | Definition Number of records returned on this page Range N/A |
Example Requests
None
Example Responses
Status code: 200
Request succeeded.
{
"events" : [ {
"state" : "ENABLED",
"name" : "TestEvent1",
"event_id" : "120eeafd-eca5-4098-8733-c1b369f3a450",
"event_types" : [ "SECRET_VERSION_CREATED", "SECRET_VERSION_EXPIRED", "SECRET_VERSION_NEAR_EXPIRY", "SECRET_DELETED" ],
"create_time" : 1669042498000,
"update_time" : 1669042498000,
"notification" : {
"target_type" : "SMN",
"target_id" : "urn:smn:cn-north-4:dc3b7c85759141a991da17423c0f2068:smn-target-name",
"target_name" : "smn-target-name"
}
}, {
"state" : "ENABLED",
"name" : "TestEvent2",
"event_id" : "1d251c99-37d2-4396-86ce-f000d3aa9850",
"event_types" : [ "SECRET_VERSION_CREATED", "SECRET_VERSION_EXPIRED", "SECRET_VERSION_NEAR_EXPIRY", "SECRET_DELETED" ],
"create_time" : 1669041491000,
"update_time" : 1669041491000,
"notification" : {
"target_type" : "SMN",
"target_id" : "urn:smn:cn-north-4:dc3b7c85759141a991da17423c0f2068:smn-target-name",
"target_name" : "smn-target-name"
}
} ],
"page_info" : {
"next_marker" : "TestEvent2",
"previous_marker" : "TestEvent3",
"current_count" : 2
}
} Status Codes
| Status Code | Description |
|---|---|
| 200 | Request succeeded. |
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