Updated on 2026-09-21 GMT+08:00

Querying Events

Function

This API is used to query information about a specified event.

Constraints

The information returned by this API is the metadata information value of the secret event notification.

Calling Method

For details, see Calling APIs.

URI

GET /v1/{project_id}/csms/events/{event_name}

Table 1 Path Parameters

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

event_name

Yes

String

Definition

Event notification name.

Constraints

N/A

Range

The value must meet the regular expression ^[a-zA-Z0-9_-]{1,64}$.

Default Value

N/A

Request Parameters

Table 2 Request header 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

Table 3 Response body parameters

Parameter

Type

Description

event

Event object

Definition

Secret event notification information.

Range

N/A

Table 4 Event

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

  • ENABLED

  • DISABLED

create_time

Long

Definition

Timestamp when an event notification was created, that is, the total number of milliseconds 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 milliseconds since January 1, 1970.

Range

N/A

notification

Notification object

Definition

Notification.

Range

N/A

Table 5 Notification

Parameter

Type

Description

target_type

String

Definition

Type of the object to which the event notification is sent

Range

N/A

target_id

String

Definition

ID of the object to which the event notification is sent

Range

N/A

target_name

String

Definition

Name of the object to which the event notification is sent

Range

N/A

Example Requests

None

Example Responses

Status code: 200

Request succeeded.

{
  "event" : {
    "name" : "event-test",
    "event_id" : "bb6a3d22-dc93-47ac-b5bd-88df7ad35f1e",
    "state" : "ENABLED",
    "event_types" : [ "SECRET_VERSION_EXPIRED" ],
    "create_time" : 1581507580000,
    "update_time" : 1581507580000,
    "notification" : {
      "target_type" : "SMN",
      "target_id" : "urn:smn:cn-north-4:SecretExpirationTest",
      "target_name" : "SecretExpirationNotificationTest"
    }
  }
}

Status Codes

Status Code

Description

200

Request succeeded.

Error Codes

See Error Codes.